/* LFF module 1 — extends the approved lesson typography and editorial palette.
   Load after lesson.css. Every new surface is scoped to a module class. */

[data-module-lesson], [data-module-hub], [data-course-first] {
  --m-reading: 68ch;
  --m-quiet: #58624f;
  --m-rule: #cbd0c2;
  --m-good: #385627;
  --m-bad: #893d28;
}
[data-module-lesson], [data-module-hub] { overflow-wrap: break-word; }

/* Course navigation */
[data-module-lesson] .course-layout { grid-template-columns: 270px minmax(0, 1fr); }
[data-module-lesson] .course-sidebar { padding: 34px 20px 30px 24px; }
.m-lesson-nav { display: flex; flex-direction: column; gap: 7px; }
.m-lesson-link {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) 15px;
  gap: 4px 9px; align-items: start; min-height: 82px;
  padding: 15px 10px; border: 1px solid transparent;
  line-height: 1.45; transition: background .15s;
}
.m-lesson-link > .index, .m-lesson-link > .m-lesson-index { grid-column: 1; grid-row: 1 / 3; padding-top: 2px; font-size: 13px; color: var(--m-quiet); font-variant-numeric: tabular-nums; }
.m-lesson-link > span:nth-child(2) { display: flex; flex-direction: column; gap: 5px; min-width: 0; grid-column: 2; }
.m-lesson-link strong { grid-column: 2; font-size: 15px; line-height: 1.4; font-weight: 400; letter-spacing: -.015em; }
.m-lesson-link small { grid-column: 2; font-size: 13px; line-height: 1.5; color: var(--m-quiet); }
.m-lesson-link > [data-lesson-status] { grid-column: 3; grid-row: 1 / 3; align-self: center; font-size: 13px; line-height: 1; }
.m-lesson-link > div { grid-column: 2; min-width: 0; }
.m-lesson-link > div strong, .m-lesson-link > div small { display: block; }
.m-lesson-link > div small { margin-top: 5px; }
.m-lesson-link:hover { background: var(--soft); }
.m-lesson-link[aria-current="page"] { background: var(--ink); color: var(--paper); }
.m-lesson-link[aria-current="page"] > .index, .m-lesson-link[aria-current="page"] > .m-lesson-index, .m-lesson-link[aria-current="page"] > [data-lesson-status] { color: var(--lime); }
.m-lesson-link[aria-current="page"] small { color: #c6d0bb; }
.m-lesson-link[aria-current="page"]:focus-visible { outline-color: #65780a; }
.m-main { padding-top: 28px; padding-bottom: 0; }
.m-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; color: var(--m-quiet); font-size: 13px; line-height: 1.5; }
.m-breadcrumb a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #acb49f; }
.m-breadcrumb a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.m-savebar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 20px; padding: 13px 0 19px; margin-bottom: 26px; border-bottom: 1px solid var(--m-rule, #cbd0c2); }
.m-savebar p { max-width: 65ch; font-size: 13px; line-height: 1.6; color: var(--m-quiet, #58624f); }
.m-savebar a { display: inline-flex; align-items: center; min-height: 40px; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.m-savebar.m-savebarL1 { margin: 0; padding: 9px 42px; min-height: 59px; background: #eceee3; }
.m-savebarL1 p { max-width: 78ch; }
.m-savebarL1 a { flex-shrink: 0; }
.m-step-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--m-rule); }
.m-step-nav button { display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 65px; padding: 13px 14px; border: 0; border-right: 1px solid var(--m-rule); border-radius: 0; background: transparent; text-align: left; line-height: 1.45; }
.m-step-nav button:last-child { border-right: 0; }
.m-step-nav button > span { flex: 0 0 auto; font-size: 13px; color: var(--m-quiet); font-variant-numeric: tabular-nums; }
.m-step-nav button > strong { font-size: 14px; line-height: 1.45; font-weight: 400; letter-spacing: -.01em; }
.m-step-nav button:hover { background: var(--soft); }
.m-step-nav button[aria-current="step"], .m-step-nav button[aria-selected="true"], .m-step-nav button.is-current { background: var(--lime); }
.m-step-nav button[aria-current="step"] > strong, .m-step-nav button[aria-selected="true"] > strong, .m-step-nav button.is-current > strong { font-weight: 700; }
.m-step-nav button[aria-current="step"] > span, .m-step-nav button[aria-selected="true"] > span, .m-step-nav button.is-current > span { color: var(--ink); }
.m-panel { min-width: 0; padding-top: clamp(34px, 4vw, 52px); animation: m-panel-in .2s ease-out; }
.m-panel > .eyebrow { color: var(--m-quiet); margin-bottom: 18px; }
.m-title { max-width: 19ch; margin: 0; font-size: clamp(38px, 4.2vw, 62px); line-height: 1.08; letter-spacing: -.047em; text-wrap: balance; }
.m-panel > .chapter-lead { margin-top: 24px; margin-bottom: 35px; max-width: var(--m-reading); font-size: 19px; line-height: 1.7; color: var(--m-quiet); }
.m-panel > p:not(.eyebrow):not(.chapter-lead) { max-width: var(--m-reading); margin-block: 21px; }
.m-panel > h3 { max-width: 30ch; margin-top: 37px; margin-bottom: 19px; font-size: 29px; line-height: 1.2; letter-spacing: -.035em; }
.m-panel > ul, .m-panel > ol { max-width: var(--m-reading); padding-left: 24px; margin-block: 22px; }
.m-panel li + li { margin-top: 9px; }
.m-panel p > a, .m-panel li > a { text-decoration: underline; text-underline-offset: 4px; }
.m-panel :is(h1, h2, h3, h4, p, li, dd, label) { overflow-wrap: break-word; }
.m-panel small { line-height: 1.65; }

/* Reading rhythm: evidence, concrete examples, then a clear decision. */
.m-story { max-width: var(--m-reading); margin-block: 30px; padding: 28px 0 28px 25px; border-left: 3px solid #99a784; }
.m-story > .eyebrow { margin-bottom: 15px; color: var(--m-quiet); }
.m-story h3 { margin-bottom: 17px; font-size: 30px; line-height: 1.2; }
.m-story p { font-size: 18px; line-height: 1.75; }
.m-story p + p { margin-top: 15px; }
.m-story strong { font-weight: 700; }
.m-contrast { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-block: 33px; border-block: 1px solid var(--m-rule); }
.m-contrast > * { min-width: 0; padding: 27px 25px; }
.m-contrast > :first-child { padding-left: 0; border-right: 1px solid var(--m-rule); }
.m-contrast > :last-child { padding-right: 0; }
.m-contrast :is(h3, h4) { margin-bottom: 15px; font-size: 24px; line-height: 1.25; letter-spacing: -.03em; }
.m-contrast p { max-width: 36ch; font-size: 17px; line-height: 1.7; }
.m-contrast p + p { margin-top: 13px; }
.m-contrast > * > span, .m-contrast > * > small { display: block; margin-bottom: 11px; font-size: 13px; color: var(--m-quiet); }
.m-contrast:has(> :nth-child(3)) { grid-template-columns: 1fr; }
.m-contrast:has(> :nth-child(3)) > * { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.3fr); gap: 26px; padding: 25px 0; border-right: 0; }
.m-contrast:has(> :nth-child(3)) > * + * { border-top: 1px solid var(--m-rule); }
.m-contrast:has(> :nth-child(3)) :is(h3, h4) { margin-bottom: 0; }
.m-contrast:has(> :nth-child(3)) p { max-width: none; }
.m-receipt { min-width: 0; margin-block: 30px; padding: 28px 30px; background: var(--white); border: 1px solid var(--m-rule); box-shadow: 0 8px 0 -5px #dcdfd4; }
.m-receipt h3 { margin-bottom: 21px; font-size: 28px; line-height: 1.2; }
.m-receipt > .eyebrow { margin-bottom: 16px; color: var(--m-quiet); }
.m-receipt p { max-width: var(--m-reading); font-size: 17px; line-height: 1.7; }
.m-receipt p + p { margin-top: 14px; }
.m-receipt dl { margin: 0; }
.m-receipt dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; border-bottom: 1px solid #e0e4d7; padding: 13px 0; }
.m-receipt dt { min-width: 0; color: var(--m-quiet); font-size: 16px; line-height: 1.55; }
.m-receipt dd { flex-shrink: 0; margin: 0; font-size: 18px; font-variant-numeric: tabular-nums; text-align: right; }
.m-receipt dl > div:last-child { border-bottom: 0; }
.m-receipt .receipt-lines { margin: 0; }
.m-receipt .receipt-lines > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: baseline; }
.m-receipt .receipt-lines dt { max-width: none; }
.m-receipt .receipt-lines dd { min-width: 0; white-space: normal; line-height: 1.6; overflow-wrap: break-word; }
.m-receipt .receipt-lines + p { margin-top: 19px; }
.m-receipt ul, .m-receipt ol { padding-left: 22px; font-size: 17px; }
.m-callout, .m-takeaway { margin-block: 30px; padding: 25px 28px; background: var(--soft); border-left: 3px solid #8b9a6e; }
.m-callout h3, .m-takeaway h3 { font-size: 24px; line-height: 1.25; margin-bottom: 14px; }
.m-callout p, .m-takeaway p { max-width: var(--m-reading); font-size: 17px; line-height: 1.75; }
.m-callout p + p, .m-takeaway p + p { margin-top: 12px; }
.m-callout > strong, .m-takeaway > strong { display: block; font-size: 19px; line-height: 1.5; margin-bottom: 9px; }
.m-takeaway { background: #ebefcc; border-left-color: #738126; }
.m-callout ul, .m-takeaway ul { padding-left: 21px; font-size: 17px; }
.m-table { margin-block: 28px; width: 100%; max-width: 100%; font-size: 15px; line-height: 1.65; }
table.m-table, .m-table table, .m-schedule table { width: 100%; border-collapse: collapse; text-align: left; }
table.m-table, .m-table:not(table), .m-schedule { display: block; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.m-table table, .m-schedule table { min-width: 510px; }
.m-table :is(th, td), .m-schedule :is(th, td) { padding: 15px 17px; border-bottom: 1px solid var(--m-rule); vertical-align: top; }
.m-table th, .m-schedule th { background: var(--soft); font-weight: 700; line-height: 1.5; }
.m-table td { color: #454e3c; }
.m-table caption, .m-schedule caption { font-size: 15px; text-align: left; line-height: 1.6; font-weight: 700; margin-bottom: 14px; }
.m-table tr:last-child td, .m-schedule tr:last-child td { border-bottom: 0; }
.m-choices { display: flex; flex-direction: column; margin-top: 29px; border-top: 1px solid var(--m-rule); }
.m-choices button { display: flex; gap: 18px; align-items: baseline; width: 100%; min-height: 76px; padding: 22px 20px; background: transparent; border: 0; border-bottom: 1px solid var(--m-rule); border-radius: 0; text-align: left; font-size: 18px; line-height: 1.6; transition: background .15s; }
.m-choices button:hover { background: var(--soft); }
.m-choices button[aria-pressed="true"], .m-choices button.is-selected { background: var(--lime); }
.m-choices button > span:first-child:not(:last-child) { flex-shrink: 0; font-size: 14px; color: var(--m-quiet); }
.m-choices button small { display: block; font-size: 14px; color: var(--m-quiet); margin-top: 5px; }
.m-choices button:has(> strong) { display: block; }
.m-choices button > strong { display: block; font-size: 18px; line-height: 1.5; font-weight: 400; }
.m-choices button > strong + span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.65; color: var(--m-quiet); }
.m-panel .feedback { margin-top: 24px; max-width: none; padding: 24px 26px; font-size: 17px; line-height: 1.75; }
.m-panel .feedback[data-kind="warning"], .m-panel .feedback.is-warning { background: #f1e8d7; border-color: #997245; color: #61482c; }

/* Personal tools */
.m-tool { min-width: 0; margin-top: 36px; padding: 31px 32px 33px; border: 1px solid var(--m-rule); background: #eeefe5; }
.m-tool-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px 25px; padding-bottom: 24px; border-bottom: 1px solid #c4ccba; }
.m-tool-header > p { max-width: 44ch; font-size: 17px; line-height: 1.65; }
.m-tool-header h3 { font-size: 27px; line-height: 1.25; }
.m-tool-header > div { display: flex; flex-wrap: wrap; gap: 7px; }
.m-tool-header > div:first-child:not(.m-mode-buttons) { display: block; flex: 1 1 250px; }
.m-tool-header > div:first-child > .eyebrow { margin-bottom: 11px; color: var(--m-quiet); }
.m-tool-header > .m-mode-buttons { flex: 0 1 auto; }
.m-tool button[data-mode] { min-height: 44px; padding: 10px 14px; background: transparent; border: 1px solid #a8b29a; border-radius: 0; text-align: center; font-size: 13px; line-height: 1.4; }
.m-tool button[data-mode]:hover { background: #e2e8d7; }
.m-tool button[data-mode][aria-pressed="true"], .m-tool button[data-mode].is-active { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.m-tool-origin { margin: 20px 0 25px; max-width: var(--m-reading); font-size: 14px; line-height: 1.7; color: var(--m-quiet); }
.m-tool-origin a { text-decoration: underline; text-underline-offset: 4px; }
.m-formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 26px; align-items: start; margin-top: 25px; }
.m-formgrid > * { min-width: 0; }
.m-formgrid > .m-wide, .m-formgrid > .m-field-wide, .m-formgrid > .m-callout, .m-formgrid > .m-tool-origin, .m-formgrid > .m-formula { grid-column: 1 / -1; }
.m-field { display: flex; flex-direction: column; gap: 9px; min-width: 0; font-size: 15px; line-height: 1.55; }
.m-field > span { display: block; color: var(--ink); }
.m-field input, .m-field select, .m-field textarea { width: 100%; min-height: 56px; max-width: 100%; padding: 13px 15px; border: 1px solid #a9b39c; border-radius: 0; background: var(--white); color: var(--ink); font-size: 19px; line-height: 1.4; box-shadow: none; }
.m-field textarea { min-height: 113px; resize: vertical; font-size: 17px; line-height: 1.6; }
.m-field select { padding-right: 28px; font-size: 17px; }
.m-field input[type="date"] { min-width: 0; font-size: 17px; }
.m-field input[type="checkbox"], .m-field input[type="radio"] { min-height: 22px; width: 22px; height: 22px; accent-color: #526a26; }
.m-field input[readonly] { background: #e6eadc; border-style: dashed; color: #455039; }
.m-field input::placeholder, .m-field textarea::placeholder { color: #757e6d; opacity: 1; }
.m-field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--m-bad); background: #fff8f3; box-shadow: inset 0 0 0 1px var(--m-bad); }
.m-field > small { font-size: 13px; line-height: 1.65; color: var(--m-quiet); }
.m-field > small a { text-decoration: underline; text-underline-offset: 3px; }
.m-initial-check { display: flex; align-items: flex-start; gap: 13px; min-width: 0; margin-top: 25px; padding: 20px 21px; background: #e2e8d7; border: 1px solid #b7c4a2; font-size: 16px; line-height: 1.7; cursor: pointer; }
.m-initial-check input[type="checkbox"] { flex: 0 0 22px; width: 22px; height: 22px; min-height: 22px; margin: 3px 0 0; accent-color: #526a26; cursor: pointer; }
.m-initial-check > span { display: block; min-width: 0; }
.m-initial-check strong { font-weight: 700; }
.m-initial-check small { display: block; margin-top: 7px; color: #47583a; font-size: 13px; line-height: 1.7; }
.m-initial-check input[aria-invalid="true"] { outline: 2px solid #893d28; outline-offset: 3px; }
.m-initial-check.is-warning { background: #f3e4d9; border-color: #c4a58d; color: #70422c; }
.m-tool > .button, .m-tool > form > .button { margin-top: 27px; }
.m-tool .m-callout { background: #e3e8d9; margin-block: 25px; }
.m-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 31px; background: var(--ink); color: var(--paper); }
.m-metric { min-width: 0; padding: 26px 26px 28px; border-right: 1px solid #ffffff29; border-bottom: 1px solid #ffffff29; }
.m-metric:nth-child(2n) { border-right: 0; }
.m-results > .m-metric:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.m-metric > span { display: block; font-size: 14px; line-height: 1.6; color: #c5ceba; }
.m-metric > strong { display: block; margin-top: 13px; color: var(--lime); font-size: clamp(31px, 3.3vw, 46px); line-height: 1.12; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.m-metric > strong small { font-size: 16px; letter-spacing: 0; font-weight: 400; }
.m-metric > p { font-size: 14px; line-height: 1.65; color: #c5ceba; margin-top: 13px; }
.m-metric.is-negative > strong, .m-metric.is-warning > strong, .m-metric.negative > strong, .m-metric > strong.is-negative, .m-metric > strong.negative, .m-metric[data-kind="warning"] > strong { color: #ffb29a; }
.m-warning, .m-success { margin-block: 22px; padding: 19px 22px; font-size: 16px; line-height: 1.75; border-left: 3px solid #9e6840; background: #f3e4d9; color: #70422c; }
.m-success { background: #e3ebd5; border-color: #6c844a; color: var(--m-good); }
.m-warning strong, .m-success strong { color: inherit; }
.m-warning p + p, .m-success p + p { margin-top: 10px; }
.m-warning ul, .m-success ul { padding-left: 23px; margin: 10px 0 0; }
.m-formula { margin-top: 22px; font-size: 15px; line-height: 1.75; color: var(--m-quiet); font-variant-numeric: tabular-nums; }
.m-chart { margin-top: 26px; padding-block: 22px; border-block: 1px solid var(--m-rule); }
.m-chart > p, .m-chart > span { font-size: 14px; line-height: 1.65; color: var(--m-quiet); }
.m-chart-track { height: 14px; overflow: hidden; background: #d2d9c5; margin-block: 13px; }
.m-chart-track > span { display: block; max-width: 100%; height: 100%; background: #536c35; transition: width .2s ease; }
.m-schedule { margin-top: 27px; background: var(--white); border: 1px solid var(--m-rule); font-size: 15px; line-height: 1.65; font-variant-numeric: tabular-nums; }
.m-schedule table { min-width: 100%; }
.lesson-detail > .m-schedule { padding: 0; margin-top: 0; margin-bottom: 22px; }
.m-schedule caption { padding: 20px 17px 0; }
.m-plan-card { margin-top: 26px; padding: 27px 28px; border: 1px solid var(--m-rule); background: var(--white); }
.m-plan-card h3 { font-size: 29px; line-height: 1.2; margin-bottom: 18px; }
.m-plan-card h4 { font-size: 20px; line-height: 1.3; margin-block: 22px 11px; }
.m-plan-card p { max-width: var(--m-reading); font-size: 17px; line-height: 1.7; }
.m-plan-card p + p { margin-top: 13px; }
.m-plan-card ul, .m-plan-card ol { padding-left: 23px; font-size: 16px; line-height: 1.75; }
.m-plan-card li + li { margin-top: 10px; }
.m-plan-card .receipt-lines { margin: 22px 0; }
.m-plan-card .receipt-lines > div { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: baseline; }
.m-plan-card .receipt-lines dt { min-width: 0; max-width: none; }
.m-plan-card .receipt-lines dd { min-width: 0; white-space: normal; overflow-wrap: break-word; }
.m-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 25px; margin-block: 25px; }
.lesson-detail > .m-review-grid { padding-right: 0; }
.m-review-grid > label { display: flex; align-items: flex-start; gap: 11px; padding: 15px 0; font-size: 15px; line-height: 1.65; cursor: pointer; }
.m-review-grid input[type="checkbox"] { flex: 0 0 21px; height: 21px; width: 21px; margin-top: 3px; accent-color: #526a26; }
.m-review-grid .m-field { flex-direction: column; padding: 0; cursor: auto; }
.m-review-grid > div { min-width: 0; padding-top: 21px; border-top: 1px solid var(--m-rule); }
.m-review-grid > div h4 { font-size: 20px; line-height: 1.3; margin-bottom: 18px; }
.m-review-grid > div > label + label { margin-top: 18px; }
.m-finish { margin-top: 36px; padding-top: 27px; border-top: 1px solid var(--m-rule); }
.m-finish > h3 { font-size: 27px; line-height: 1.25; max-width: 36ch; margin-bottom: 17px; }
.m-finish > p { max-width: var(--m-reading); font-size: 17px; line-height: 1.7; margin-bottom: 21px; }
.m-finish > p[role="status"] { margin-top: 20px; font-size: 15px; }
.m-finish > p:empty { display: none; }
.m-finish > ul { margin-top: 20px; font-size: 15px; line-height: 1.75; padding-left: 22px; }
.m-finish .feedback { margin-top: 22px; }
.m-pagination { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding-block: 30px; margin-top: 44px; border-top: 1px solid var(--m-rule); }
.m-pagination > :first-child { margin-right: auto; }
.m-pagination :is(a, button) { min-height: 48px; }
.m-pagination > button:not(.button), .m-pagination > a:not(.button) { display: inline-flex; align-items: center; gap: 12px; padding: 10px 0; background: none; border: 0; text-align: left; font-size: 15px; line-height: 1.5; }
.m-pagination > .button { max-width: 65%; }
.m-related { display: flex; flex-wrap: wrap; gap: 8px 25px; margin-block: 24px; }
.m-related a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 5px; font-size: 15px; }
.m-sources { border-block: 1px solid var(--m-rule); margin-top: 30px; }
.m-sources > summary { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 65px; padding: 17px 0; font-size: 15px; line-height: 1.6; }
.m-sources > summary::after { content: "+"; font-size: 26px; font-weight: 400; line-height: 1; flex: 0 0 auto; }
.m-sources > summary > span[aria-hidden="true"] { display: none; }
.m-sources[open] > summary::after { content: "−"; }
.m-sources > :not(summary) { max-width: var(--m-reading); font-size: 14px; line-height: 1.8; color: var(--m-quiet); }
.m-sources > p { margin-bottom: 18px; }
.m-sources > ul { padding-left: 21px; margin-top: 0; margin-bottom: 23px; }
.m-sources a { text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.m-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 25px; padding-block: 25px 32px; font-size: 13px; line-height: 1.65; color: var(--m-quiet); }
.m-footer a { text-decoration: underline; text-underline-offset: 4px; }

/* Module overview: strong numbering and visible outcomes instead of a card wall. */
.module-hub { width: 100%; max-width: 1304px; margin-inline: auto; padding: 45px 32px 0; }
.m-hub-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .75fr); gap: clamp(36px, 5vw, 78px); align-items: stretch; padding-block: 25px 48px; }
.m-hub-hero h1 { max-width: 15ch; margin-top: 24px; font-size: clamp(45px, 5.2vw, 74px); line-height: 1.04; letter-spacing: -.05em; text-wrap: balance; }
.m-hub-lead { max-width: 53ch; margin-top: 27px; font-size: 19px; line-height: 1.75; color: var(--m-quiet); }
.m-hub-hero > div > p:last-child:not(.eyebrow) { max-width: 57ch; }
.m-hub-aside { min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 38px; background: var(--ink); color: var(--paper); }
.m-hub-aside > strong, .m-hub-aside .m-hub-number { display: block; font-size: clamp(88px, 10vw, 142px); line-height: .95; letter-spacing: -.06em; font-weight: 700; color: var(--lime); }
.m-hub-aside > span { font-size: 17px; line-height: 1.5; margin-top: 15px; }
.m-hub-aside > p { margin-top: 24px; max-width: 26ch; font-size: 16px; line-height: 1.75; color: #cad2bf; }
.m-hub-aside > small { font-size: 13px; line-height: 1.6; margin-top: 24px; color: #cad2bf; }
.m-hub-photo { min-height: 345px; max-height: 530px; min-width: 0; position: relative; overflow: hidden; background: var(--soft); }
.m-hub-photo img { height: 100%; width: 100%; object-fit: cover; object-position: center; }
.m-hub-photo figcaption { position: absolute; right: 0; bottom: 0; left: 0; padding: 40px 22px 19px; color: var(--paper); background: linear-gradient(transparent, #20231fd9); font-size: 12px; line-height: 1.55; }
.m-hub-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 17px 24px; margin-top: 29px; }
.m-hub-actions > a:not(.button), .m-hub-actions > button:not(.button) { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; line-height: 1.5; text-decoration: underline; text-underline-offset: 5px; }
.m-hub-progress { padding-block: 0 30px; }
.m-hub-progress > p { max-width: 78ch; font-size: 14px; line-height: 1.75; color: var(--m-quiet); }
.m-hub-progress > p:first-child { font-size: 17px; color: var(--ink); }
.module-hub > .m-callout h2 { font-size: 30px; line-height: 1.2; max-width: 30ch; margin-bottom: 19px; }
.module-hub > .m-callout .button { margin-top: 25px; }
.m-progressbar { height: 5px; background: #d5d9cb; overflow: hidden; margin-block: 13px 20px; }
.m-progressbar > span { display: block; height: 100%; max-width: 100%; background: #586c33; transition: width .2s ease; }
.m-hub-aside .m-progressbar { align-self: stretch; width: 100%; background: #ffffff25; margin-block: 20px 0; }
.m-hub-aside .m-progressbar > span { background: var(--lime); }
.m-course-list { border-top: 1px solid var(--m-rule); }
.m-course-card { display: grid; grid-template-columns: 77px minmax(0, 1fr) 54px; gap: 27px; align-items: start; padding: 33px 18px 34px 0; border-bottom: 1px solid var(--m-rule); transition: background .15s; }
.m-course-card:hover { background: #eceee2; }
.m-course-number { padding-top: 2px; font-size: 48px; line-height: 1.05; letter-spacing: -.05em; color: #7b866b; font-variant-numeric: tabular-nums; }
.m-course-copy { min-width: 0; }
.m-course-copy > .eyebrow { display: block; font-size: 13px; line-height: 1.5; color: var(--m-quiet); margin-bottom: 11px; }
.m-course-copy h2 { max-width: 35ch; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.2; letter-spacing: -.035em; }
.m-course-copy > p { max-width: 65ch; margin-top: 13px; font-size: 17px; line-height: 1.7; color: var(--m-quiet); }
.m-course-copy .m-outcome { display: block; max-width: 70ch; margin-top: 16px; font-size: 14px; line-height: 1.65; color: #47523c; }
.m-outcome > strong { font-weight: 700; }
.m-course-copy > small { display: block; font-size: 13px; margin-top: 12px; line-height: 1.6; color: var(--m-quiet); }
.m-course-arrow { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1px solid #a3ae96; font-size: 25px; line-height: 1; margin-top: 5px; }
.m-course-card:hover .m-course-arrow { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.m-course-card [data-lesson-status] { display: inline-block; width: fit-content; font-size: 13px; line-height: 1.5; margin-top: 14px; color: #3f5628; }
.m-course-card.is-complete .m-course-number { color: #4a6635; }
.m-course-card[aria-current="page"] { background: #e9eddb; }
.m-data-panel { margin-top: 40px; padding: 27px 0; border-block: 1px solid var(--m-rule); }
.m-data-panel h2 { font-size: 25px; line-height: 1.25; margin-bottom: 13px; }
.m-data-panel p { max-width: 76ch; font-size: 15px; line-height: 1.75; color: var(--m-quiet); }
.m-data-panel p + p { margin-top: 12px; }
.m-data-panel > button, .m-data-panel .m-confirm button { min-height: 44px; background: transparent; border: 1px solid #aab59b; padding: 11px 16px; font-size: 14px; line-height: 1.5; text-align: left; }
.m-data-panel > button { margin-top: 21px; }
.m-data-panel > button:hover, .m-data-panel .m-confirm button:hover { background: var(--soft); }
.m-confirm { margin-top: 20px; padding: 21px 23px; background: #f0e7dc; border-left: 3px solid #98704b; }
.m-confirm p { color: #694b31; margin-bottom: 15px; }
.m-confirm button { margin-right: 9px; margin-top: 8px; }
.m-confirm button[data-confirm-clear], .m-confirm .button-danger { background: #803c2b; border-color: #803c2b; color: var(--white); }

/* Responsive reading and input surfaces. */
@media (max-width: 1180px) {
  [data-module-lesson] .course-layout { grid-template-columns: 238px minmax(0, 1fr); }
  [data-module-lesson] .course-sidebar { padding-inline: 17px; }
  .m-main { padding-inline: 32px; }
  .m-lesson-link { padding-inline: 8px; gap: 4px 7px; grid-template-columns: 22px minmax(0, 1fr) 12px; }
  .m-lesson-link strong { font-size: 14px; }
  .m-step-nav button { padding-inline: 11px; gap: 8px; }
  .m-step-nav button strong { font-size: 13px; }
  .m-tool { padding: 27px 25px; }
  .m-tool-header { flex-direction: column; }
  .m-tool-header > div:first-child:not(.m-mode-buttons) { flex-basis: auto; }
  .m-tool-header > p { max-width: var(--m-reading); }
  .m-metric { padding: 24px 21px; }
}
@media (max-width: 960px) and (min-width: 901px) {
  [data-module-lesson] .course-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); }
  [data-module-lesson] .course-sidebar { position: sticky; top: 0; min-height: calc(100vh - 90px); max-height: 100vh; overflow-y: auto; border-right: 1px solid var(--m-rule); padding-top: 28px; }
  [data-module-lesson] .course-sidebar .sidebar-heading { display: flex; padding-bottom: 20px; }
  [data-module-lesson] .course-sidebar .sidebar-progress { display: block; position: static; width: auto; }
  [data-module-lesson] .course-sidebar .sidebar-note { display: block; }
}
@media (max-width: 900px) {
  [data-module-lesson] .course-layout { display: block; }
  [data-module-lesson] .course-sidebar { position: static; min-height: 0; max-height: none; border-right: 0; border-bottom: 1px solid var(--m-rule); padding: 16px 26px 13px; overflow: visible; }
  [data-module-lesson] .course-sidebar .sidebar-heading { display: none; }
  .m-lesson-nav { display: flex; flex-direction: row; gap: 8px; overflow-x: auto; padding: 4px 4px 10px; margin-inline: -4px; scroll-snap-type: x proximity; scroll-padding-inline: 4px; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .m-lesson-link { grid-template-columns: 20px minmax(0, 1fr) 11px; flex: 0 0 192px; gap: 3px 8px; min-height: 73px; padding: 11px 12px; scroll-snap-align: start; border-color: var(--m-rule); }
  .m-lesson-link strong { font-size: 13px; line-height: 1.4; }
  .m-lesson-link small { font-size: 12px; }
  .m-lesson-link > .index, .m-lesson-link > .m-lesson-index { font-size: 12px; }
  [data-module-lesson] .course-sidebar .sidebar-progress, [data-module-lesson] .course-sidebar .sidebar-note, [data-module-lesson] .course-sidebar .support-link { display: none; }
  .m-main { padding: 25px 30px 0; }
  .m-title { font-size: clamp(38px, 6.3vw, 55px); max-width: 22ch; }
  .m-tool-header { flex-direction: row; flex-wrap: wrap; }
  .m-step-nav button { padding: 14px; }
  .m-step-nav button strong { font-size: 14px; }
  .m-hub-hero { grid-template-columns: minmax(0, 1.25fr) minmax(220px, .7fr); gap: 32px; }
  .m-hub-hero h1 { font-size: clamp(42px, 6vw, 58px); }
  .m-hub-aside { padding: 28px; }
  .m-hub-aside > strong, .m-hub-aside .m-hub-number { font-size: 100px; }
  .m-hub-lead { font-size: 18px; }
  .m-course-card { grid-template-columns: 63px minmax(0, 1fr) 45px; gap: 21px; }
  .m-course-number { font-size: 41px; }
}
@media (max-width: 600px) {
  [data-module-lesson], [data-module-hub] { font-size: 17px; }
  [data-module-lesson] .course-sidebar { padding: 12px 20px 7px; }
  .m-lesson-link { flex-basis: 174px; min-height: 70px; }
  .m-main { padding: 20px 20px 0; }
  .m-breadcrumb { font-size: 12px; gap: 4px 8px; }
  .m-savebar { padding-top: 8px; padding-bottom: 16px; margin-bottom: 22px; gap: 6px 16px; }
  .m-savebar p { font-size: 12px; }
  .m-savebar a { min-height: 36px; font-size: 13px; }
  .m-savebar.m-savebarL1 { padding: 11px 20px; gap: 3px 16px; }
  .m-savebarL1 p { font-size: 12px; line-height: 1.65; }
  .m-step-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-step-nav button { min-height: 55px; padding: 12px; gap: 10px; }
  .m-step-nav button:nth-child(2) { border-right: 0; }
  .m-step-nav button:nth-child(-n+2) { border-bottom: 1px solid var(--m-rule); }
  .m-step-nav button > strong { font-size: 13px; }
  .m-panel { padding-top: 34px; }
  .m-panel > .eyebrow { font-size: 12px; margin-bottom: 17px; }
  .m-title { font-size: clamp(34px, 8.8vw, 48px); line-height: 1.1; letter-spacing: -.04em; }
  .m-panel > .chapter-lead { margin-top: 22px; margin-bottom: 29px; font-size: 18px; line-height: 1.75; }
  .m-panel > h3 { font-size: 27px; margin-top: 31px; }
  .m-story { margin-block: 27px; padding: 18px 0 18px 19px; }
  .m-story h3 { font-size: 27px; }
  .m-story p { font-size: 17px; line-height: 1.75; }
  .m-contrast { grid-template-columns: 1fr; margin-block: 27px; }
  .m-contrast > *, .m-contrast > :first-child, .m-contrast > :last-child { padding: 22px 0; border-right: 0; }
  .m-contrast > * + * { border-top: 1px solid var(--m-rule); }
  .m-contrast:has(> :nth-child(3)) > * { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .m-contrast p { max-width: none; }
  .m-receipt { padding: 23px 20px; margin-block: 27px; }
  .m-receipt h3 { font-size: 25px; }
  .m-receipt dl > div { gap: 15px; }
  .m-receipt dt { font-size: 15px; }
  .m-receipt dd { font-size: 17px; }
  .m-callout, .m-takeaway { padding: 22px 20px; margin-block: 26px; }
  .m-callout h3, .m-takeaway h3 { font-size: 23px; }
  .m-callout p, .m-takeaway p { font-size: 16px; }
  .m-table { font-size: 14px; }
  .m-table :is(th, td), .m-schedule :is(th, td) { padding: 13px 14px; }
  .m-choices { margin-top: 25px; }
  .m-choices button { min-height: 75px; padding: 20px 13px; gap: 13px; font-size: 17px; line-height: 1.65; }
  .m-choices button > span:first-child:not(:last-child) { font-size: 13px; }
  .m-choices button > strong { font-size: 17px; }
  .m-panel .feedback { padding: 21px 20px; font-size: 16px; }
  .m-tool { margin-top: 29px; padding: 24px 19px; }
  .m-tool-header { flex-direction: column; gap: 19px; padding-bottom: 21px; }
  .m-tool-header > p { font-size: 16px; }
  .m-tool-header > div { width: 100%; gap: 8px; }
  .m-tool-header > div:first-child:not(.m-mode-buttons) { flex-basis: auto; }
  .m-tool button[data-mode] { flex: 1 1 auto; padding-inline: 11px; font-size: 13px; }
  .m-tool-origin { font-size: 13px; margin-block: 19px 23px; }
  .m-formgrid, .m-review-grid { grid-template-columns: 1fr; gap: 24px; }
  .m-field { font-size: 15px; }
  .m-field input, .m-field select { min-height: 56px; font-size: 18px; padding-inline: 13px; }
  .m-field select, .m-field input[type="date"] { font-size: 16px; }
  .m-field > small { font-size: 13px; }
  .m-initial-check { padding: 18px 16px; gap: 11px; font-size: 15px; }
  .m-initial-check small { font-size: 13px; }
  .m-results { grid-template-columns: 1fr; margin-top: 27px; }
  .m-metric { padding: 24px 22px; border-right: 0; }
  .m-metric:last-child { border-bottom: 0; }
  .m-metric > strong { font-size: 42px; margin-top: 11px; }
  .m-metric > span, .m-metric > p { font-size: 14px; }
  .m-warning, .m-success { font-size: 15px; padding: 18px; }
  .m-formula { font-size: 14px; line-height: 1.8; }
  .m-schedule { font-size: 14px; }
  .m-plan-card { padding: 24px 20px; }
  .m-plan-card h3 { font-size: 27px; }
  .m-plan-card p { font-size: 16px; }
  .m-plan-card ul, .m-plan-card ol { font-size: 15px; }
  .m-review-grid { gap: 8px; }
  .m-review-grid > label { padding-block: 11px; }
  .m-review-grid .m-field { margin-block: 7px; }
  .m-finish { margin-top: 31px; padding-top: 24px; }
  .m-finish > .button { width: 100%; }
  .m-pagination { flex-wrap: wrap; gap: 16px; margin-top: 34px; padding-block: 24px; }
  .m-pagination > .button { max-width: 100%; width: 100%; }
  .m-related { gap: 4px 20px; margin-block: 19px; }
  .m-related a { font-size: 14px; }
  .m-sources > summary { font-size: 14px; }
  .m-sources > :not(summary) { font-size: 13px; }
  .m-footer { font-size: 12px; padding-block: 23px 27px; }
  .module-hub { padding: 26px 20px 0; }
  .m-hub-hero { grid-template-columns: 1fr; gap: 31px; padding-block: 16px 34px; }
  .m-hub-hero h1 { max-width: 15ch; margin-top: 20px; font-size: clamp(40px, 10.4vw, 59px); }
  .m-hub-lead { font-size: 18px; margin-top: 23px; }
  .m-hub-aside { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px 21px; padding: 25px 26px; }
  .m-hub-aside > strong, .m-hub-aside .m-hub-number { grid-column: 1; grid-row: 1 / 4; align-self: center; font-size: 79px; }
  .m-hub-aside > span { grid-column: 2; font-size: 16px; margin-top: 0; }
  .m-hub-aside > p { grid-column: 2; max-width: none; font-size: 14px; line-height: 1.65; margin-top: 6px; }
  .m-hub-aside > small { grid-column: 2; margin-top: 6px; font-size: 12px; }
  .m-hub-aside .m-progressbar { grid-column: 1 / -1; margin-top: 17px; }
  .m-hub-photo { min-height: 250px; max-height: 340px; aspect-ratio: 1.45; }
  .m-hub-actions { margin-top: 25px; gap: 12px 20px; }
  .m-hub-actions .button { width: 100%; }
  .m-course-card { grid-template-columns: 36px minmax(0, 1fr); gap: 16px; padding: 27px 0 29px; }
  .m-course-number { font-size: 30px; padding-top: 1px; }
  .m-course-copy h2 { font-size: 25px; line-height: 1.22; }
  .m-course-copy > p { font-size: 16px; margin-top: 12px; }
  .m-course-copy .m-outcome { font-size: 13px; line-height: 1.7; margin-top: 13px; }
  .m-course-arrow { grid-column: 2; width: 44px; height: 44px; margin-top: 0; font-size: 23px; }
  .m-course-card [data-lesson-status] { font-size: 12px; }
  .m-data-panel { margin-top: 31px; padding-block: 24px; }
  .m-data-panel h2 { font-size: 23px; }
  .module-hub > .m-callout h2 { font-size: 26px; }
  .m-data-panel p { font-size: 14px; }
  .m-confirm { padding: 20px 18px; }
}
@media (max-width: 380px) {
  [data-module-lesson] .course-sidebar { padding-inline: 16px; }
  .m-main, .module-hub { padding-inline: 16px; }
  .m-savebar.m-savebarL1 { padding-inline: 16px; }
  .m-title { font-size: 33px; }
  .m-step-nav button { padding: 11px 9px; gap: 7px; }
  .m-step-nav button > strong { font-size: 12px; }
  .m-tool { padding-inline: 15px; }
  .m-metric { padding-inline: 19px; }
  .m-metric > strong { font-size: 37px; }
  .m-receipt { padding-inline: 17px; }
  .m-receipt dt { font-size: 14px; }
  .m-receipt dd { font-size: 16px; }
  .m-hub-aside { padding: 23px 20px; gap: 6px 16px; grid-template-columns: 62px minmax(0, 1fr); }
  .m-hub-aside > strong, .m-hub-aside .m-hub-number { font-size: 72px; }
  .m-course-card { grid-template-columns: 29px minmax(0, 1fr); gap: 13px; }
  .m-course-number { font-size: 27px; }
  .m-course-copy h2 { font-size: 23px; }
}
@keyframes m-panel-in { from { opacity: .3; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  [data-module-lesson], [data-module-hub] { scroll-behavior: auto; }
  .m-panel { animation: none; }
  .m-step-nav button, .m-lesson-link, .m-choices button, .m-course-card, .m-progressbar > span, .m-chart-track > span { transition: none; }
}

/* v13 : examiner les hypothèses et retrouver son prochain pas. */
.m-scenario-inputs { margin-top: 28px; }
.m-scenario-inputs > .m-field { max-width: 38ch; margin: 24px 0; }
.m-scenario-result { margin-top: 30px; padding-top: 27px; border-top: 1px solid var(--m-rule); }
.m-scenario-result h4 { margin-top: 14px; font-size: 25px; line-height: 1.3; letter-spacing: -.025em; }
.m-review-grid { align-items: start; }
.m-review-week { min-width: 0; padding: 18px; background: var(--white); border: 1px solid var(--m-rule); }
.m-review-week > summary { display: flex; justify-content: space-between; gap: 15px; font-size: 18px; cursor: pointer; list-style: none; }
.m-review-week > summary::-webkit-details-marker { display: none; }
.m-review-week[open] > summary { margin-bottom: 24px; }
.m-review-week > .m-field + .m-field, .m-review-week > [data-legacy-week] { margin-top: 20px; }
.m-next-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 27px 0; }
.m-next-actions > div { min-width: 0; padding: 24px; border: 1px solid var(--m-rule); background: var(--white); }
.m-next-actions p:not(.eyebrow) { margin-block: 15px; font-size: 20px; line-height: 1.6; overflow-wrap: anywhere; }
.m-next-actions a { display: inline-block; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
@media(max-width:600px){.m-next-actions { grid-template-columns: 1fr; gap: 14px; }.m-next-actions > div { padding: 20px; }.m-scenario-result h4 { font-size: 23px; }}
