/* PHVA v4 lessons: calm reading pages layered on v4.css (tokens, bar, footer, .note, .btn, .link, .capture, .final).
   v4.css is not edited. Every class here starts with ls- so lessons 7 to 12 can copy a page and only change copy.
   Read mode: one 68ch column, a quiet contents list beside it, paper objects only where the reader works
   (the template, the worksheet, the worked example, "do this today"). Paper keeps fixed light-theme ink in dark mode. */

/* ---------- head ---------- */
.ls-head { padding: clamp(28px, 4.4vw, 64px) 0 clamp(28px, 3.4vw, 44px); border-bottom: 1px solid var(--rule); }
.ls-crumb { font-size: .95rem; color: var(--ink-3); margin-bottom: 20px; }
.ls-crumb a { color: var(--ink-2); font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 2px; text-underline-offset: .3em; display: inline-flex; align-items: center; min-height: 44px; }
.ls-crumb a:hover { color: var(--ink); text-decoration-color: var(--pen); }
.ls-h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); letter-spacing: -.035em; line-height: 1.02; max-width: 21ch; }
.ls-lede { margin-top: 20px; font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.ls-meta { margin-top: 18px; font-size: .95rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 0; }
.ls-meta span { padding-right: 14px; margin-right: 14px; border-right: 1px solid var(--rule); }
.ls-meta span:last-child { border-right: 0; padding-right: 0; margin-right: 0; }

/* ---------- layout: the reading column and the contents list ---------- */
.ls-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: clamp(40px, 6vw, 88px); align-items: start; padding-top: clamp(36px, 4vw, 56px); padding-bottom: clamp(56px, 7vw, 96px); }
.ls-body { min-width: 0; max-width: 70ch; }
.ls-toc { position: sticky; top: 96px; grid-column: 2; grid-row: 1; font-size: .95rem; }
.ls-toc h2 { font: 700 .95rem/1.2 var(--body); letter-spacing: 0; color: var(--ink); margin-bottom: 10px; }
.ls-toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ls-toc li { border-bottom: 1px solid var(--rule); }
.ls-toc a { display: flex; align-items: center; min-height: 44px; padding: 6px 0; color: var(--ink-2); text-decoration: none; line-height: 1.3; }
.ls-toc a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.ls-toc a[aria-current="true"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.ls-toc details > summary { display: none; }
@media (max-width: 1000px) {
  .ls-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ls-toc { position: static; grid-column: 1; margin-bottom: 36px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .ls-toc h2 { display: none; }
  .ls-toc details > summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; list-style: none; font-weight: 700; color: var(--ink); }
  .ls-toc details > summary::-webkit-details-marker { display: none; }
  .ls-toc details > summary::after { content: ""; width: 10px; height: 10px; margin-right: 6px; border-right: 2px solid var(--pen); border-bottom: 2px solid var(--pen); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); }
  .ls-toc details[open] > summary::after { transform: rotate(225deg) translateY(-3px); }
  .ls-toc ol { margin-bottom: 14px; }
}

/* ---------- running text ---------- */
.ls-body > section { scroll-margin-top: 96px; }
.ls-body > section + section { margin-top: clamp(52px, 6vw, 72px); }
.ls-body h2 { font-size: clamp(1.75rem, 2.8vw, 2.3rem); letter-spacing: -.03em; line-height: 1.08; max-width: 26ch; margin-bottom: 18px; }
.ls-body h3 { font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.2; margin: 34px 0 10px; }
.ls-body p, .ls-body li { font-size: 1.0625rem; line-height: 1.65; }
.ls-body p { margin: 0 0 1.05em; }
.ls-body p:last-child { margin-bottom: 0; }
.ls-body ul, .ls-body ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.ls-body li { margin: .35em 0; padding-left: .2em; }
.ls-body li::marker { color: var(--ink-3); }
.ls-body strong, .ls-body b { color: var(--ink); }
.ls-body a:not(.btn):not(.ls-tool-a) { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; text-underline-offset: .28em; }
.ls-body a:not(.btn):not(.ls-tool-a):hover { color: var(--pen); }
.ls-body .ls-muted { color: var(--ink-2); }
.ls-src { margin-top: 14px; font-size: 1rem; line-height: 1.5; color: var(--ink-3); }
.ls-src a { overflow-wrap: anywhere; }
.ls-note-line { padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font: 700 1.15rem/1.45 var(--display) !important; letter-spacing: -.01em; color: var(--ink); margin: 0 0 1.1em; }

.ls-inline { margin: 0 0 1.05em; padding: 14px 18px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r); white-space: pre-wrap; font: 500 1rem/1.6 var(--body); color: var(--ink); }

/* ---------- the method: numbered steps ---------- */
.ls-steps { list-style: none; padding: 0 !important; margin: 26px 0 0 !important; counter-reset: ls-step; }
.ls-steps > li { counter-increment: ls-step; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 14px; padding: 22px 0 !important; margin: 0 !important; border-top: 1px solid var(--rule); }
.ls-steps > li::before { content: counter(ls-step); font: 800 2rem/1 var(--display); letter-spacing: -.04em; color: var(--pen); font-variant-numeric: tabular-nums; padding-top: 2px; }
.ls-steps > li > div > h3 { margin: 0 0 8px; }
.ls-steps > li > div > p:last-child, .ls-steps > li > div > ul:last-child { margin-bottom: 0; }
@media (max-width: 560px) { .ls-steps > li { grid-template-columns: 36px minmax(0, 1fr); gap: 0 10px; } .ls-steps > li::before { font-size: 1.6rem; } }

/* ---------- paper objects (fixed light ink in both themes) ---------- */
.ls-paper { position: relative; background: var(--card); color: #16181b; border-radius: var(--r); box-shadow: var(--shadow); padding: 30px clamp(18px, 3vw, 34px) 28px; margin: 28px 0; }
.ls-paper::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: repeating-linear-gradient(90deg, #16181b 0 14px, transparent 14px 20px); opacity: .1; }
.ls-paper p, .ls-paper li, .ls-paper dd { color: #3c4148; }
.ls-paper b, .ls-paper strong, .ls-paper h3, .ls-paper dt { color: #16181b; }
.ls-paper a:not(.btn) { color: #16181b !important; text-decoration-color: #2340c8 !important; }
.ls-paper :focus-visible { outline-color: #16181b; }
.ls-label { display: block; font: 700 .78rem/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; color: #4a5058; margin-bottom: 10px; }

/* worked example: a printed case card */
.ls-case { transform: rotate(-.35deg); }
.ls-case h3 { margin-top: 0 !important; font-size: 1.35rem; }
.ls-case .ls-setup { margin-top: 6px; }
.ls-roles { margin: 18px 0 0; display: grid; gap: 0; }
.ls-roles > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 18px; padding: 14px 0; border-top: 1px solid #e3e5df; }
.ls-roles dt { font: 700 .98rem/1.4 var(--body); }
.ls-roles dd { margin: 0; font-size: 1rem; line-height: 1.6; }
.ls-case .ls-made-up { margin-top: 16px; font-size: .9rem; color: #4a5058; }
@media (max-width: 600px) { .ls-case { transform: none; } .ls-roles > div { grid-template-columns: 1fr; } }

/* the copyable template */
.ls-tpl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.ls-tpl-head h3 { margin: 0 !important; font-size: 1.3rem; }
.ls-tpl pre { margin: 0; padding: 20px clamp(14px, 2.4vw, 22px); background: #fffdf2; border: 1.5px solid rgba(22,24,27,.18); border-radius: var(--r); white-space: pre-wrap; font: 400 .9375rem/1.6 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: #16181b; tab-size: 4; }
/* templates are aligned in columns for pasting: on narrow screens keep each line whole and let the box scroll sideways */
@media (max-width: 720px) { .ls-tpl pre { white-space: pre; overflow-x: auto; font-size: .8125rem; -webkit-overflow-scrolling: touch; } }
.ls-tpl .ls-tpl-after { margin-top: 14px; font-size: 1rem; }
.ls-copy, .ls-print {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 2px solid #16181b; border-radius: var(--r); background: transparent; color: #16181b;
  font: 700 .98rem/1 var(--body); cursor: pointer; transition: background .2s, color .2s;
}
.ls-copy:hover, .ls-print:hover { background: #16181b; color: #fffef8; }
.ls-copy svg, .ls-print svg { width: 16px; height: 16px; }
.ls-copy.done { background: #2340c8; border-color: #2340c8; color: #fff; }

/* the printable worksheet */
.ls-sheet { background: #fffef8; }
.ls-sheet-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; padding-bottom: 14px; border-bottom: 2px solid #16181b; }
.ls-sheet-head h3 { margin: 0 !important; font-size: 1.4rem; }
.ls-sheet-head p { margin: 4px 0 0 !important; font-size: 1rem !important; }
.ls-sheet .ls-sheet-sub { margin: 22px 0 6px !important; font: 700 1.02rem/1.3 var(--display); color: #16181b; letter-spacing: -.01em; }
.ls-checks { list-style: none; padding: 0 !important; margin: 8px 0 0 !important; }
.ls-checks li { margin: 0 !important; padding: 0 !important; border-bottom: 1px solid #e3e5df; }
.ls-checks label { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; min-height: 44px; cursor: pointer; color: #2b2f35; font-size: 1rem; line-height: 1.5; }
.ls-checks input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 1px 0 0; border: 1.6px solid rgba(22,24,27,.55); border-radius: 3px; transform: rotate(-3deg); background: #fffdf2; cursor: pointer; display: grid; place-content: center; }
.ls-checks input[type=checkbox]::after { content: ""; width: 22px; height: 20px; margin: -6px -4px 0 4px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cpath d='M5 16 L12 23 L28 4' fill='none' stroke='%232340c8' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transform: scale(0); transition: transform .2s var(--ease); }
.ls-checks input[type=checkbox]:checked::after { transform: scale(1); }
.ls-checks input[type=checkbox]:focus-visible { outline: 2px solid #16181b; outline-offset: 2px; }
.ls-lines { display: grid; gap: 4px; margin-top: 6px; }
.ls-line { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); align-items: end; gap: 12px; min-height: 46px; }
.ls-line > span { font-size: .95rem; color: #4a5058; padding-bottom: 8px; white-space: nowrap; }
.ls-line input { width: 100%; min-width: 0; height: 40px; border: 0; border-bottom: 1.5px solid #b4b9b1; background: transparent; border-radius: 0; font: 400 1.45rem/1 var(--pen-font); color: #2340c8; padding: 0 2px; }
.ls-line input:focus { outline: 0; border-bottom: 2px solid #2340c8; }
.ls-sheet-foot { margin-top: 18px !important; font-size: 1rem !important; color: #4a5058 !important; }
@media (max-width: 520px) { .ls-line { grid-template-columns: 1fr; gap: 0; } .ls-line > span { white-space: normal; padding-bottom: 0; } }

/* table inside a lesson (pay ladder, week plan) */
.ls-table-wrap { margin: 22px 0; overflow-x: auto; }
.ls-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.ls-table th, .ls-table td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-top: 1px solid var(--rule); line-height: 1.5; }
.ls-table th { font: 700 .95rem/1.3 var(--body); color: var(--ink); }
.ls-table thead th { border-top: 2px solid var(--ink); font-size: .9rem; color: var(--ink-2); }
.ls-table td { color: var(--ink-2); }
.ls-table .num { white-space: nowrap; color: var(--ink); font-weight: 700; }
@media (max-width: 600px) {
  .ls-table thead { display: none; }
  .ls-table, .ls-table tbody, .ls-table tr, .ls-table th, .ls-table td { display: block; width: 100%; }
  .ls-table tr { border-top: 1px solid var(--rule); padding: 10px 0; }
  .ls-table th, .ls-table td { border: 0; padding: 2px 0; }
  .ls-table td[data-h]::before { content: attr(data-h) ": "; font-weight: 700; color: var(--ink); }
}

/* common mistakes: mistake, then the fix */
.ls-mistakes { margin: 18px 0 0; }
.ls-mistakes > div { padding: 18px 0; border-top: 1px solid var(--rule); }
.ls-mistakes > div:last-child { border-bottom: 1px solid var(--rule); }
.ls-mistakes dt { font: 700 1.1rem/1.35 var(--display); letter-spacing: -.01em; color: var(--ink); }
.ls-mistakes dd { margin: 8px 0 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.65; }
.ls-mistakes dd b { color: var(--ink); }

/* do this today: the canary note */
.ls-today { padding: 34px clamp(20px, 3.4vw, 38px) 28px; margin: 10px 0 0; transform: rotate(-.6deg); }
.ls-today .pen { display: block; font-size: 2.1rem; line-height: 1.05; color: #16181b; margin-bottom: 12px; }
.ls-today p, .ls-today li { color: #2c2a1c; }
.ls-today ol { margin: 10px 0 0; }
.ls-today li::marker { color: #4a4317; font-weight: 700; }
.ls-today .ls-time { display: inline-block; margin-top: 14px; font: 700 .78rem/1.15 var(--body); letter-spacing: .06em; text-transform: uppercase; color: #2340c8; border: 2px solid #2340c8; border-radius: var(--r); padding: 6px 9px; transform: rotate(-2deg); }
@media (max-width: 900px) { .ls-today { transform: none; } }

/* how PHVA does it */
.ls-phva { padding-top: 26px; border-top: 2px solid var(--ink); }
.ls-phva h2 { margin-bottom: 14px; }

/* the one free-tool CTA */
.ls-tool { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; padding: 26px clamp(18px, 3vw, 32px); background: var(--card); color: #16181b; border-radius: var(--r); box-shadow: var(--shadow); transform: rotate(.4deg); }
.ls-tool b { display: block; font: 800 1.35rem/1.15 var(--display); letter-spacing: -.02em; color: #16181b; }
.ls-tool p { margin: 6px 0 0 !important; color: #3c4148 !important; font-size: 1rem !important; }
.ls-tool .btn { background: #2340c8; color: #fff; }
.ls-tool .btn:hover { background: #1a31a0; }
.ls-tool :focus-visible { outline-color: #16181b; }
@media (max-width: 700px) { .ls-tool { grid-template-columns: 1fr; transform: none; } .ls-tool .btn { width: 100%; white-space: normal; text-align: center; line-height: 1.2; padding: 14px 18px; } }

/* prev and next */
.ls-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(52px, 6vw, 72px); padding-top: 26px; border-top: 1px solid var(--rule); }
.ls-pager a { display: grid; gap: 4px; align-content: start; min-height: 44px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--r); color: var(--ink); text-decoration: none; transition: border-color .2s, transform .25s var(--ease); }
.ls-pager a:hover { border-color: var(--pen); transform: translateY(-2px); }
.ls-pager span { font-size: .9rem; color: var(--ink-3); }
.ls-pager b { font: 700 1.1rem/1.3 var(--display); letter-spacing: -.01em; }
.ls-pager .next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .ls-pager { grid-template-columns: 1fr; } .ls-pager .next { grid-column: 1; text-align: left; } }

/* the course capture reuses .final and .form-note from v4.css */
.ls-final .h2 { max-width: 16ch; }
.ls-final .sub { max-width: 46ch; }

/* ---------- the lessons index ---------- */
.ls-index { list-style: none; margin: 0; padding: 0; counter-reset: ls-i; border-bottom: 1px solid var(--rule); }
.ls-index li { counter-increment: ls-i; border-top: 1px solid var(--rule); }
.ls-index a { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 18px; align-items: baseline; padding: 22px 4px; color: var(--ink); text-decoration: none; }
.ls-index a::before { content: counter(ls-i); grid-row: 1 / span 2; font: 800 2.1rem/1 var(--display); letter-spacing: -.04em; color: var(--pen); font-variant-numeric: tabular-nums; }
.ls-index b { font: 800 1.35rem/1.2 var(--display); letter-spacing: -.02em; }
.ls-index a:hover b { text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; text-underline-offset: .22em; }
.ls-index .d { grid-column: 2; color: var(--ink-2); font-size: 1.02rem; line-height: 1.5; max-width: 62ch; }
.ls-index .t { grid-column: 3; grid-row: 1; font-size: .9rem; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 600px) {
  .ls-index a { grid-template-columns: 40px minmax(0, 1fr); }
  .ls-index a::before { font-size: 1.6rem; grid-row: 1 / span 3; }
  .ls-index .t { grid-column: 2; grid-row: auto; }
  .ls-index b { font-size: 1.2rem; }
}
.ls-idx-layout { padding-top: clamp(36px, 4vw, 56px); padding-bottom: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.ls-idx-aside { position: sticky; top: 96px; }
.ls-idx-aside h2 { font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 12px; }
.ls-idx-aside p { color: var(--ink-2); margin-bottom: .9em; }
.ls-idx-aside ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.ls-idx-aside li { margin: .35em 0; }
@media (max-width: 900px) { .ls-idx-layout { grid-template-columns: 1fr; } .ls-idx-aside { position: static; } }

/* ---------- print ---------- */
@media print {
  @page { size: letter portrait; margin: .55in .6in; }
  html, body { background: #fff !important; color: #16181b !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none !important; }
  .skip, .bar, .site-foot, .sticky, .ls-toc, .ls-final, .ls-pager, .ls-tool, .ls-copy, .ls-print, .ls-crumb { display: none !important; }
  .ls-head { padding: 0 0 10pt; border-bottom: 1.5pt solid #16181b; }
  .ls-h1 { font-size: 24pt; max-width: none; }
  .ls-lede { font-size: 11pt; color: #3c4148; }
  .ls-meta { font-size: 9pt; }
  .ls-layout { display: block; padding: 14pt 0 0; }
  .ls-body { max-width: none; }
  .ls-body p, .ls-body li, .ls-mistakes dd { font-size: 10.5pt; line-height: 1.45; color: #16181b; }
  .ls-body h2 { font-size: 15pt; margin-bottom: 6pt; break-after: avoid; }
  .ls-body h3 { font-size: 12pt; break-after: avoid; }
  .ls-body > section + section { margin-top: 18pt; }
  .ls-paper, .ls-today, .ls-case { transform: none !important; background: #fff !important; border: 1pt solid #b4b9b1; break-inside: avoid; }
  .ls-paper::before { display: none; }
  .ls-today .tape { display: none; }
  .ls-tpl pre { font-size: 10pt; background: #fff; }
  .ls-line input { font-size: 14pt; }
  .ls-line input::placeholder { color: transparent; }
  .ls-body a { text-decoration: none !important; }

  /* "Print the worksheet": only the worksheet section, on its own page */
  html.ls-print-sheet .ls-head, html.ls-print-sheet .ls-body > section:not(.ls-sec-sheet), html.ls-print-sheet .ls-sec-sheet > :not(.ls-sheet) { display: none !important; }
  html.ls-print-sheet .ls-layout { padding: 0; }
  html.ls-print-sheet .ls-sheet { border: 0; margin: 0; padding: 0; }
  html.ls-print-sheet .ls-checks label { padding: 7pt 0; min-height: 0; font-size: 10.5pt; }
}
@media (prefers-reduced-motion: reduce) { .ls-case, .ls-today, .ls-tool { transform: none; } }
