/* Shared reference area: recognizable sections without competing with the scene. */
.lesson-reference{margin-top:24px;border-top:1px solid #d3dfee;color:#193653;font-family:system-ui,sans-serif}
.lesson-reference .reference-icon{width:20px;height:20px;flex:none;color:#496b99;vertical-align:middle}
.lesson-reference>p:is(.ts-takeaway,.u16-takeaway){position:relative;display:block;border:0;background:none;margin:0;padding:20px 0 20px 30px;font:15px/1.65 system-ui,sans-serif;color:#193653}
.lesson-reference>p>.reference-icon{position:absolute;left:0;top:22px}
.lesson-reference>p>b{font-size:13px;white-space:nowrap;margin-right:4px}
.reference-sections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border-block:1px solid #d3dfee;align-items:start}
.lesson-reference .reference-sections>details{min-width:0;margin:0;padding:0;border:0;background:none;font:14px/1.65 system-ui,sans-serif}
.lesson-reference .reference-sections>details+details{border-left:1px solid #d3dfee}
.lesson-reference .reference-sections>details>summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer;min-height:60px;padding:14px 16px;font:600 14px/1.4 system-ui,sans-serif;color:#193653;border-radius:4px}
.lesson-reference summary::-webkit-details-marker{display:none}
.lesson-reference summary:hover{background:#f1f5fc}
.lesson-reference summary:focus-visible{outline:3px solid #245bce;outline-offset:-3px}
.lesson-reference .reference-chevron{width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-left:auto;flex:none}
.lesson-reference details[open] .reference-chevron{transform:rotate(225deg)}
.lesson-reference .reference-sections>details[open]{grid-column:1/-1;border-left:0;border-bottom:1px solid #d3dfee}
.lesson-reference .reference-sections>details[open]>:not(summary){margin:8px 18px 20px}
.lesson-reference .reference-sections>details[open]>summary{background:#f1f5fc}
.lesson-reference .reference-sections nav:is(.ts-sources,.u16-sources){display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:0;font:14px/1.6 system-ui,sans-serif}
.lesson-reference nav a{overflow-wrap:anywhere;text-underline-offset:3px;min-height:32px;padding:4px 0}




.chapter-footer{align-items:center;gap:12px}
@media(max-width:600px){.reference-sections{grid-template-columns:1fr}.lesson-reference .reference-sections>details+details{border-left:0;border-top:1px solid #d3dfee}.lesson-reference .reference-sections>details>summary{min-height:54px;padding:14px 8px}.lesson-reference>p:is(.ts-takeaway,.u16-takeaway){font-size:14px;padding:18px 0 18px 30px}}
/* A single shared reference area follows every canvas. */
.paper>#chapterReference{margin:0 24px 24px;background:var(--surface,#fff);color:var(--ink,#193653);border-color:var(--line,#d3dfee)}
#chapterReference .reference-sections,#chapterReference .reference-sections>details{border-color:var(--line,#d3dfee);color:inherit}
#chapterReference>p.ts-takeaway,#chapterReference .reference-sections>details>summary{color:inherit}
#chapterReference .reference-icon{color:var(--accent,#496b99)}
#chapterReference summary:hover,#chapterReference details[open]>summary{background:var(--soft,#f1f5fc)}
#chapterReference .reference-rule-content{font:14px/1.75 system-ui,sans-serif;overflow-wrap:anywhere}
#chapterReference .reference-rule-content>p,#chapterReference #referenceWorked>p{margin:12px 0}
#chapterReference #referencePrinciple{font-weight:600}
#chapterReference ul{padding-left:20px;margin:12px 0}
#chapterReference li+li{margin-top:8px}
#chapterReference dl{font:14px/1.65 system-ui,sans-serif}
#chapterReference dt{font-weight:650;margin-top:14px}
#chapterReference dd{margin:4px 0 14px;overflow-wrap:anywhere}
#chapterReference a{color:var(--accent,#245bce);text-decoration:underline;text-underline-offset:3px}
#chapterReference #referenceSources{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
#chapterReference [hidden]{display:none!important}
@media(max-width:600px){.paper>#chapterReference{margin:0 16px 16px}#chapterReference .reference-rule-content,#chapterReference dl{font-size:14px}}
.paper .ts-lesson>.ts-experiment:last-child,.paper .u16-lesson>.u16-experiment:last-child{margin-bottom:0}
#chapterReference #referenceRuleNote{font-size:12px;color:var(--muted,#526882)}
#chapterReference .reference-report{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 0;border:0;background:transparent;box-shadow:none;font:500 13px/1.5 system-ui,sans-serif;color:var(--ink,#193653);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
#chapterReference .reference-report .reference-icon{width:16px;height:16px}
#chapterReference .reference-report:hover{color:var(--accent,#245bce)}
#chapterReference .reference-report:focus-visible{outline:3px solid var(--accent,#245bce);outline-offset:4px}
/* Disclosures keep one stable header row at every size; content flows below it. */
 #chapterReference .reference-sections{position:relative;display:block;padding-top:64px}
 #chapterReference .reference-sections>details,#chapterReference .reference-sections>details[open]{position:static;border:0;min-width:0}
 #chapterReference .reference-sections>details>summary{position:absolute;top:0;left:0;width:33.333333%;height:64px;min-height:64px;box-sizing:border-box;gap:8px;padding:12px 10px}
 #chapterReference .reference-sections>details:nth-child(2)>summary{left:33.333333%;border-left:1px solid var(--line,#d3dfee)}
 #chapterReference .reference-sections>details:nth-child(3)>summary{left:66.666667%;border-left:1px solid var(--line,#d3dfee)}
 #chapterReference .reference-sections>details>summary .reference-icon{width:18px;height:18px}
 #chapterReference .reference-sections>details[open]>summary{box-shadow:inset 0 -2px 0 var(--accent,#245bce)}
@media(max-width:600px){
 #chapterReference .reference-sections{padding-top:76px}
 #chapterReference .reference-sections>details>summary{height:76px;min-height:76px;display:grid;grid-template-rows:16px 30px;align-content:center;justify-items:center;gap:4px;padding:8px 4px;text-align:center;font-size:12px;line-height:1.25}
 #chapterReference .reference-sections>details>summary .reference-icon{width:16px;height:16px}
 #chapterReference .reference-sections>details>summary .reference-chevron{display:none}
 #chapterReference .reference-sections>details>summary span{min-width:0;overflow-wrap:anywhere}
 #chapterReference .reference-sections>details[open]>:not(summary){margin:12px 10px 18px}
}
