/* /how-to-stop-hanging-pieces/ (MAR-132), v3 (2026-11-18): structure B, the chess-book chapter. One reading column on
   the paper: the answer (the three questions, in the order you ask them), a chapter per question, which one is yours,
   questions, the close. It uses the first search page's components (/find-your-mistakes/page.css: the hero band, the
   questions, the closing panel, the dock) and the design language v2: six type steps (--t-* in /paper.css), one job
   per colour (blue: actions, numbers and where you are; dark: the app; red and green: chess marks), more space above
   a heading than below it. */

/* The column: 600 px, as a chess book sets a lesson. Text, rules, diagrams, cards and questions all share its one left
   and right edge, so the eye runs straight down the page (2026-11-18: no indented figures). */
.book { max-width: calc(600px + var(--margin) * 2); }
.book h2 { font-size: var(--t-section); line-height: 1.05; letter-spacing: -0.02em; }
.book .body { max-width: none; margin-top: 16px; font-size: var(--t-body); line-height: 1.6; color: var(--ink); }
.book h2 + .body { margin-top: 24px; }
.chapters, .yours, .faqB { padding: var(--t-gap) 0 0; }

/* The answer: the title, one sentence, and the three questions under a heavy rule, each linking to its chapter. */
.hero-h { padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 7vw, 96px); }
.hero-h h1 { font-size: var(--t-display); line-height: .98; letter-spacing: -0.03em; }
.hero-h .lead { margin-top: 24px; font-size: var(--t-prompt); line-height: 1.45; font-weight: 400; color: var(--ink-brown); }
.check { list-style: none; margin: 36px 0 0; padding: 0; border-top: 3px solid var(--ink-dark); }
.check li { border-bottom: 1px solid rgb(58 50 38 / .18); }
.check a { display: grid; grid-template-columns: 44px 1fr; column-gap: 6px; padding: 16px 0 18px; color: var(--ink); text-decoration: none; }
.check .no { grid-area: 1 / 1; font-size: var(--t-prompt); font-weight: 700; line-height: 1.35; color: var(--blue); }
.check .q { grid-area: 1 / 2; }
.check .hab { grid-area: 2 / 2; margin-top: 4px; font-size: var(--t-label); font-weight: 600; letter-spacing: .02em; line-height: 1.3; color: var(--ink-2); }
.check .q { font-size: var(--t-prompt); font-weight: 600; line-height: 1.35; text-decoration: underline 2px transparent; text-underline-offset: 6px; transition: text-decoration-color 160ms; }
.check a:hover .q { text-decoration-color: var(--blue); }
.check a:focus-visible { outline: 3px solid #1D4FD8; outline-offset: 4px; border-radius: 4px; }
/* The book's contents line: the chapters and what follows them. */
.toc { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 22px; font-size: var(--t-label); font-weight: 600; letter-spacing: .02em; line-height: 1.3; }
.toc span { color: var(--ink-2); }
.toc a { color: var(--link); text-decoration: none; }
.toc a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* A chapter, as a chess book sets a lesson: under the heavy rule that opens it, the habit (numbered as its question in
   the answer), the diagram, what the habit is, the four sentences, the app. One rhythm: 24 px from the heading to the
   diagram, 32 px from the diagram to the text, 16 px between paragraphs. */
.habit { margin-top: var(--t-chapter-gap); padding-top: 18px; border-top: 3px solid var(--ink-dark); scroll-margin-top: 24px; }
.hh { font-size: var(--t-chapter); line-height: 1.15; letter-spacing: -0.015em; }
.hh .no { color: var(--blue); margin-right: .2em; }
/* How to check, and where it hides (2026-11-18): two short lists at body size, each under a run-in heading in ink.
   The steps are a real sequence, so they are numbered; the places are not, so they are a plain list. */
.guide { margin-top: 28px; }
.guide h4 { font-size: var(--t-body); font-weight: 700; line-height: 1.4; }
.guide h4 + ol, .guide h4 + ul { margin-top: 8px; }
.guide ol + h4, .guide ul + h4 { margin-top: 24px; }
.howto, .hides { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: var(--t-body); line-height: 1.6; }
.howto { counter-reset: hc; }
.howto li { position: relative; padding-left: 32px; counter-increment: hc; }
.howto li::before { content: counter(hc) "."; position: absolute; left: 0; font-weight: 700; color: var(--blue); }
.hides li { position: relative; padding-left: 32px; color: var(--ink); }
.hides li::before { content: ""; position: absolute; left: 4px; top: .75em; width: 12px; height: 2px; border-radius: 1px; background: var(--ink-2); }
.hides b { font-weight: 700; }
.guide + .aside { margin-top: 24px; }
.aside { margin-top: 16px; font-size: var(--t-body); line-height: 1.6; color: var(--ink-2); }
.aside b { font-weight: 700; color: var(--ink); }

/* The diagram, at the column's full width: the start page's dark wood frame; under it the caption with Play or Pause
   as a word at its right, on the same line; then (with the script) the four steps across the full width and the
   sentence for the step on show. A hairline closes the figure, so the room kept for the longest sentence reads as part
   of the diagram, not as a gap before the text. Grid order sets the rows whatever the DOM order. */
.habit-board { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; align-items: center; margin: 24px 0 0; padding-bottom: 20px; border-bottom: 1px solid rgb(58 50 38 / .18); }
.habit-board + .body { margin-top: 32px; }
.habit-board .frame { order: 0; grid-column: 1 / -1; padding: 2.2%; border-radius: 20px; background: var(--frame); box-shadow: var(--shadow-warm); }
.habit-board .frame img { display: block; width: 100%; height: auto; border-radius: 8px; }
.habit-board .cap { order: 1; grid-column: 1; margin-top: 8px; font-size: var(--t-label); font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
.habit-board .play { order: 1; grid-column: 2; margin-top: 8px; }
.habit-board .hsteps { order: 2; grid-column: 1 / -1; }
.habit-board .hsay { order: 3; }
.anim-board { display: block; width: 100%; height: auto; border-radius: 8px; }
.anim-board .pcs use { will-change: transform; transition: opacity 160ms ease; }
.animated .frame { cursor: pointer; }
/* The steps: a bar each that fills while the board is on it; done and current show by fill and weight, not hue alone. */
.hsteps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.hsteps button { display: grid; align-content: start; gap: 10px; padding: 6px 0 10px; text-align: left; font-size: var(--t-label); font-weight: 600; line-height: 1.3; color: var(--ink-2); }
.hsteps button:hover { color: var(--ink); }
.hsteps .sm { display: none; }
.hsteps button.now { color: var(--ink); font-weight: 700; }
.hsteps i { position: relative; display: block; height: 4px; border-radius: 3px; background: var(--raised-2); overflow: hidden; }
.hsteps i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.hsteps .done i::after, .hsteps .now:not(.run) i::after { transform: none; }
.hsteps .now.run i::after { animation: fill var(--d, 3s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
/* The sentence for the step on show: all four share one cell, so the tallest sets the height and nothing below moves. */
.hsay { grid-column: 1 / -1; display: grid; margin-top: 12px; }
.hsay p { grid-area: 1 / 1; visibility: hidden; font-size: var(--t-body); line-height: 1.6; color: var(--ink); }
.hsay p.now { visibility: visible; }
.hsay b { font-weight: 700; }
.play { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 2px; border-radius: 8px; line-height: 1.3; color: var(--ink-2); font-size: var(--t-label); font-weight: 600; white-space: nowrap; }
.play[hidden] { display: none; }
.play:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.play svg { width: 12px; height: 12px; fill: currentColor; }
.play .i-play, .play.paused .i-pause { display: none; }
.play.paused .i-play { display: block; }
.play.paused { color: var(--link); }
.play:focus-visible, .hsteps button:focus-visible { outline: 2px solid #1D4FD8; outline-offset: 3px; border-radius: 6px; }

/* The four sentences under the diagram, numbered as the steps. Without the script, or with reduced motion, they stand
   as they are; while the board plays, the sentence under the board says them and the list stays for screen readers. */
ol.story { list-style: none; display: grid; gap: 4px; margin: 24px 0 0; padding: 0; counter-reset: st; }
.story li { position: relative; padding: 10px 0 10px 44px; font-size: var(--t-body); line-height: 1.6; color: var(--ink); counter-increment: st; }
.story li::before { content: counter(st); position: absolute; left: 0; top: 12px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--raised); font-size: 14px; font-weight: 700; color: var(--ink-brown); }
.story b { font-weight: 700; }
.story li.now::before { background: var(--blue); color: #fff; }
.ready .habit.animated .story { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Which one is yours: three games join into the app's pattern card (the app's dark, like every app surface here),
   then the stage, the badge and the way to the first page. */
.resolve { margin: 32px 0 0; }
.resolve + .body { margin-top: 32px; }
.row3, .join3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mini { padding: 6px; border-radius: 12px; }
.mini img { border-radius: 5px; }
.join3 { height: 28px; }
.join3 i { justify-self: center; width: 3px; border-radius: 2px; background: linear-gradient(var(--blunder), #7FA5FF); transform-origin: top; }
.pcard { padding: 24px 26px 26px; border-radius: 22px; background: var(--canvas); color: var(--ink); }
/* The cards' capitals are the app's own: the pattern count line (ProgressPatternsView.swift, countLine uppercased)
   and the stage sheet's line (ImprovePathFirstStageView.swift, sheetEyebrow uppercased). */
.pc-kick, .sc-kick { font-size: var(--t-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
.pc-name { margin-top: 4px; font-size: var(--t-chapter); font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; }
.pcard .hc-sq { margin-top: 14px; }
.pcard .hc-sq i { width: 22px; height: 22px; }
.pc-d { margin-top: 14px; font-size: var(--t-body); line-height: 1.5; color: var(--ink-2); }
/* With the script and motion allowed, the boards drop in one by one as the card comes into view, each lighting its
   line and a square; only transform, opacity and colour move, so nothing around it shifts. */
.resolve.armed .mini, .resolve.armed .join3 i, .resolve.armed .hc-sq i { transition: none; }
.resolve.armed .mini { opacity: 0; transform: translateY(-28px); }
.resolve.armed .join3 i { transform: scaleY(0); }
.resolve.armed .hc-sq i { background: var(--raised-2); }
.resolve.armed.go .mini { opacity: 1; transform: none; transition: opacity 260ms ease, transform 420ms cubic-bezier(0.34, 1.4, 0.64, 1); transition-delay: calc(var(--k) * 420ms); }
.resolve.armed.go .join3 i { transform: none; transition: transform 240ms cubic-bezier(0.76, 0, 0.24, 1); transition-delay: calc(var(--k) * 420ms + 280ms); }
.resolve.armed.go .hc-sq i { background: var(--blunder); transition: background-color 200ms ease; transition-delay: calc(var(--k) * 420ms + 480ms); }
@media print {
  .resolve.armed .mini { opacity: 1; transform: none; }
  .resolve.armed .join3 i { transform: none; }
  .resolve.armed .hc-sq i { background: var(--blunder); }
}
.scard { margin-top: 24px; padding: 24px; border-radius: 22px; background: var(--canvas); color: var(--ink); }
.sc-cue { margin-top: 8px; font-size: var(--t-prompt); font-weight: 600; line-height: 1.35; }
.sc-rows { display: grid; gap: 8px; margin-top: 18px; }
.sc-rows li { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--raised); }
.sc-rows .tile { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--tile); }
.sc-rows .tile img { width: 38px; height: 38px; }
.sc-rows b { display: block; font-size: 17px; }
.sc-rows li span span { display: block; font-size: 15px; line-height: 1.35; color: var(--ink-2); }
.yours .store { margin-top: 32px; }
.yours .store a { display: inline-block; padding: 0; }
.yours .soon-note { margin-top: 32px; }
.why-link { margin-top: 18px; }
.why-link a { display: inline-flex; align-items: center; gap: 10px; color: var(--link); font-weight: 600; text-underline-offset: 4px; }

/* Questions: rows split by hairlines under the section's rule, a drawn plus in ink (blue when open), no filled pills. */
.faqB h2 { text-align: left; }
.book .accB { max-width: none; margin: 24px 0 0; border-top: 3px solid var(--ink-dark); }
.book .acc { gap: 0; }
.book .acc-i, .book .acc-i[open] { border-radius: 0; background: none; border-bottom: 1px solid rgb(58 50 38 / .18); }
.book .acc-i summary { padding: 20px 0; }
.book .acc-i h3 { font-size: var(--t-body); font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.book .acc-i p { padding: 0 0 22px; margin-top: -6px; font-size: var(--t-body); }
.book .acc-i summary i, .book .acc-i[open] summary i { width: 24px; height: 24px; border-radius: 0; background: none; }
.book .acc-i summary i::before, .book .acc-i summary i::after { width: 16px; margin-left: -8px; background: var(--ink); }
.book .acc-i[open] summary i::before, .book .acc-i[open] summary i::after { background: var(--link); }

/* Nothing slides in on this page: text is where it stays from the first frame, and only the boards move (the shared
   entrances of /find-your-mistakes/page.css would lift every heading 24 px as it arrives). */
.ready [data-in] { opacity: 1; transform: none; transition: none; }

/* The close: the page's one blue field, its title at the section step. */
.close-h { padding-top: var(--t-gap); }
.end-t { font-size: var(--t-section); line-height: 1.05; letter-spacing: -0.02em; }
/* Its two facts as rows on the blue, split by a hairline, not cards inside the card. */
.end-facts { gap: 0; }
.end-facts li { padding: 14px 0; border-radius: 0; background: none; border-top: 1px solid rgb(255 255 255 / .3); }
.end-facts li:last-child { border-bottom: 1px solid rgb(255 255 255 / .3); }
.end-facts span { color: #fff; }

/* The footer's name at the section step, so the page ends on its call to action, not on the logo (design language
   v2; the other pages follow). */
body.light footer .big { width: min(240px, 60%); }

@media (max-width: 900px) {
  .row3, .join3 { gap: 8px; }
  .end-t { font-size: var(--t-section); }
}
@media (max-width: 520px) {
  .check a { grid-template-columns: 32px 1fr; }
  .hsteps .lg { display: none; }
  .hsteps .sm { display: block; }
  .story li { padding-left: 40px; }
  .scard, .pcard { padding: 20px; }
}
