/* Course layouts extend the original site's shared Poppins typography and palette. */
[hidden] { display:none!important; }
.course-reader { background:var(--catalog); }
.course-reader main { width:min(1050px,calc(100% - 36px)); margin:0 auto; padding:30px 0 64px; min-height:65vh; }
.course-reader .section-title { text-align:left; font-size:inherit; letter-spacing:normal; font-weight:400; line-height:1.6; padding:18px 0 28px; margin:0; }
.course-reader main h1 { font-family:Poppins,sans-serif; font-size:clamp(30px,4vw,48px); font-weight:600; letter-spacing:-1px; line-height:1.25; margin:16px 0; overflow-wrap:anywhere; }
.course-reader main h2 { font-family:Poppins,sans-serif; font-weight:500; font-size:clamp(22px,2.5vw,28px); line-height:1.4; }
.course-reader .section-title>p:first-child { color:var(--muted); font-size:14px; }
.course-intro { color:var(--muted); font-size:16px; line-height:1.8; max-width:800px; margin-top:16px; }
.course-links { display:flex; flex-wrap:wrap; gap:12px 24px; align-items:center; font-size:14px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.course-links a { text-decoration:none; }
.course-links a:last-child { margin-left:auto; }
.course-links a:hover,.breadcrumbs a:hover,.reader-links a:hover { text-decoration:underline; }
.course-reader main>.breadcrumbs { display:none; } /* Return navigation is in the shared course bar. */
.course-reader .breadcrumbs { display:flex; flex-wrap:wrap; gap:8px; color:var(--muted); font-size:14px; line-height:1.8; }
.breadcrumbs a { text-decoration:none; }
.toolbar,.contents-tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; background:var(--panel); border:1px solid var(--line); border-radius:15px; font-size:14px; }
.toolbar nav,.reading-tools { display:flex; align-items:center; flex-wrap:wrap; gap:16px; }
.toolbar a { text-decoration:none; padding:9px 0; }
.toolbar a:hover { color:var(--accent); text-decoration:underline; }
button,select,input { font:inherit; color:var(--ink); }
select,input { border:1px solid var(--line); background:var(--paper); border-radius:8px; padding:10px 12px; font-size:14px; max-width:100%; min-height:44px; }
select { cursor:pointer; }
button { cursor:pointer; min-height:44px; border:1px solid var(--line); background:var(--catalog); padding:10px 14px; border-radius:8px; font-size:14px; }
a,select,summary,button { touch-action:manipulation; }
a:focus-visible,select:focus-visible,summary:focus-visible,input:focus-visible,button:focus-visible,.page-viewport:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
.reading-tools { gap:12px; }
.unavailable { color:var(--disabled); }
.search-form { display:flex; gap:12px; flex:1; min-width:0; }
.search-form input { flex:1; min-width:0; max-width:520px; }
.search-status { font-size:13px; color:var(--muted); margin:16px 4px 28px; }
.empty { padding:28px 0; color:var(--muted); font-size:16px; }
.chapter-group { margin:32px 0; background:var(--panel); border-radius:15px; padding:26px; border:1px solid var(--line); }
.chapter-heading { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
.chapter-heading h2 a { text-decoration:none; }
.chapter-heading h2 a:hover { text-decoration:underline; }
.small-link,.row-meta { color:var(--muted); font-size:13px; }
.section-list { list-style:none; padding:0; margin:0; }
.section-list li { border-top:1px solid var(--quiet-line); }
.section-list a { display:grid; grid-template-columns:48px 1fr auto; gap:16px; align-items:baseline; padding:17px 8px; text-decoration:none; font-size:16px; }
.section-list a:hover,.question-list a:hover { background:var(--catalog); color:var(--accent); }
.section-number { color:var(--muted); font-size:14px; }
.question-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:28px 0; }
.question-list a { display:flex; justify-content:space-between; gap:16px; padding:22px; border:1px solid var(--line); background:var(--panel); border-radius:12px; text-decoration:none; font-size:16px; }
.section-navigation,.reader-links { display:flex; justify-content:space-between; gap:24px; border-top:1px solid var(--line); padding-top:24px; margin-top:32px; font-size:14px; }
.section-navigation a { text-decoration:none; max-width:46%; }
.section-navigation a:last-child { text-align:right; }
.section-navigation span { display:block; color:var(--muted); font-size:13px; }
.course-reader article { padding:30px; margin-top:26px; background:var(--panel); border:1px solid var(--line); border-radius:15px; }
.page-viewport { overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; width:100%; background:transparent; }
.pdf-page { overflow:hidden; display:block; width:100%; height:auto; max-width:none; }
.enlarged .pdf-page { width:max(100%,1180px); }
details { margin-top:28px; }
summary { display:flex; align-items:center; gap:14px; list-style:none; cursor:pointer; padding:12px 20px; width:fit-content; min-height:46px; font-size:14px; font-weight:500; border:1px solid var(--line); border-radius:8px; color:var(--accent); background:var(--footer); }
summary::-webkit-details-marker { display:none; }
.indicator { font-size:20px; font-weight:400; }
.when-open { display:none; }
details[open] .when-open { display:inline; }
details[open] .when-closed { display:none; }
details[open] .indicator { font-size:0; }
details[open] .indicator::after { content:'−'; font-size:20px; }
details[open] summary { margin-bottom:24px; }
details[open] .page-viewport { padding-top:24px; border-top:1px solid var(--quiet-line); }
.pdf-continuation { margin-top:24px; padding-top:20px; border-top:1px solid var(--quiet-line); }
.reading-note { color:var(--muted); font-size:13px; margin:20px 4px 0; }
.reader-links a { text-decoration:none; }
.skip { position:fixed; top:-100px; left:16px; background:var(--paper); padding:12px; z-index:10; }
.skip:focus { top:12px; }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.no-script { font-size:14px; color:var(--muted); }
@media(max-width:781px) {
 .course-reader main { width:calc(100% - 28px); padding-top:20px; padding-bottom:40px; }
 .course-reader .page-header nav { font-size:14px; gap:18px; flex-wrap:wrap; }
 .course-reader .header-row { gap:12px; }
 .course-links { gap:10px 18px; font-size:12px; }
 .course-links a:last-child { margin-left:0; }
 .course-reader .section-title { padding:18px 4px 24px; }
 .course-reader .breadcrumbs { font-size:12px; }
 .course-intro { font-size:14px; }
 .toolbar,.contents-tools { padding:14px; gap:12px; }
 .toolbar nav { width:100%; justify-content:space-between; gap:6px; font-size:12px; }
 .toolbar nav select { max-width:160px; font-size:12px; }
 .reading-tools { width:100%; justify-content:space-between; gap:8px; border-top:1px solid var(--quiet-line); padding-top:12px; font-size:12px; }
 .reading-tools select { font-size:12px; padding:8px; }
 .search-form { flex-basis:100%; }
 .chapter-group { padding:18px 14px; margin:24px 0; }
 .section-list a { grid-template-columns:34px 1fr; gap:10px; padding:15px 2px; font-size:14px; }
 .section-list .row-meta { grid-column:2; margin-top:-6px; font-size:12px; }
 .question-list { gap:12px; }
 .question-list a { font-size:14px; padding:16px 12px; }
 .course-reader article { padding:18px 12px; }
 .enlarged .pdf-page { width:1000px; }
 .reader-links,.section-navigation { font-size:12px; gap:16px; }
}
@media(max-width:360px) { .toolbar nav select { max-width:130px; }.reading-tools { justify-content:flex-start; flex-wrap:wrap; }.question-list { grid-template-columns:1fr; } }
@media print {
 :root { --paper:#fff!important; --ink:#000!important; --panel:#fff!important; --muted:#444!important; --catalog:#fff!important; color-scheme:light!important; }
 .page-header,.site-footer,.course-links,.toolbar,.contents-tools,.search-status,.skip,.reader-links,.section-navigation,summary,.reading-note { display:none!important; }
 .course-reader main { width:100%; padding:0; }.course-reader article { border:0; padding:0; }.page-viewport { overflow:visible; }.pdf-page,.enlarged .pdf-page { width:100%; }details[open] .page-viewport { break-before:page; border:0; }
}
/* Native text and MathML: visible, selectable, and available without scripts. */
.readable-math { font-size:17px; line-height:1.8; overflow-wrap:break-word; }
.readable-math p { margin:16px 0; }.readable-math h2,.readable-math h3,.readable-math h4 { margin:24px 0 16px; }
.readable-math li { margin:10px 0; }.readable-math math { font-size:1.1em; }
.readable-math math[display="block"] { display:block; overflow-x:auto; max-width:100%; padding:12px 2px; margin:16px 0; }
.readable-math table { display:block; overflow-x:auto; max-width:100%; border-collapse:collapse; }.readable-math td,.readable-math th { padding:8px; }
.original-worksheet { border-top:1px solid var(--line); padding-top:24px; }.worksheet-note { font-size:14px;color:var(--muted);margin:12px 0 24px; }
.original-worksheet .page-viewport { margin-top:24px; }.worksheet-image { background:white; }
:root[data-theme="dark"] .worksheet-image { filter:invert(.91) hue-rotate(180deg); }
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .worksheet-image{filter:invert(.91) hue-rotate(180deg)}}
@media(max-width:781px){.readable-math{font-size:16px}.readable-math ol,.readable-math ul{padding-left:24px}.course-reader article.readable-article{padding:20px 16px}}

