/* Shared reading and figure styles for the SLP companion. */
.textbook-article { min-width: 0; }
.textbook-article .post-series-nav { flex-wrap: wrap; }
.textbook-article h1 { max-width: 27ch; }
.textbook-article .textbook-kicker { color: #087354; font: 700 .78rem/1.5 "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; margin-top: 1.2rem; }
.textbook-article .textbook-lead { font-size: 1.13rem; line-height: 1.75; margin: 1rem 0 1.4rem; }
.textbook-article a { text-underline-offset: .2em; }
.textbook-article :is(h2,h3) { scroll-margin-top: 7rem; }
.textbook-article #topics > ul > li { margin: .75rem 0; }
.textbook-article #topics ul ul { margin: .35rem 0 .2rem; }
.textbook-page { color: #4a5a53; font-size: .82rem; font-weight: 650; white-space: nowrap; margin-left: .3rem; }
.textbook-article :is(button,select,input,summary,a):focus-visible { outline: 3px solid #ae4b16; outline-offset: 4px; }
.textbook-callout { border-left: 4px solid #087354; background: #edf7f1; padding: 1rem 1.2rem; margin: 1.5rem 0; border-radius: 0 8px 8px 0; }
.textbook-callout p:first-child { margin-top: 0; }
.textbook-callout p:last-child { margin-bottom: 0; }
.textbook-equation { padding: 1rem 1.2rem; margin: 1.3rem 0; background: #f3efe6; border: 1px solid #d9cfba; border-radius: 8px; overflow-x: auto; font-family: Georgia, serif; font-size: 1.12rem; line-height: 1.8; }
.textbook-figure { margin: 1.6rem 0; padding: 1rem; background: #fffdf9; border: 1px solid #d9cfba; border-radius: 12px; }
.textbook-figure svg, .textbook-figure img { display: block; width: 100%; height: auto; margin: 0; }
.textbook-figure figcaption { font-size: .86rem; line-height: 1.65; color: #4a5a53; padding-top: .9rem; }
.textbook-figure figcaption strong { color: #13201a; }
.textbook-figure .figure-scroll { overflow-x: auto; }
.textbook-figure .figure-scroll > svg { min-width: 580px; }
.textbook-toc { padding: 1rem 1.2rem; margin: 1.4rem 0; border: 1px solid #d9cfba; border-radius: 8px; }
.textbook-toc ol { margin-bottom: 0; padding-left: 1.3rem; }
.textbook-toc li { padding: .2rem 0; }
.textbook-table-wrap { overflow-x: auto; margin: 1.4rem 0; }
.textbook-article table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.textbook-article caption { text-align: left; padding: .5rem 0 .8rem; font-weight: 700; }
.textbook-article th, .textbook-article td { padding: .7rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid #d9cfba; }
.textbook-article thead th { background: #edf2ec; }
.textbook-article tbody th { font-weight: 600; }
.textbook-check { margin: 1rem 0; padding: 1rem 1.1rem; background: #fffdf9; border: 1px solid #d9cfba; border-radius: 8px; }
.textbook-check summary { font-weight: 700; cursor: pointer; line-height: 1.55; }
.textbook-check[open] summary { margin-bottom: .8rem; }
.textbook-nav { display: flex; justify-content: space-between; gap: 1.4rem; border-top: 1px solid #d9cfba; margin-top: 2.5rem; padding-top: 1.3rem; }
.textbook-nav a { max-width: 48%; line-height: 1.6; }
.textbook-nav a:last-child { text-align: right; }
.textbook-lab { border: 1px solid #b5cbbf; background: #f5faf6; border-radius: 12px; padding: 1.2rem; margin: 1.5rem 0; }
.textbook-lab label { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; font-weight: 700; margin: .8rem 0; }
.textbook-lab input[type=range] { width: min(250px,100%); accent-color: #087354; }
.textbook-lab button, .textbook-lab select { font: inherit; border: 1px solid #a4b9ab; background: #fffdf9; color: #13201a; border-radius: 6px; padding: .5rem .7rem; cursor: pointer; }
.textbook-bars { display: grid; gap: .7rem; margin: 1.3rem 0; }
.textbook-bar-row { display: grid; grid-template-columns: 4.5rem minmax(0,1fr) 4rem; gap: .7rem; align-items: center; font-size: .92rem; }
.textbook-bar-track { background: #dae9df; height: 1.4rem; border-radius: 3px; }
.textbook-bar-fill { display: block; height: 100%; background: #087354; border-radius: 3px; }
.textbook-bar-row output { font-variant-numeric: tabular-nums; text-align: right; }
.textbook-lab .textbook-result { display: block; padding: .8rem 0; line-height: 1.65; }
.textbook-path { padding-left: 1.35rem; }
.textbook-path li { padding: .6rem 0 .9rem .4rem; }
.textbook-path li strong { display: block; }
.textbook-status { font-size: .78rem; font-weight: 700; color: #087354; white-space: nowrap; }
.textbook-status.planned { color: #665b47; }
.textbook-source { font-size: .9rem; color: #4a5a53; }
@media (max-width: 600px) {
 .textbook-figure { padding: .65rem; }
 .textbook-lab { padding: .9rem; }
 .textbook-article th, .textbook-article td { padding: .6rem .5rem; }
 .textbook-equation { padding: .8rem; font-size: 1rem; }
 .textbook-nav { flex-direction: column; }
 .textbook-nav a { max-width: 100%; }
 .textbook-nav a:last-child { align-self: flex-end; }
}

@media (max-width: 900px) {
 .blog-post-layout[data-mobile-sidebar].sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
 .blog-post-layout[data-mobile-sidebar].sidebar-collapsed .sidebar-toggle { width: 100%; min-height: 40px; margin-bottom: 0; justify-content: flex-start; padding: .5rem; }
 .blog-post-layout[data-mobile-sidebar].sidebar-collapsed .sidebar-toggle::after { content: "Explore chapters"; font: 600 .85rem "Manrope", sans-serif; }
}
