/* Documentation and training. Loads after read.css. */
.docs-page .read { padding-top: 0; }
.docs-main.prose { max-width: none; }
.docs-main > section { scroll-margin-top: calc(var(--nav) + var(--s-5)); }
.docs-main > section > :is(p, ul, ol, h3, h4, .note, .table-wrap) { max-width: 60ch; }
.docs-main > section > .table-wrap { max-width: 100%; }
.docs-main h4 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
.docs-main h3 { margin-top: var(--s-7); }
.docs-main h3:first-of-type, .docs-main h2 + h3 { margin-top: var(--s-5); }
.docs-main li > ul, .docs-main li > ol { margin-top: var(--s-2); }
.docs-main kbd { white-space: nowrap; font: 500 16px/1 var(--font-text); padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
.docs-main code { font-size: 16px; }
.read__nav > p:not(:first-child) { margin-top: var(--s-4); }

/* a note: a tinted block with a plain title, no stripe */
.note { background: var(--surface); border-radius: 12px; padding: var(--s-4) var(--s-5); }
.note > strong { display: block; font-weight: 500; margin-bottom: var(--s-1); }
.note > p { margin: 0; }
.note + .note { margin-top: var(--s-3); }
.note--warn { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); }

/* tables that scroll on a phone */
.table-wrap { overflow-x: auto; }
.table-wrap table { overflow-wrap: break-word; }
.table-wrap th, .table-wrap td { padding-right: var(--s-4); }

/* a capture inside the text */
.doc-fig { margin-top: var(--s-5); }
.doc-fig.mat { max-width: 100%; }
.doc-fig--part { width: fit-content; max-width: 100%; }
.doc-fig--part .shotwin { width: var(--shot-w, 400px); max-width: 100%; }
.doc-fig .phone-only { margin-inline: auto; }

/* training: one video, its title, its line */
.lesson { display: grid; gap: var(--s-4); }
.lesson + .lesson { margin-top: var(--s-8); padding-top: var(--s-8); border-top: 1px solid var(--line); }
.lesson__frame { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface); }
.lesson__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.lesson h2 { margin: 0; }
.lesson p { max-width: none; }
.training-main { max-width: 860px; }
.training-playlist { margin-top: var(--s-8); padding-top: var(--s-8); border-top: 1px solid var(--line); display: grid; gap: var(--s-3); justify-items: start; }
.training-playlist h2 { margin: 0; }
.doc-fig--phone { display: flex; justify-content: center; width: fit-content; max-width: 100%; }
@media (max-width: 1023px) { .read { grid-template-columns: minmax(0, 1fr); } }
.read > * { min-width: 0; }
.docs-main p a, .docs-main li a { display: inline-block; padding-block: 17px; margin-block: -17px; }
@media (max-width: 480px) { .table-wrap th, .table-wrap td { padding-right: var(--s-2); } }
.docs-main > section > * + * { margin-top: var(--s-4); }
.docs-main > section > * + h3 { margin-top: var(--s-7); }
.docs-main > section > * + h4 { margin-top: var(--s-5); }
.docs-main > section > h2 + h3 { margin-top: var(--s-5); }
.docs-main > section > * + .doc-fig { margin-top: var(--s-5); }
.lesson h2, .training-playlist h2 { font-size: var(--t-h3); line-height: 1.2; }

/* three clear steps: h2 (26 to 32px, ruled), h3 (21px), h4 (18px) */
.docs-main h3 { font-size: 21px; line-height: 1.25; }
.docs-main :is(h2, h3, h4) { scroll-margin-top: calc(var(--nav) + var(--s-5)); }
@media (max-width: 1023px) { .docs-main :is(section, h2, h3, h4) { scroll-margin-top: calc(var(--nav) + 72px); } }
/* the topics of a chapter */
.chapter-topics { max-width: none !important; }
.chapter-topics > p { font-weight: 500; }
.chapter-topics ul { display: block; list-style: none; padding: 0; column-width: 15rem; column-gap: var(--s-5); margin-top: var(--s-2); }
.chapter-topics li { break-inside: avoid; }
.chapter-topics a { display: flex; align-items: center; min-height: 44px; padding-block: 0 !important; margin-block: 0 !important; }
.docs-main .back { margin-top: var(--s-6); }
/* a wide capture takes the column and its right margin */
@media (min-width: 1024px) { .docs-main .doc-fig:not(.doc-fig--part):not(.doc-fig--phone) { margin-right: -56px; } }

.lesson__poster { display: grid; gap: var(--s-4); justify-items: start; }
.lesson__poster > .mat { width: 100%; }
.lesson__phone { display: flex; justify-content: center; }
.lesson__frame { width: 100%; }

.lesson__steps a { display: inline-block; padding-block: 17px; margin-block: -17px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.lesson__steps a:hover { text-decoration-color: currentColor; }
@media (min-width: 900px) { .lesson__poster > .mat.lesson__phone { width: fit-content; max-width: 100%; } }
.lesson__frame:focus { outline: 2px solid var(--action); outline-offset: 2px; }
.docs-main > section > .table-wrap.table-wrap--two { max-width: 60ch; }
@media (max-width: 400px) { .table-wrap th, .table-wrap td { padding-right: 4px; } }

.docs-main > section > .doc-fig + :is(h3, h4) { margin-top: var(--s-7); }
.table-wrap--scroll table { min-width: 560px; }
.table-wrap--scroll th, .table-wrap--scroll td { padding-right: 16px; }

/* Polish, 2026-11-16. Table columns keep a gap on a phone, and the play button stands clear of the capture's shadow. */
.docs-main .table-wrap :is(th, td):not(:last-child) { padding-right: var(--s-4); }
.lesson__play { margin-top: var(--s-3); }
