@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap');
:root{--red:#be0000;--ink:#202020;--muted:#626262;--line:#dedede;--paper:#fff;--wash:#f6f6f4;color-scheme:light}
*{box-sizing:border-box}html{scroll-padding-top:7rem}body{margin:0;background:var(--paper);color:var(--ink);font:18px/1.65 'Source Sans 3','Segoe UI',sans-serif}a{color:var(--red);text-underline-offset:.2em}a:hover{text-decoration-thickness:2px}button,input{font:inherit}button{cursor:pointer}a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--red);outline-offset:4px}.skip-link{position:absolute;left:1rem;top:-5rem;background:#fff;padding:1rem;z-index:100}.skip-link:focus{top:1rem}
.site-header{border-top:5px solid var(--red);border-bottom:1px solid var(--line);background:#fff}.header-inner{max-width:1440px;margin:auto;padding:20px 40px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:14px;text-decoration:none;color:var(--ink);font-weight:700;line-height:1.2;white-space:nowrap}.brand img{width:42px;height:48px;object-fit:contain}.brand-sub{display:block;font-size:12px;font-weight:500;margin-top:7px}.site-header nav{display:flex;flex-wrap:wrap;gap:22px;font-size:15px;font-weight:600}.site-header nav a{color:var(--ink);text-decoration:none;padding:6px 0;border-bottom:2px solid transparent}.site-header nav a[aria-current],.site-header nav a:hover{border-color:var(--red)}.site-header nav .canvas-link{color:var(--red)}
.page-shell{max-width:1280px;padding:46px 40px 76px;margin:auto}.page-layout{display:grid;grid-template-columns:minmax(0,850px) 210px;gap:60px}.page-layout:has(> main:only-child){display:block;max-width:1100px;margin:auto}main{min-width:0}h1,h2,h3{font-family:Montserrat,'Segoe UI',sans-serif;line-height:1.25;color:#151515;letter-spacing:-.025em}h1{font-size:clamp(30px,3.1vw,44px);margin:10px 0 18px}h2{font-size:25px;margin:46px 0 18px}h3{font-size:20px;margin:30px 0 14px}p{margin:0 0 18px}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:12px;font-weight:700;color:var(--muted);margin:0}.subtitle{color:var(--muted);font-size:20px}.page-heading{margin-bottom:32px}.breadcrumb{font-size:14px;color:var(--muted);margin-bottom:25px}.breadcrumb a{text-decoration:none}.page-toc{font-size:14px;position:sticky;top:32px;align-self:start;max-height:85vh;overflow:auto;border-left:1px solid var(--line);padding-left:22px}.page-toc strong{font-size:12px;text-transform:uppercase;letter-spacing:.08em}.page-toc ul{list-style:none;padding:0;margin:14px 0}.page-toc li{margin:10px 0;line-height:1.4}.page-toc a{color:var(--muted);text-decoration:none}.page-toc a:hover{color:var(--red)}.page-toc ul ul{padding-left:10px}
.home .page-heading{padding:20px 0 12px}.home h1{font-size:clamp(28px,3vw,36px);max-width:850px}.home .subtitle{max-width:760px;font-size:22px}.course-facts{display:grid;grid-template-columns:2fr 1fr;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:24px 0;gap:28px;margin-bottom:35px}.course-facts dt{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.course-facts dd{margin:5px 0 0;font-weight:600}.course-facts small{display:block;font-weight:400}.quick-links{display:flex;flex-wrap:wrap;gap:12px 28px;margin:25px 0 40px}.quick-links a{font-weight:600}.notice{border-left:3px solid var(--red);padding:12px 20px;background:var(--wash);font-size:16px}.course-table{width:100%;border-collapse:collapse}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:16px;margin:22px 0 30px}th{font-size:12px;text-transform:uppercase;letter-spacing:.05em;text-align:left;background:var(--wash)}th,td{padding:13px 16px;border-bottom:1px solid var(--line);vertical-align:top}td:first-child{font-variant-numeric:tabular-nums}td a{font-weight:600;text-decoration:none}td a:hover{text-decoration:underline}.module-row th{background:#fff;padding-top:30px;color:var(--muted);border-bottom:2px solid var(--ink)}.status{font-size:12px;color:var(--muted);border:1px solid var(--line);padding:3px 7px;white-space:nowrap;border-radius:3px}.resource-list{list-style:none;padding:0}.resource-list li{padding:22px 0;border-bottom:1px solid var(--line)}.resource-list h2,.resource-list h3{margin:0 0 8px;font-size:20px}.resource-list p{margin:0;color:var(--muted)}
.course-figure{border:0;padding:0;margin:32px 0}.course-figure img{display:block;margin:auto;max-height:650px;max-width:100%;height:auto}.course-figure>p:last-child{font-size:15px;color:var(--muted);margin-top:14px}img,svg,video,iframe{max-width:100%}.math.display{display:block;overflow-x:auto;padding:8px 0}mjx-container[display="true"]{overflow-x:auto;overflow-y:hidden;max-width:100%}pre{background:var(--wash);padding:20px;overflow-x:auto;font-size:14px;line-height:1.55;border:1px solid #e6e6e6;border-radius:3px}code{font-family:'Cascadia Code',Consolas,monospace;font-size:.86em}pre code{font-size:inherit;white-space:pre}p code,li code{background:var(--wash);padding:2px 4px}div.sourceCode{position:relative;margin:20px 0}div.sourceCode pre{padding-top:36px}.copy-code{position:absolute;right:8px;top:7px;font-size:12px;background:white;border:1px solid var(--line);border-radius:3px;color:var(--muted);padding:3px 8px}.code-fold summary,details summary{cursor:pointer;font-weight:600;font-size:15px}.lesson-pagination{display:flex;justify-content:space-between;gap:30px;border-top:1px solid var(--line);margin-top:50px;padding-top:25px}.lesson-pagination a{flex:1;max-width:48%;font-size:16px;text-decoration:none}.lesson-pagination a:last-child{text-align:right}.lesson-pagination span{display:block;font-size:12px;color:var(--muted);margin-bottom:7px;text-transform:uppercase;letter-spacing:.08em}.source-link{margin-top:35px;font-size:14px;color:var(--muted)}.source-link span{margin:0 8px}.print-button{border:0;background:none;color:var(--red);padding:0;text-decoration:underline;font-size:14px}.site-footer{border-top:1px solid var(--line);color:var(--muted);font-size:14px}.site-footer>div{max-width:1280px;margin:auto;padding:25px 40px;display:flex;gap:24px;flex-wrap:wrap}.site-footer span{margin-right:auto}.search-input{display:block;width:100%;padding:13px;border:1px solid #999;border-radius:3px;margin:12px 0 25px}.search-result{margin:25px 0;padding-bottom:20px;border-bottom:1px solid var(--line)}.search-result h2{margin:0 0 6px;font-size:20px}.search-result p{font-size:16px;color:var(--muted)}
@media(max-width:1050px){.header-inner{align-items:flex-start;flex-direction:column}.page-layout{grid-template-columns:minmax(0,1fr) 180px;gap:30px}.site-header nav{gap:20px}}
@media(max-width:760px){body{font-size:17px}.header-inner{padding:16px 20px;gap:14px}.brand-sub{display:none}.brand img{height:34px;width:30px}.site-header nav{font-size:14px;gap:8px 18px}.page-shell{padding:30px 20px 50px}.page-layout{display:flex;flex-direction:column;gap:20px}.page-toc{position:static;order:-1;max-height:none;border-left:0;border-bottom:1px solid var(--line);padding:0 0 10px}.page-toc ul{display:flex;flex-wrap:wrap;gap:5px 16px}.page-toc li{margin:0}.page-toc ul ul{display:none}.course-facts{grid-template-columns:1fr;gap:18px}.course-facts dd small{display:inline;margin-left:8px}.home h1{font-size:28px}th,td{padding:10px 8px}table{font-size:14px}.lesson-pagination{gap:20px}.site-footer>div{padding:24px 20px}.table-scroll{margin:0 -5px}}
@media print{body{font-size:11pt}.site-header,.site-footer,.page-toc,.source-link,.lesson-pagination,.copy-code,.skip-link{display:none!important}.page-shell{padding:0;max-width:none}.page-layout{display:block}.page-heading h1{font-size:24pt}a{color:inherit}pre{white-space:pre-wrap;break-inside:avoid}.numbered-block,img{break-inside:avoid}.math.display{overflow:visible}}

.unreleased{color:#777}.schedule-item{margin:0 0 10px}.schedule-item:last-child{margin-bottom:0}.schedule-item small{display:block;text-transform:uppercase;letter-spacing:.05em;font-size:10px;color:var(--muted)}.lesson-number{display:inline-block;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums;width:28px;flex-shrink:0}.catalog-item{padding:15px 0;border-bottom:1px solid var(--line)}.catalog-item a{text-decoration:none}.schedule-event{font-weight:600}.course-table td:nth-child(2){width:60%}.course-table td:nth-child(3){width:30%;font-size:14px}.course-table tbody th{background:white;font-size:16px;font-weight:500;color:var(--muted)}.course-table .status{display:inline-block;margin:3px 0 3px 5px;font-size:10px}

.course-table .topic-heading th{padding:28px 12px 12px 0;font:600 18px/1.4 Montserrat, sans-serif;color:var(--ink);border-bottom:2px solid var(--ink)}.course-table .topic-heading td{padding-top:28px;border-bottom:2px solid var(--ink);font-weight:600}.course-table :is(.week-row,.week-continuation) th{white-space:nowrap;font-size:14px}.course-table :is(.week-row,.week-continuation) td{padding-top:15px;padding-bottom:15px}.unreleased{color:#737373}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.assignment-topic{display:block;color:var(--muted);font-size:14px;margin-top:4px}@media(max-width:760px){.course-table .topic-heading th{font-size:15px}.course-table .topic-heading td{font-size:12px}.course-table :is(.week-row,.week-continuation) th{font-size:12px}.course-table .lesson-number{width:23px}.course-facts dd small{display:block;margin-left:0}}

.course-table .topic-heading th:first-child{font:400 14px/1.4 "Source Sans 3",sans-serif;color:var(--muted);width:70px}.course-table .topic-heading th:nth-child(2){width:70%}.course-table .topic-lectures td{border-bottom:0;padding:12px 16px 6px}.course-table .topic-lectures .schedule-item{font-size:16px}.course-table .topic-heading td{white-space:nowrap;font-size:14px}.course-table .schedule-break th,.course-table .schedule-break td{padding-top:26px;color:var(--muted);background:#fff}.course-table .topic-heading th,.course-table .topic-heading td{border-bottom:1px solid var(--line)}@media(max-width:760px){.course-table .topic-heading th:first-child{width:40px;font-size:12px}.course-table .topic-heading td{font-size:12px}.course-table .topic-lectures .schedule-item{font-size:14px}.course-table .topic-lectures td{padding-left:8px}}

/* Compact weekly schedule: module headings group the rows without adding cards. */
.home .page-shell{padding-top:28px}.home .page-heading{padding:0;margin-bottom:18px}.home .course-facts{padding:12px 0;margin-bottom:20px;gap:20px}.home h2{margin:24px 0 10px;font-size:22px}.home main>p{font-size:15px;margin-bottom:12px}.course-table{font-size:14px;line-height:1.4;margin-top:12px}.course-table th,.course-table td{padding:7px 10px}.course-table thead th,.course-table .module-heading th{font:600 13px/1.4 "Source Sans 3","Segoe UI",sans-serif;text-transform:none;letter-spacing:0;background:var(--paper);color:var(--ink);border-bottom:1px solid var(--line)}.course-table thead th{padding:7px 10px}.course-table .module-heading th{padding:9px 10px;background:#f1f1f1;border-left:3px solid var(--red)}.course-table :is(.week-row,.week-continuation) th{font-size:13px;width:55px;padding-top:8px}.course-table :is(.week-row,.week-continuation) td{padding:7px 10px}.course-table :is(.week-row,.week-continuation) td:nth-child(2){width:auto}.course-table :is(.week-row,.week-continuation) td:nth-child(3){width:125px;font-size:13px;white-space:nowrap}.course-table .schedule-item{margin:0 0 3px}.course-table .schedule-item:last-child{margin:0}.course-table .lesson-number{width:23px;font-size:11px}.course-table .schedule-break th,.course-table .schedule-break td{padding:7px 10px;font-size:13px}.course-table a{font-weight:500}@media(max-width:760px){.course-table{font-size:13px}.course-table th,.course-table td,.course-table :is(.week-row,.week-continuation) td{padding:6px}.course-table thead th,.course-table .module-heading th{font-size:12px}.course-table .module-heading th{padding:8px 6px}.course-table :is(.week-row,.week-continuation) th{width:30px;font-size:12px}.course-table :is(.week-row,.week-continuation) td:nth-child(3){width:85px;font-size:11px}.course-table .lesson-number{width:20px}.home .course-facts{gap:12px}}

.course-table .schedule-break th,.course-table .schedule-break td{background:#fff;border-top:1px dashed #b8b8b4;border-bottom:1px dashed #b8b8b4;padding-top:11px;padding-bottom:11px}.course-table .schedule-break td{font-weight:500;font-style:italic;text-align:center;color:var(--muted);letter-spacing:0}

.course-table :is(.week-row,.week-continuation) th,.course-table .schedule-break th{width:115px;vertical-align:top}.week-number{display:block;font-weight:600}.week-dates{display:block;font-size:11px;font-weight:400;color:var(--muted);white-space:nowrap;margin-top:2px}.calendar-note{font-size:11px;color:var(--muted);margin-top:5px}@media(max-width:760px){.course-table :is(.week-row,.week-continuation) th,.course-table .schedule-break th{width:85px}.week-dates{font-size:10px}}

.course-info-table table{margin:0 0 22px;font-size:15px;line-height:1.3}.course-info-table td{padding:4px 10px}.course-info-table thead{display:none}.course-info-table td:first-child{width:115px;white-space:nowrap}

.grading-scale{max-width:100%;overflow-x:auto}.grading-scale table{font-size:13px;line-height:1.35;margin:12px 0}.grading-scale th,.grading-scale td{padding:7px 8px;text-align:center;white-space:nowrap}.grading-scale th:first-child,.grading-scale td:first-child{text-align:left}

/* Source credit stays readable without competing with the lesson. */
#refs{font-size:.8rem;line-height:1.45;color:var(--muted);border-top:1px solid var(--line);margin-top:2rem;padding-top:.6rem}#refs .csl-entry{margin:.35rem 0;padding-left:1.4em;text-indent:-1.4em;overflow-wrap:anywhere}

.meeting-date{display:inline-block;min-width:88px;font-size:11px;color:var(--muted)}.assignment-due{display:block;font-size:11px;color:var(--muted);margin-top:2px}@media(max-width:760px){.meeting-date{display:block;margin-top:4px}}
/* A long lesson title wraps under itself, not back under the date. */
.course-table .schedule-item{display:flex;align-items:baseline}.course-table .schedule-item :is(.meeting-date,.lesson-number){flex:none}.course-table .schedule-item a{min-width:0}@media(max-width:760px){.course-table .schedule-item{flex-wrap:wrap}.course-table .schedule-item .meeting-date{flex-basis:100%}}

.course-facts dd .contact-email{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;margin-left:0}.course-facts dd .contact-note{color:var(--muted);font-size:12px;line-height:1.5;font-weight:400}.home .course-facts{grid-template-columns:1fr 1fr}@media(max-width:760px){.home .course-facts{grid-template-columns:1fr}}.contact-note .subject-tag{display:inline-block;white-space:nowrap;font-family:'Cascadia Code',Consolas,monospace;font-size:.95em;color:var(--ink);background:#f1f1f1;border:1px solid var(--line);border-radius:3px;padding:0 4px}

.contact-email .email-address{font-family:'Cascadia Code',Consolas,monospace;font-size:13px;color:#404040;white-space:nowrap}

.course-facts .instructor-name{color:var(--ink);text-decoration:none}.contact-email a.email-address{color:#404040;text-decoration:none}.course-facts .instructor-name:hover,.contact-email a.email-address:hover{color:var(--red);text-decoration-color:currentColor}

/* Compact course layout with neutral panels and Utah-red accents. */
body{font-size:17px;line-height:1.55}
.header-inner{padding:14px 32px;max-width:1260px}
.site-header{border-top-width:3px}
.page-shell{max-width:1220px;padding:28px 32px 60px}
.page-layout{grid-template-columns:minmax(0,820px) 190px;gap:42px}
p{margin-bottom:14px}
h2{margin:30px 0 12px}
h3{margin:24px 0 10px}
.page-heading{margin-bottom:22px}
.eyebrow{color:#be0000}
.subtitle{font-size:18px}
.home .page-heading{position:relative;padding:14px 208px 14px 18px;min-height:106px;margin-bottom:12px;background:#f3f3f3;border-left:4px solid #be0000}
.home h1{font-size:36px;margin:8px 0 0;max-width:850px}
.home .page-heading::after{content:"";background:url("sequence-grid.svg") center / contain no-repeat;display:block;position:absolute;right:12px;top:4px;width:183px;height:98px;pointer-events:none}
.course-facts{font-size:15px;line-height:1.4;padding:12px 0;margin-bottom:18px}
.home h2{font-size:22px;margin:21px 0 10px}
.course-table :is(.week-row,.week-continuation):hover{background:#f7f7f7}
@media(max-width:1050px){.page-layout{grid-template-columns:minmax(0,1fr) 170px;gap:24px}}
@media(max-width:760px){.header-inner{padding:12px 18px}.page-shell{padding:20px 18px 40px}.page-layout{display:flex;gap:18px}.home .page-heading{padding:12px 150px 12px 14px;min-height:0}.home .page-heading::after{right:10px;top:50%;width:130px;height:70px;margin-top:-35px}.home h1{font-size:28px}.course-facts{font-size:14px}}
/* Phones: the alignment graphic moves below the title as a right-aligned band. */
@media(max-width:479px){.home .page-heading{padding-right:14px}.home .page-heading::after{position:static;width:auto;height:72px;margin:6px -4px 0 0;background-position:right center}}
@media print{body{font-size:11pt}.page-shell{padding:0;max-width:none}.page-layout{display:block}.home .page-heading{padding:0;min-height:0;background:transparent;border-left:0}}

@media (prefers-reduced-motion: reduce){.home .page-heading::after{background-image:url("sequence-grid.svg#static")}}
@media print{.home .page-heading::after{display:none}}

.home .schedule-heading{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 24px;margin:21px 0 10px}
.home .schedule-heading h2{margin:0}
.course-overview-link{display:inline-flex;align-items:baseline;gap:7px;font-size:14px;font-weight:500;color:var(--muted);text-decoration:none}
.course-overview-link span{color:var(--red)}
.course-overview-link:hover,.course-overview-link:focus-visible{color:var(--red);text-decoration:underline}

.week-continuation-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.week-continuation .week-number{font-weight:400;color:var(--muted)}

/* Lesson blocks. Each family has one hue, used for a soft tint and a rule; the text label names the type. */
.def{--accent:#0f766e;--accent-ink:#0b5c55;--accent-tint:#f0f7f6;--accent-line:#cde3df}
/* Inside a definition, italics mark the term being defined. */
.def.numbered-block em,.def.numbered-block:not(:has(em))>p:first-child .block-title{
  color:var(--accent-ink);text-decoration:underline;
  text-decoration-color:#5f9c94;text-decoration-thickness:2px;text-underline-offset:.19em;
}
.def.numbered-block em{font-style:normal;font-weight:650}
:is(.thm,.lem,.cor,.prp,.proof){--accent:#be0000;--accent-ink:#a00000;--accent-tint:#fcf3f2;--accent-line:#efd3cf}
.exm{--accent:#3b7d3a;--accent-ink:#2b612a;--accent-tint:#f4f8f2;--accent-line:#d3e4cf}
.algorithm{--accent:#795ba7;--accent-ink:#513478;--accent-tint:#f6f1fb;--accent-line:#d8cbe9}
:is(.callout-note,.callout-tip,.biology,.exr){--accent:#8a8a85;--accent-ink:#4b4b48;--accent-tint:#f6f6f4;--accent-line:#dcdcd7}
.key-idea{--accent:#c49300;--accent-ink:#6b5000;--accent-tint:#fdf8e5;--accent-line:#eee0aa}
:is(.callout-warning,.callout-important){--accent:#cf5a1d;--accent-ink:#943a0c;--accent-tint:#fdf3ec;--accent-line:#f1d3c1}
.numbered-block{margin:26px 0}
:is(.numbered-block,.algorithm,.callout-note,.callout-tip,.callout-warning,.callout-important,.biology,.proof-body,.callout-body)>:last-child{margin-bottom:0}
.block-label{font:700 12.5px/1.4 'Source Sans 3','Segoe UI',sans-serif;text-transform:uppercase;letter-spacing:.08em;color:var(--accent-ink,var(--muted))}
.block-title{font:600 16px/1.4 Montserrat,'Segoe UI',sans-serif;letter-spacing:-.01em;color:var(--ink)}
.block-label+.block-title{margin-left:.35em}
:is(.numbered-block:not(.exr),.algorithm,.callout-note,.callout-tip,.callout-warning,.callout-important)>p:first-child:has(>strong:only-child>.block-label:first-child){margin-bottom:8px}
/* Definitions and theorems: tinted cards, outlined so a reader can find the statement again. */
:is(.def,.thm,.lem,.cor,.prp).numbered-block{background:var(--accent-tint);padding:14px 20px 16px}
:is(.def,.thm,.lem,.cor,.prp).numbered-block,.algorithm{border:1px solid var(--accent-line);border-left:4px solid var(--accent);border-radius:3px}
/* A problem statement hangs its Input and Output labels. */
.problem-io>p{padding-left:5.4em;margin-bottom:6px}.problem-io>p>strong:first-child{float:left;width:7.3em;margin-left:-7.3em;font-size:.74em;line-height:2.1;text-transform:uppercase;letter-spacing:.08em;color:var(--accent-ink)}
/* Worked examples: a coloured rule along the whole calculation, no box. */
.exm.numbered-block{border-left:4px solid var(--accent);padding:4px 0 6px 20px}
/* Exercises: one task each, with the label run into the task. */
.exr.numbered-block{border-left:3px solid #cfcfca;padding:1px 0 1px 16px;margin:16px 0}
/* Run-in labels (exercises, figure captions) read as part of the sentence, so they keep sentence case. */
:is(.exr,.course-figure) .block-label{font-size:inherit;text-transform:none;letter-spacing:0;color:var(--ink)}
/* Proofs fold under the statement they prove. */
.proof{margin:18px 0;border-left:4px solid var(--accent-line);background:#fff}
:is(.thm,.lem,.cor,.prp).numbered-block:has(+.proof){margin-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}
:is(.thm,.lem,.cor,.prp).numbered-block+.proof{margin-top:0;border:1px solid var(--accent-line);border-top:0;border-left:4px solid var(--accent);border-radius:0 0 3px 3px}
.proof-body{padding:4px 20px 16px 20px}
/* Disclosures share one control: a chevron, the type label, and an optional title. */
:is(.proof-fold,.callout-fold,.code-fold,.refs-fold)>summary{list-style:none;cursor:pointer;display:block;font-size:15px;font-weight:600;text-indent:-22px}
:is(.proof-fold,.callout-fold,.code-fold,.refs-fold)>summary::-webkit-details-marker{display:none}
:is(.proof-fold,.callout-fold,.code-fold,.refs-fold)>summary::before{content:"";display:inline-block;width:7px;height:7px;margin:0 13px 0 2px;vertical-align:.12em;border:solid var(--accent-ink,var(--muted));border-width:0 2px 2px 0;transform:rotate(-45deg);transition:transform .15s ease}
:is(.proof-fold,.callout-fold,.code-fold,.refs-fold)[open]>summary::before{transform:translateY(-2px) rotate(45deg)}
.proof-fold>summary{padding:8px 20px 8px 38px}.proof-fold>summary:hover{background:var(--accent-tint)}
/* Optional "Going deeper" material: a neutral outlined panel that opens in place. */
.callout-collapsible{margin:24px 0;border:1px solid var(--accent-line);border-radius:3px;background:#fff}
.callout-fold>summary{padding:10px 18px 10px 36px;background:var(--accent-tint);border-radius:3px}.callout-fold[open]>summary{border-bottom:1px solid var(--accent-line);border-radius:3px 3px 0 0}
.callout-body{padding:16px 20px}
/* Callouts: tinted asides with a coloured rule and no outline, so they read as interruptions rather than statements. */
:is(.callout-note,.callout-tip,.callout-warning,.callout-important,.biology):not(.callout-collapsible){margin:24px 0;padding:14px 20px 16px;background:var(--accent-tint);border-left:4px solid var(--accent);border-radius:0 3px 3px 0}
.key-idea:not(.callout-collapsible){border:1px solid var(--accent-line);border-left:4px solid var(--accent);border-radius:3px}
/* The titled procedure can share an edge with its Python disclosure. */
.algorithm{margin:24px 0;padding:12px 20px 14px;background:var(--accent-tint)}
.algorithm>p:first-child .block-title{color:var(--accent-ink)}
.label-icon{display:inline-block;width:1.15em;height:1.15em;vertical-align:-.2em;margin-right:.4em}
.algorithm>p:first-child{padding-bottom:8px;border-bottom:1px solid var(--accent-line)}.algorithm ol{margin:0;padding-left:1.6em}.algorithm li{margin:3px 0}
.algorithm li code{font-weight:400;font-size:.9em;color:var(--accent-ink);background:transparent;padding:0}
/* Keep short glosses together. Give them the right margin on wide cards. */
.algorithm{container-type:inline-size}
.algorithm .annotated-step{display:block;container-type:inline-size}
/* On its own line, a long gloss can use the list gutter at small widths. */
.algorithm li .algorithm-comment{display:inline-block;width:max-content;max-width:calc(100vw - 3rem);translate:min(0px,calc(100cqi - 100%)) 0;color:#715d81;font-size:.82em;line-height:1.45}
@container(min-width:42rem){
  .algorithm .annotated-step{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:baseline;column-gap:.8em}
}
/* Input and Output lines sit under the heading, with a little space before the steps. */
.algorithm>.problem-io+:not(.problem-io){margin-top:12px}
/* Equation numbers at the right margin. */
.equation.numbered-block{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:16px;margin:14px 0}.equation>p{margin:0;grid-row:1}.equation>p:first-child{grid-column:2;color:var(--muted);font-size:15px;font-variant-numeric:tabular-nums}.equation>p:last-child{grid-column:1}
/* Code: folded code uses the shared disclosure; printed output attaches to the code that produced it. */
.code-fold{--accent-ink:#205578;margin:20px 0;border:1px solid #cbd9e1;border-left:3px solid #6491ab;border-radius:3px}
.code-fold>summary{padding:8px 14px 8px 36px;background:white;color:var(--accent-ink);border-radius:inherit}
.code-fold>summary:hover{background:#edf5fa}
.code-fold .label-icon{color:#22678e}
.code-fold .block-label{font:600 13px/1.4 'Cascadia Code',Consolas,monospace;text-transform:none;letter-spacing:0;color:var(--accent-ink)}.code-fold .block-title{color:#173d56;font:600 15px/1.4 'Source Sans 3','Segoe UI',sans-serif;letter-spacing:0}
/* Keep an implementation directly beneath its algorithm at the same reading width. */
.algorithm:has(+.code-fold){margin-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}
.algorithm+.code-fold{margin-top:0;border:1px solid #d8cbe9;border-top:0;border-left:4px solid #795ba7;border-radius:0 0 3px 3px}
@media(max-width:760px){.code-fold>summary{box-sizing:border-box;min-height:44px;padding-top:11px;padding-bottom:11px}}
.algorithm+.code-fold>summary:hover{background:#f8f6fa}
.algorithm+.code-fold .block-label,.algorithm+.code-fold .block-title{color:#45404b}
.algorithm+.code-fold .block-title{font-weight:500}
.code-fold[open]>summary{border-bottom-left-radius:0;border-bottom-right-radius:0}
.code-fold>summary:focus-visible{outline:2px solid var(--accent-ink,#36424b);outline-offset:2px}
.code-fold div.sourceCode{margin:0}.code-fold pre{margin:0;border:0;border-top:1px solid var(--line);border-radius:0 0 3px 3px}
pre.output{background:#fff;border:1px solid #e3e3e3;border-left:3px solid #b5b5b0;border-radius:3px;margin:20px 0}
pre.output::before{content:"Output";display:block;margin-bottom:6px;font:700 11px/1.4 'Source Sans 3','Segoe UI',sans-serif;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
:is(div.sourceCode,.code-fold):has(+pre.output){margin-bottom:0}div.sourceCode:has(+pre.output) pre{margin-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.code-fold:has(+pre.output){border-bottom-left-radius:0;border-bottom-right-radius:0}
:is(div.sourceCode,.code-fold)+pre.output{margin-top:0;border-top:1px dashed #cfcfca;border-top-left-radius:0;border-top-right-radius:0}
@media(max-width:760px){:is(.def,.thm,.lem,.cor,.prp).numbered-block{padding:12px 14px 14px}.exm.numbered-block{padding-left:14px}.exr.numbered-block{padding-left:12px}.proof-body{padding:2px 14px 14px}.proof-fold>summary{padding:8px 14px 8px 34px}.callout-body{padding:14px}.callout-fold>summary{padding:9px 14px 9px 34px}:is(.callout-note,.callout-tip,.callout-warning,.callout-important,.biology):not(.callout-collapsible){padding:12px 14px 14px}.algorithm{padding:10px 14px 12px}.problem-io>p{padding-left:0}.problem-io>p>strong:first-child{float:none;width:auto;margin:0 .4em 0 0}}
/* Narrow phones: wide lesson tables scroll inside their block instead of widening the page, and blocks give back some padding. */
@media(max-width:760px){:is(main>table,.numbered-block table,.callout-body table,.proof-body table){display:block;overflow-x:auto;max-width:100%}}
@media(max-width:420px){:is(.def,.thm,.lem,.cor,.prp).numbered-block{padding:10px 10px 12px}.exm.numbered-block{padding-left:10px;border-left-width:3px}.proof-body{padding:2px 10px 12px}.callout-body{padding:12px 10px}:is(.callout-note,.callout-tip,.callout-warning,.callout-important,.biology):not(.callout-collapsible){padding:10px 10px 12px}.algorithm{padding:10px}}
@media (prefers-reduced-motion: reduce){:is(.proof-fold,.callout-fold,.code-fold,.refs-fold)>summary::before{transition:none}}
@media print{:is(.def,.thm,.lem,.cor,.prp).numbered-block,.algorithm,:is(.callout-note,.callout-tip,.callout-warning,.callout-important):not(.callout-collapsible),.exr.numbered-block,.equation{break-inside:avoid}.exm.numbered-block{break-inside:auto}:is(.proof-fold,.callout-fold)>summary{break-after:avoid;padding-left:20px;text-indent:0}:is(.proof-fold,.callout-fold)>summary::before{display:none}.numbered-block,.algorithm,.proof,.callout-collapsible,:is(.callout-note,.callout-tip,.callout-warning,.callout-important){print-color-adjust:exact;-webkit-print-color-adjust:exact}}
/* Print proofs and optional blocks in full even without script, where ::details-content is supported. */
@media print{:is(.proof-fold,.callout-fold,.refs-fold)::details-content{content-visibility:visible;display:block}}
/* Citations and references. A citation is a small grey superscript numeral linked to its numbered entry; site.js previews the entry in a card on hover, keyboard focus, or tap. */
/* Raised by position, not vertical-align, with no line height, so lines with a numeral keep their spacing. An invisible pad gives the numeral a finger-sized target. */
.cite-sup{position:relative;top:-.5em;font-size:.7em;line-height:0;white-space:nowrap;margin-left:.04em;font-variant-numeric:lining-nums}
.cite-sup>a{position:relative;color:#5a5a5a;font-weight:600;text-decoration:none;border-radius:2px;padding:0 .06em}
.cite-sup>a::after{content:"";position:absolute;inset:-.85em -.4em}
.cite-sup>a:hover{color:var(--red);text-decoration:underline}.cite-sup>a:focus-visible{color:var(--red);outline:2px solid var(--red);outline-offset:1px}
.cite-locator{font-weight:400}
:is(.cite-sup>a,#refs .csl-entry):target{background:#fdf6dc;box-shadow:0 0 0 3px #fdf6dc;border-radius:2px}
.cite-preview{position:fixed;z-index:60;display:block;box-sizing:border-box;max-width:calc(100vw - 24px);padding:10px 14px 11px;background:#fff;border:1px solid #d4d4cf;border-radius:4px;box-shadow:0 6px 22px rgba(0,0,0,.13);font:400 14px/1.45 'Source Sans 3','Segoe UI',sans-serif;color:var(--ink);text-align:left;text-indent:0;text-transform:none;letter-spacing:0;white-space:normal;overflow-wrap:anywhere}
.cite-preview[hidden]{display:none}
.cite-preview .ref-link{color:var(--red)}
.cite-preview-jump{display:block;margin-top:6px;font-size:13px;color:var(--muted)}
.cite-preview-jump:hover{color:var(--red)}
.cite-preview .ref-num{margin-right:.35em;font-weight:600}.cite-preview-locator{display:block;margin-top:4px;font-size:13px;color:var(--muted)}
@media (prefers-reduced-motion: no-preference){.cite-preview{animation:cite-preview-in .12s ease-out}}
@keyframes cite-preview-in{from{opacity:0;transform:translateY(-3px)}}
/* The reference list folds like a proof: a muted label and a count, opened by a citation link or by print. */
.refs-fold>summary{padding:4px 0 4px 22px;font-weight:400}.refs-fold>summary:hover .block-label{color:var(--ink)}
.refs-count{font-size:13px;color:var(--muted);margin-left:.4em}
.refs-body{padding:2px 0 0 22px}
.refs-group{margin:.7rem 0 .1rem;font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:#555}
.ref-url{display:none}
/* Cited sources hang their number in a gutter; nocite-only sources align with the cited text and keep a hanging indent. */
#refs .numbered .csl-entry{padding-left:1.9em;text-indent:0}#refs .numbered .ref-num{display:inline-block;width:1.9em;margin-left:-1.9em;padding-right:.45em;text-align:right;font-variant-numeric:tabular-nums;font-weight:600;color:#4b4b48}
#refs .csl-bib-body:not(.numbered) .csl-entry{padding-left:2.6em;text-indent:-.7em}
#refs .ref-link{white-space:nowrap}
.ref-backlinks{white-space:nowrap;margin-left:.3em}.ref-backlinks a{color:var(--muted);text-decoration:none;padding:0 .2em}.ref-backlinks a:hover,.ref-backlinks a:focus-visible{color:var(--red);text-decoration:underline}
@media(max-width:420px){.refs-body{padding-left:0}}
@media print{.cite-preview,.ref-backlinks,.ref-short{display:none!important}.ref-url{display:inline}#refs .ref-link{white-space:normal}.cite-sup>a{color:inherit}.refs-fold>summary{padding-left:0;text-indent:0}.refs-fold>summary::before{display:none}.refs-body{padding-left:0}:is(.cite-sup>a,#refs .csl-entry):target{background:none;box-shadow:none}}
