/* Shared reading rules. Keep approved brand assets and the deliberately bad
   comparison example unchanged. All sizes are CSS pixels at normal zoom. */
:root { --reading-pad: 32px; --reading-measure: 44rem; --lesson-nav-height: 76px; }
.text-unit { display: inline-block; white-space: nowrap; }
.lesson-card, .worked-example, .example-panel, .prompt-panel { padding: var(--reading-pad); }
.lesson-card + #lesson-examples, .lesson-card + .beginner-start { margin-top: 28px; }
.lesson-shell .beginner-start { padding: var(--reading-pad); }
.lesson-card h1 { font-size: 32px; line-height: 1.45; font-weight: 700; }
.lesson-card h1, .beginner-start h2, .worked-example h2, .prompt-heading h2,
.example-panel > h2, .training-video-guide h3, .support-panel h2,
.visual-card h3, .sample-slide h3, .section-heading h2, .step-card h3 { text-wrap: balance; overflow-wrap: normal; word-break: normal; }
.beginner-start, .worked-example, .word-help { overflow-wrap: break-word; }
.beginner-start h2, .worked-example h2, .prompt-heading h2, .example-panel > h2 {
  font-size: 26px; line-height: 1.5; font-weight: 700; margin: 8px 0 20px;
}
.visual-card h3 { font-size: 18px; line-height: 1.55; font-weight: 700; }
.lesson-content { margin-top: 20px; gap: 20px; }
.lesson-summary { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-bottom: 16px; }
.lesson-summary > span { justify-self: start; font-size: 14px; font-weight: 700; }
.lesson-summary p { font-size: 18px; line-height: 1.7; }
.lesson-summary > div, .visual-context > div, .visual-card-body, .cover-support,
.worked-part p, .worked-action p, .worked-request pre, .beginner-start > p,
.start-steps p, .example-intro, .example-action, .copy-help ol { max-width: var(--reading-measure); }
.visual-card { padding: 16px; }
.visual-card p, .visual-card blockquote, .beginner-start p, .worked-example p,
.worked-request pre, .word-help dd, .copy-help, .quiz-choice-text, .prompt-block pre {
  font-size: 16px; line-height: 1.75;
}
.visual-card-body { gap: 12px; }
.visual-note { display: block; font-size: 16px; font-weight: 400; line-height: 1.75; padding: 16px; }
.visual-note > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.visual-context > span, .prompt-guide, .word-help summary span, .lesson-help summary small,
.chatgpt-fallback, .completion-card small, .worked-example .example-disclaimer,
.beginner-start .beginner-source, .page-detail, .resume-detail { font-size: 14px; line-height: 1.7; }
.first-message button, .worked-request button, .prompt-block-head button,
.chatgpt-button, .completion-card button { font-size: 16px; line-height: 1.5; padding-block: 12px; }
.worked-action, .first-message { padding: 16px; }
.worked-example h3 { font-size: 18px; line-height: 1.55; }
.word-help { margin: 0; padding: 0 14px; border-radius: 6px; }
.word-help summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; gap: 8px; min-height: 52px; padding-block: 10px; font-size: 16px; line-height: 1.5; font-weight: 700; list-style: none; }
.word-help summary::-webkit-details-marker { display: none; }
.word-help summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); align-self: center; }
.word-help[open] summary::after { transform: rotate(225deg); }
.word-help[open] summary { margin-bottom: 12px; }
.word-help dl { padding-bottom: 16px; }
.lesson-header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 20px; }
.lesson-header .back-link { order: 1; flex: 1 1 40%; }
.lesson-step-row { order: 2; flex: 0 1 auto; gap: 16px; flex-wrap: wrap; }
.lesson-step-row span { font-size: 16px; font-weight: 700; }
.lesson-step-row small { font-size: 14px; }
.lesson-step-title { order: 3; flex: 1 1 55%; margin: 0; font-size: 14px; line-height: 1.6; }
.lesson-header .outline-button { order: 4; flex: 0 1 auto; min-height: 44px; margin: 0; padding: 8px 12px; font-size: 14px; }
.lesson-header .page-progress { order: 5; flex-basis: 100%; margin-top: 8px; height: 4px; }
.brand-copy strong { text-wrap: balance; }
.lesson-tag { font-size: 14px; line-height: 1.5; font-weight: 700; margin-bottom: 12px; }
.lesson-jump-nav { font-size: 14px; line-height: 1.5; }
.lesson-jump-nav > span { display: block; color: var(--muted); margin-bottom: 8px; }
.lesson-jump-nav > div { display: flex; flex-wrap: wrap; gap: 8px; }
.lesson-jump-nav button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--green-text); font-size: 14px; font-weight: 700; cursor: pointer; }
.is-cover .lesson-jump-nav > span { color: #b7c6c2; }
.lesson-anchor { scroll-margin-top: 90px; }
.lesson-anchor:focus { outline: none; }
.lesson-anchor:focus-visible { outline: 3px solid var(--green-text); outline-offset: 4px; }
.quiz-completion { grid-template-columns: minmax(0,1fr); margin: 0; padding: 0; border: 0; border-radius: 0; }
.quiz-completion.is-complete { padding: 16px; border-radius: 8px; }
.quiz-completion button { justify-self: start; min-width: 190px; max-width: 100%; }
.quiz-options { margin-bottom: 24px; }
.completion-card > div > strong { text-wrap: balance; }
.lesson-help summary { flex-wrap: wrap; gap: 8px 16px; }
.lesson-help summary > span { flex: 1 1 14em; }
.prompt-full-text { border-top: 1px solid #46665d; }
.prompt-full-text summary { cursor: pointer; min-height: 48px; padding: 12px 16px; font-size: 16px; line-height: 1.5; font-weight: 600; }
.prompt-full-text pre { margin-top: 0; }
.prompt-guide { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 16px 0; padding-left: 1.5em; font-weight: 600; }
.prompt-guide li { padding-left: 2px; }
.prompt-intro { font-size: 16px; line-height: 1.75; max-width: var(--reading-measure); }
.sample-slide h3 { font-size: clamp(24px, 4vw, 36px); line-height: 1.45; }
.sample-picker { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.sample-picker button { min-width: 0; padding: 10px 6px; font-size: 14px; line-height: 1.5; }
.sample-picker button span { word-break: keep-all; }
.support-panel h2 { font-size: 32px; line-height: 1.45; }
.training-video-guide { padding: 16px; }
.lesson-nav { grid-template-columns: 1fr 1fr 1.5fr; }
.lesson-nav small { font-size: 14px; line-height: 1.5; text-wrap: balance; }
.lesson-nav a, .lesson-nav button { min-width: 0; padding: 6px 4px; }
body.is-lesson .site-footer { padding-bottom: calc(var(--lesson-nav-height) + 36px + env(safe-area-inset-bottom)); }
body.is-lesson .back-to-top { bottom: calc(var(--lesson-nav-height) + 24px + env(safe-area-inset-bottom)); }
html:has(body.is-lesson) { scroll-padding-bottom: calc(var(--lesson-nav-height) + 24px); }
@media (max-width: 719px) {
  :root { --reading-pad: 20px; }
  .lesson-shell { width: calc(100% - 32px); padding-top: 12px; }
  .lesson-card h1 { font-size: clamp(24px,6.5vw,26px); }
  .beginner-start h2, .worked-example h2, .prompt-heading h2, .example-panel > h2 { font-size: 22px; line-height: 1.5; }
  .beginner-start { padding: var(--reading-pad); }
  .lesson-anchor { scroll-margin-top: 16px; }
  .prompt-guide { display: grid; gap: 4px; }
  .support-panel h2 { font-size: 26px; }
}
@media (max-width: 620px) {
  .lesson-table tr { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .lesson-table tbody th { grid-column: 1 / -1; padding: 10px 12px; font-weight: 700; }
  .lesson-table td { min-width: 0; padding: 10px 8px; font-size: 16px; line-height: 1.65; border-bottom: 0; border-right: 1px solid var(--line); overflow-wrap: break-word; }
  .lesson-table td:last-child { border-right: 0; }
  .lesson-table td::before { font-size: 14px; line-height: 1.5; }
  .sample-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sample-picker button:last-child { grid-column: 1 / -1; }
  .sample-slide h3 { font-size: 24px; }
}
@media (max-width: 360px) {
  :root { --reading-pad: 16px; }
  .lesson-shell { width: calc(100% - 28px); }
  .word-help { padding-inline: 10px; }
  .word-help summary { gap: 6px; }
  .lesson-step-row { gap: 10px; }
  .lesson-table td { padding-inline: 5px; }
  .training-video-guide { padding: 12px; }
}
