:root {
  --paper: #F3F6FA;
  --surface: #FFFFFF;
  --ink: #18202B;
  --ink-soft: #354052;
  --muted: #667181;
  --rule: #D4DCE7;
  --blue: #2457A6;
  --blue-wash: #E7EEF9;
  --red: #B84430;
  --red-wash: #FAEAE6;
  --green: #2B745D;
  --green-wash: #E3F0EB;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --rail: 18rem;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.55; }
html.embed-mode, html.embed-mode body { min-height: 100%; background: var(--surface); }
html.embed-mode .skip-link, html.embed-mode .site-header, html.embed-mode .week-rail, html.embed-mode .tool-hero, html.embed-mode .observe, html.embed-mode .concept-dialog { display: none; }
html.embed-mode .page-shell, html.embed-mode .page-shell.has-rail { display: block; min-height: 100vh; }
html.embed-mode .explore-page main { padding: 0; }
html.embed-mode .explorer { min-height: 100vh; border-top: 0; }
html.embed-mode .explorer-controls { gap: .7rem; padding: .75rem .9rem; }
html.embed-mode .equation-strip div { padding: .55rem .8rem; }
html.embed-mode .graph-grid figure { padding: .65rem .9rem 0; }
html.embed-mode .graph-legend { padding: 0 .9rem .6rem; }
/* Larger labels for the bakery explorer projected inside a slide. */
html.presentation-mode .stage-switch button,
html.presentation-mode .control label,
html.presentation-mode .reset-button,
html.presentation-mode .graph-grid figcaption,
html.presentation-mode .graph-legend { font-size: 1rem; }
html.presentation-mode .equation-strip > div > span { font-size: .875rem; }
html.presentation-mode .equation-strip strong { font-size: 1.4rem; }
html.presentation-mode .chart-label { font-size: 18px; fill: var(--ink-soft); }
html.presentation-mode .chart-capacity-label { font-size: 16px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 100; background: var(--ink); color: white; padding: .65rem 1rem; transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.site-header { height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 0 clamp(1rem, 3vw, 3.5rem); border-bottom: 1px solid var(--rule); background: rgba(243, 246, 250, .94); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.wordmark { display: flex; align-items: center; text-decoration: none; }
.wordmark-lockup { display: block; width: auto; height: 2.25rem; }
.wordmark-icon { display: none; width: 2.25rem; height: 2.25rem; }
.site-header nav { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 2rem); }
.site-header nav a { color: var(--ink-soft); text-decoration: none; font-size: .82rem; font-weight: 700; }
.site-header nav a:hover { color: var(--blue); }
.print-button { border: 1px solid var(--blue); color: var(--blue); background: transparent; padding: .55rem .85rem; cursor: pointer; font-size: .78rem; font-weight: 750; }

.page-shell { min-height: calc(100vh - 4.5rem); }
.page-shell.has-rail { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
.week-rail { position: sticky; top: 4.5rem; height: calc(100vh - 4.5rem); border-right: 1px solid var(--rule); padding: 2rem 1.5rem; display: flex; flex-direction: column; overflow: auto; }
.week-stamp { display: inline-grid; grid-template-columns: 3.25rem auto; justify-content: start; align-items: center; gap: .75rem; text-decoration: none; width: max-content; }
.week-stamp > img { display: block; width: 3.25rem; height: 3.25rem; }
.week-stamp > span { display: grid; gap: .08rem; line-height: 1; }
.week-stamp b { color: var(--blue); font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.week-stamp small { color: var(--muted); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; }
.rail-question { margin: 1.5rem 0 2rem; color: var(--ink-soft); font-family: var(--serif); font-size: 1.28rem; line-height: 1.25; }
.week-rail nav { border-top: 1px solid var(--rule); }
.week-rail nav a { display: grid; grid-template-columns: 2rem 1fr; gap: .7rem; align-items: start; padding: .85rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.week-rail nav a i { color: var(--muted); font-family: var(--serif); font-size: .72rem; font-style: normal; padding-top: .18rem; }
.week-rail nav a span { display: grid; }
.week-rail nav a strong { font-size: .82rem; }
.week-rail nav a small { color: var(--muted); font-size: .68rem; }
.week-rail nav a:hover strong, .week-rail nav a[aria-current="page"] strong { color: var(--blue); }
.week-rail nav a[aria-current="page"] i { color: var(--blue); }
.week-rail nav a.is-locked, .mode-row.is-locked { opacity: .45; cursor: not-allowed; }
.week-rail nav a.is-locked:hover strong { color: inherit; }

main { min-width: 0; }
.eyebrow { margin: 0 0 .8rem; color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.025em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
.primary-action, .secondary-action { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: .75rem 1.05rem; border: 1px solid var(--blue); text-decoration: none; font-size: .8rem; font-weight: 800; }
.primary-action { background: var(--blue); color: white; }
.primary-action:hover { background: #1C478A; }
.secondary-action { color: var(--blue); }
.secondary-action:hover { background: var(--blue-wash); }

/* Course ledger */
.course-home main { width: min(1040px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(3rem, 8vw, 7rem) 0; }
.course-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(17rem, .75fr); column-gap: 4rem; padding-bottom: clamp(2rem, 5vw, 4rem); }
.course-intro .eyebrow, .course-intro h1 { grid-column: 1; }
.course-intro h1 { margin: 0; font-size: clamp(2.9rem, 6.6vw, 5.8rem); line-height: .92; }
.intro-question { grid-column: 2; grid-row: 1 / span 2; margin: 0; align-self: end; font-family: var(--serif); font-size: clamp(1.3rem, 2.5vw, 1.95rem); line-height: 1.15; color: var(--blue); }
.intro-copy { grid-column: 1 / -1; max-width: 66ch; margin: 2rem 0 0; color: var(--ink-soft); }
.course-ledger { margin-top: 1.6rem; }
.course-week { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; min-height: 8.5rem; padding: 1.3rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.course-week-number { display: grid; grid-template-columns: 3.5rem; justify-items: center; gap: .3rem; color: var(--muted); font-family: var(--serif); }
.course-week-number img { display: block; width: 3.5rem; height: 3.5rem; }
.course-week-number small { font-size: .7rem; line-height: 1; letter-spacing: .12em; }
.course-week p { margin: 0 0 .25rem; color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.course-week h2 { margin: 0; font-size: clamp(1.15rem, 2.15vw, 1.65rem); line-height: 1.12; }
.course-week div > span { color: var(--ink-soft); font-size: .85rem; }
.course-week b { color: var(--blue); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.course-week.is-ready { border-bottom-color: var(--blue); }
.course-week.is-ready .course-week-number { color: var(--blue); }
.course-week.is-ready:hover h2 { color: var(--blue); }
.course-week.is-planned { opacity: .56; }
.course-information-row { border-top: 3px solid var(--ink); }
.course-information-mark { position: relative; display: block; width: 3.5rem; height: 3.5rem; }
.course-information-mark i { position: absolute; width: 1.85rem; height: 1.85rem; border: 3px solid var(--ink); }
.course-information-mark i:first-child { top: .35rem; left: .35rem; }
.course-information-mark i:last-child { right: .35rem; bottom: .35rem; border-color: var(--blue); background: var(--blue); }

/* Course information */
.course-info-page main { background: var(--surface); }
.course-info { width: min(900px, calc(100% - 3rem)); margin: 0 auto; padding-bottom: 6rem; }
.course-info-nav { display: flex; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
.course-info-nav::-webkit-scrollbar { display: none; }
.course-info-nav a { flex: 0 0 auto; display: grid; grid-template-columns: 1.7rem auto; gap: .35rem; padding: 1.2rem .9rem; border-right: 1px solid var(--rule); color: var(--muted); text-decoration: none; font-size: .68rem; }
.course-info-nav a:hover { color: var(--blue); }
.course-info-nav span { color: var(--blue); font-family: var(--serif); }
.course-info-header { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); border-bottom: 3px solid var(--ink); }
.course-info-header h1 { max-width: 13ch; margin: 0; font-size: clamp(2.8rem, 6vw, 5.2rem); line-height: .96; }
.course-info-header .hero-question { max-width: 38ch; }
.course-info-section { position: relative; padding: 3.2rem 0 3.5rem; border-bottom: 1px solid var(--rule); scroll-margin-top: 5rem; }
.course-info-section .section-number { position: absolute; top: 3.55rem; left: -4.5rem; width: 3rem; margin: 0; color: var(--blue); font-family: var(--serif); font-size: .8rem; text-align: right; }
.course-info-section h2 { margin: 0 0 1.2rem; font-size: clamp(1.65rem, 3vw, 2.15rem); line-height: 1.1; }
.course-info-section > p:not(.section-number) { max-width: 66ch; margin: 0; color: var(--ink-soft); font-family: var(--serif); font-size: 1.08rem; line-height: 1.72; }
.course-info-section > p:not(.section-number) + p:not(.section-number) { margin-top: 1.15rem; }
.course-info-section .course-info-intro { margin-bottom: 1.5rem; }
.lecturer-profile { display: grid; grid-template-columns: minmax(0, 1fr) 16.5rem; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.lecturer-copy p { max-width: 66ch; margin: 0; color: var(--ink-soft); font-family: var(--serif); font-size: 1.08rem; line-height: 1.72; }
.lecturer-copy p + p { margin-top: 1.15rem; }
.lecturer-portrait { margin: .35rem .65rem .65rem 0; }
.lecturer-portrait img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); box-shadow: .65rem .65rem 0 var(--blue-wash); }
.assessment-heading { max-width: 66ch; margin: 2.35rem 0 .8rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); font-size: 1.2rem; line-height: 1.25; }
.course-audio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.course-audio-card { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; min-height: 10rem; padding: 1.35rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--blue-wash); }
.course-audio-card button { display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid var(--blue); border-radius: 50%; background: var(--surface); color: var(--blue); }
.course-audio-card button:disabled { cursor: default; opacity: .55; }
.course-audio-card button span { padding-left: .15rem; font-size: .85rem; }
.course-audio-card p { margin: .15rem 0 .45rem; color: var(--blue); font-size: .62rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.course-audio-card h3 { margin: 0; font-size: 1.2rem; line-height: 1.15; }
.course-audio-card small { display: block; margin-top: .7rem; color: var(--muted); font-size: .68rem; }
.course-audio-card audio { grid-column: 1 / -1; align-self: end; width: 100%; height: 2.25rem; margin-top: .35rem; }
.course-audio-card.is-ready { grid-template-columns: 1fr; background: var(--green-wash); }
.course-audio-card.is-ready p { color: var(--green); }
.course-info-section .course-info-pending { padding-left: 1rem; border-left: 3px solid var(--blue); font-family: var(--sans); font-size: .9rem; line-height: 1.6; }
.course-info-back { padding-top: 2.5rem; }

/* Week landing */
.week-home main, .class-landing main, .explore-page main, .practice-page main, .review-page main, .atlas-page main, .tools-page main { padding: clamp(2.5rem, 6vw, 6rem) clamp(1.2rem, 6vw, 7rem); }
.week-hero { max-width: 850px; padding-bottom: clamp(3rem, 8vw, 7rem); }
.week-hero h1 { margin: 0; font-size: clamp(2.2rem, 4.6vw, 4.35rem); line-height: .98; }
.tool-hero h1 { margin: 0; font-size: clamp(2.45rem, 5.7vw, 5.5rem); line-height: .97; }
.tool-hero h1.explorer-title { font-size: clamp(2.3rem, 5vw, 4.8rem); }
.hero-question { margin: 1.5rem 0 0; color: var(--blue); font-family: var(--serif); font-size: clamp(1.25rem, 2.5vw, 1.9rem); line-height: 1.2; }
.hero-copy, .tool-hero > p:last-child { max-width: 68ch; color: var(--ink-soft); font-size: 1.02rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.week-map, .outcomes { border-top: 3px solid var(--ink); padding: 1.5rem 0 4rem; }
.section-heading { display: grid; grid-template-columns: 12rem 1fr; align-items: baseline; margin-bottom: 1rem; }
.section-heading.simple { display: block; }
.section-heading h2 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 2.05rem); }
.mode-row { display: grid; grid-template-columns: 3rem 8rem minmax(0, 1fr) 9rem; gap: 1.2rem; align-items: center; min-height: 6.2rem; border-bottom: 1px solid var(--rule); text-decoration: none; }
.mode-row i { color: var(--muted); font-family: var(--serif); font-style: normal; }
.mode-row strong { font-family: var(--serif); font-size: 1.3rem; }
.mode-row span { color: var(--ink-soft); }
.mode-row small { color: var(--muted); text-align: right; }
.mode-row:hover strong { color: var(--blue); }
.outcomes ol { max-width: 830px; margin-left: 12rem; padding: 0; list-style: none; counter-reset: outcome; }
.outcomes li { counter-increment: outcome; display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.outcomes li::before { content: counter(outcome, decimal-leading-zero); color: var(--blue); font-family: var(--serif); }

/* Reading */
.reading-page main { background: var(--surface); }
.reading { width: min(860px, calc(100% - 3rem)); margin: 0 auto; padding: 0 0 6rem; }
.reading-progress { display: flex; flex-wrap: wrap; gap: 0; padding: 1.2rem 0; border-bottom: 1px solid var(--rule); }
.reading-progress { scrollbar-width: none; }
.reading-progress::-webkit-scrollbar { display: none; }
.reading-progress a { flex: 0 0 auto; display: grid; grid-template-columns: 1.5rem auto; gap: .25rem; padding: .45rem .8rem; color: var(--muted); text-decoration: none; font-size: .68rem; border-right: 1px solid var(--rule); }
.reading-progress a span { font-family: var(--serif); }
.reading-progress a[aria-current="page"] { color: var(--blue); font-weight: 800; }
.reading-header { padding: clamp(2.6rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 3px solid var(--ink); }
.reading-header h1 { max-width: 16ch; margin: 0; font-size: clamp(2.25rem, 4.2vw, 3.4rem); line-height: 1.04; }
.reading-question { max-width: 38ch; margin: 1.2rem 0; color: var(--blue); font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.3; }
.lede { max-width: 66ch; margin: 1.4rem 0 0; color: var(--ink-soft); font-family: var(--serif); font-size: 1.14rem; line-height: 1.72; }
.reading-section { position: relative; padding: 3rem 0 1.25rem; }
.reading-section + .reading-section { border-top: 1px solid var(--rule); }
.section-number { position: absolute; top: 3.32rem; left: -4.5rem; width: 3rem; margin: 0; color: var(--blue); font-family: var(--serif); font-size: .8rem; text-align: right; }
.reading-section h2, .reading-section h3 { margin: 0 0 1.2rem; font-size: clamp(1.4rem, 2.35vw, 1.8rem); line-height: 1.2; }
.reading-section p { margin: 0 0 1.15rem; font-family: var(--serif); font-size: 1.08rem; line-height: 1.78; }
.reading-section > ul, .reading-section > ol { margin: 0 0 1.3rem; padding-left: 1.3rem; font-family: var(--serif); font-size: 1.08rem; line-height: 1.7; }
.reading-section > ul li + li, .reading-section > ol li + li { margin-top: .45rem; }
.reading-section .katex, .equation-strip .katex { font-size: 1.06em; }
.katex-display { margin: 1.1em 0; overflow-x: auto; overflow-y: hidden; }
.concept { display: inline; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.concept:hover, .concept:focus-visible { background: var(--blue-wash); }
.equation { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 2rem 0; padding: 1.25rem 1.4rem; border-left: 4px solid var(--blue); background: var(--blue-wash); }
.equation.seller { border-left-color: var(--red); background: var(--red-wash); }
.equation.solved { border-left-color: var(--green); background: var(--green-wash); }
.equation > span { color: var(--ink-soft); font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.equation strong { min-width: 0; max-width: 100%; padding-right: .25rem; overflow-x: auto; overflow-y: hidden; font-family: var(--serif); font-size: 1.35rem; }
.equation strong .equation-join { font-weight: 400; }
.equation strong.equation-stack { display: grid; justify-items: center; gap: .15rem; line-height: 1.25; }
.equation-stack > span { white-space: nowrap; }
.equation strong.equation-aligned { display: grid; grid-template-columns: max-content max-content max-content; column-gap: .45rem; row-gap: .2rem; align-items: baseline; }
.equation-aligned-wrap { overflow-x: auto; }
.equation-aligned-wrap > strong.equation-aligned { overflow: visible; }
.equation-aligned > span { white-space: nowrap; }
.equation-aligned > span:nth-child(3n + 1) { justify-self: end; text-align: right; }
.equation-aligned > span:nth-child(3n + 2) { justify-self: center; }
.equation.derivation { display: block; overflow-x: auto; padding-left: .7rem; }
.equation.derivation > strong { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr) max-content; column-gap: .55rem; row-gap: .7rem; align-items: baseline; min-width: 42rem; width: 100%; font-size: 1.05rem; }
.derivation-line { display: contents; }
.derivation-line > span:first-child { justify-self: end; text-align: right; }
.derivation-line > small { justify-self: stretch; min-width: 0; max-width: 100%; padding-right: .65rem; color: var(--ink-soft); font-family: var(--sans); font-size: .68rem; font-weight: 650; line-height: 1.25; overflow-wrap: break-word; text-align: right; white-space: nowrap; }
.prompt { position: relative; margin: 2.2rem 0; padding: 1.25rem 1.4rem 1.25rem 4.1rem; border-top: 1px solid var(--blue); border-bottom: 1px solid var(--blue); }
.prompt::before { content: ""; position: absolute; top: 1.25rem; left: 1.3rem; width: 1.5rem; height: 1.5rem; background: url("identity/note-question.svg") center / contain no-repeat; }
.prompt span { color: var(--blue); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.prompt p { margin: .55rem 0 0; }
.prompt ol { margin: .85rem 0 0; padding-left: 1.25rem; font-family: var(--serif); font-size: 1.02rem; line-height: 1.62; }
.prompt li + li { margin-top: .35rem; }
.model-warning { position: relative; margin: 2.5rem 0 1rem; padding: 1.4rem 1.5rem 1.35rem 4.2rem; border-top: 2px solid var(--blue); background: var(--blue-wash); }
.model-warning::before { content: ""; position: absolute; top: 1.4rem; left: 1.35rem; width: 1.55rem; height: 1.55rem; background: url("identity/note-warning.svg") center / contain no-repeat; }
.reading-section .model-warning-label { margin: 0; color: var(--blue); font-family: var(--sans); font-size: .68rem; font-weight: 800; letter-spacing: .1em; line-height: 1.4; text-transform: uppercase; }
.reading-section .model-warning h3 { margin: .45rem 0 .8rem; font-size: 1.2rem; line-height: 1.3; }
.reading-section .model-warning p:not(.model-warning-label) { margin: 0 0 .8rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.62; }
.reading-section .model-warning p:last-child { margin-bottom: 0; }
.reading-self-check { margin: 0 0 2rem; border-top: 1px solid var(--blue); }
.reading-self-check details { border-bottom: 1px solid var(--rule); }
.reading-self-check summary { position: relative; padding: 1rem 2.5rem 1rem 0; cursor: pointer; list-style: none; font-family: var(--serif); font-size: 1.02rem; line-height: 1.5; }
.reading-self-check summary::-webkit-details-marker { display: none; }
.reading-self-check summary::after { content: "+"; position: absolute; right: .25rem; top: .9rem; color: var(--blue); font-family: var(--sans); font-size: 1.25rem; }
.reading-self-check details[open] summary::after { content: "−"; }
.reading-self-check details > p { margin: 0; padding: 0 2.5rem 1rem 0; color: var(--ink-soft); font-size: 1rem; }
.matching-figure { margin: 2.3rem 0 3rem; }
.matching-figure figcaption { margin-bottom: .8rem; color: var(--ink-soft); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tikz-figure { margin: 1.6rem auto; max-width: 34rem; padding: 1.25rem; border: 1px solid var(--rule); background: #fff; text-align: center; }
.tikz-figure img { display: block; width: 100%; height: auto; }
.tikz-figure figcaption { margin-top: .75rem; color: var(--muted); font-size: .78rem; }
.tikz-figure.bill-figure { max-width: 24rem; padding: .5rem; }
.image-zoom-frame { position: relative; }
.image-mark { position: absolute; z-index: 1; left: 1%; width: 98%; background: rgba(245, 190, 40, .32); outline: 1.5px solid rgba(200, 140, 0, .9); cursor: help; }
.image-mark::after { content: ""; position: absolute; inset: -3px 0; }
.image-mark:hover, .image-mark:focus { z-index: 2; background: rgba(245, 190, 40, .5); }
.image-mark-note { position: absolute; left: 50%; bottom: calc(100% + .45rem); display: none; width: min(19rem, 80vw); padding: .6rem .75rem; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-soft); box-shadow: 0 8px 24px rgba(24, 32, 43, .16); font-size: .78rem; font-weight: 400; line-height: 1.45; text-align: left; transform: translateX(-50%); }
.image-mark-note strong { color: var(--ink); }
.image-mark:hover .image-mark-note, .image-mark:focus .image-mark-note { display: block; }
.image-zoom { position: relative; display: block; border: 0; cursor: zoom-in; }
.image-zoom-lens { position: absolute; right: .5rem; bottom: .5rem; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(24, 32, 43, .78); color: #fff; transition: transform .15s ease; }
.image-zoom:hover .image-zoom-lens, .image-zoom:focus-visible .image-zoom-lens { transform: scale(1.12); }
.image-dialog { width: min(72rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); border: 1px solid var(--rule); padding: .75rem; background: #fff; box-shadow: 0 22px 80px rgba(24, 32, 43, .2); cursor: zoom-out; }
.image-dialog::backdrop { background: rgba(24, 32, 43, .6); }
.image-dialog .dialog-close { display: block; float: none; margin: 0 0 .5rem auto; }
.image-dialog img { display: block; width: 100%; height: auto; }
.learning-point { margin: 2rem 0; padding: 1.1rem 1.35rem 1.2rem; border-left: 4px solid var(--green); background: var(--green-wash); }
.learning-point .eyebrow { margin: 0 0 .35rem; color: var(--green); }
.learning-point p:last-child { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; }
.reading-interactive { margin: 2.4rem 0 2.8rem; }
.reading-interactive .kg-container { width: 100%; }
.kg-container .kg-wrap { flex-wrap: wrap !important; }
.kg-container .kg-graph { flex: 1 1 420px !important; }
.kg-container .kg-sidebar { flex: 1 1 300px !important; }
.mainland-entry-explorer .kg-wrap { flex-wrap: wrap !important; }
.mainland-entry-explorer .kg-graph { min-width: min(24rem, 100%); }
.equilibrium-explorer .kg-wrap { align-items: stretch; }
.equilibrium-explorer .kg-sidebar { align-self: stretch; }
.equilibrium-explorer .kg-sidebar .kg-card:only-child { flex: 1; }
.reading-interactive figcaption { margin-top: .65rem; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.auto-eco-output .kg-wrap { align-items: stretch; }
.interactive-tools { display: flex; justify-content: flex-end; align-items: center; gap: .45rem; margin-bottom: .55rem; }
.interactive-size-controls { display: none; align-items: stretch; border: 1px solid var(--rule); }
.interactive-size-controls button { width: 2.25rem; min-height: 2.25rem; border: 0; background: var(--surface); color: var(--blue); font: 800 1rem/1 var(--sans); cursor: pointer; }
.interactive-size-controls button + button { border-left: 1px solid var(--rule); }
.interactive-size-controls button:hover { background: var(--blue-wash); }
.interactive-size-controls button:disabled { color: var(--muted); cursor: default; opacity: .45; }
.interactive-float-toggle { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.25rem; border: 1px solid var(--blue); padding: .45rem .7rem; background: var(--surface); color: var(--blue); font: 800 .7rem/1 var(--sans); cursor: pointer; }
.interactive-float-toggle:hover { background: var(--blue-wash); }
.interactive-float-toggle > [aria-hidden="true"] { font-size: 1rem; line-height: .7; }
.floating-interactive-placeholder { margin: 2.4rem 0 2.8rem; }
.reading-interactive.is-floating { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; width: min(var(--floating-width, 660px), calc(100vw - 2.5rem)); max-height: calc(100vh - 7rem); margin: 0; padding: .8rem; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--blue); background: var(--surface); box-shadow: 0 1.2rem 3.5rem rgba(24, 32, 43, .24); }
.reading-interactive.is-floating .interactive-size-controls { display: inline-flex; }
.reading-interactive.is-floating .interactive-tools { position: sticky; top: -.8rem; z-index: 3; margin: -.8rem -.8rem .55rem; padding: .55rem .7rem; border-bottom: 1px solid var(--rule); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); }
.reading-interactive.is-floating figcaption { margin-bottom: 0; }
.profit-range-check { margin: -1.1rem 0 2.4rem; padding: 1.25rem 1.4rem; border-top: 2px solid var(--blue); background: var(--blue-wash); }
.reading-section .profit-range-check > p { margin: 0; }
.profit-range-note { margin-top: .35rem !important; color: var(--ink-soft); font-size: .86rem !important; }
.profit-range-fields { display: grid; grid-template-columns: minmax(9rem, 1fr) auto minmax(9rem, 1fr); gap: .85rem; align-items: end; margin-top: 1rem; }
.profit-range-fields label { display: grid; gap: .4rem; color: var(--ink-soft); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.profit-range-fields input { width: 100%; border: 1px solid var(--rule); padding: .7rem .75rem; background: white; color: var(--ink); font: 700 .95rem/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.profit-range-fields input:focus { border-color: var(--blue); outline: 2px solid color-mix(in srgb, var(--blue) 22%, transparent); outline-offset: 1px; }
.profit-range-fields input[aria-invalid="true"] { border-color: var(--red); }
.profit-range-inequality { align-self: end; padding-bottom: .72rem; color: var(--blue); font-family: var(--serif); font-size: 1rem; }
.profit-range-check button { margin-top: 1rem; border: 0; padding: .72rem 1rem; background: var(--blue); color: white; font: 800 .78rem/1 var(--sans); cursor: pointer; }
.profit-range-check button:hover { background: var(--ink); }
.reading-section .profit-range-feedback { min-height: 1.5em; margin-top: .85rem; color: var(--ink-soft); font: 750 .86rem/1.5 var(--sans); }
.reading-section .profit-range-feedback.is-correct { color: var(--green); }
.reading-section .profit-range-feedback.is-false { color: var(--red); }
.minimum-ac-check { margin: 1.4rem 0 2rem; }
.minimum-ac-check .profit-range-fields { grid-template-columns: minmax(12rem, 22rem); }
.matching-graph { display: block; width: 100%; height: auto; }
.matching-edge { stroke: var(--rule); stroke-width: 2; vector-effect: non-scaling-stroke; transition: stroke .18s ease, stroke-width .18s ease; }
.matching-edge.is-active { stroke: var(--blue); stroke-width: 5; }
.matching-node rect { stroke: var(--rule); stroke-width: 1; fill: var(--surface); }
.matching-node.buyer rect { fill: var(--blue-wash); }
.matching-node.seller rect { fill: var(--green-wash); }
.matching-node text { fill: var(--ink); font-family: var(--sans); font-size: 22px; font-weight: 700; text-anchor: middle; }
.matching-node .matching-value { fill: var(--ink-soft); font-size: 20px; font-weight: 500; }
.matching-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: .7rem; }
.matching-controls button { min-height: 2.75rem; border: 1px solid var(--rule); padding: .65rem .75rem; background: transparent; color: var(--ink); font-size: .78rem; font-weight: 750; }
.matching-controls button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-wash); color: var(--blue); }
.matching-readout { min-height: 2rem; margin: .8rem 0 0 !important; color: var(--ink-soft); font-size: 1rem !important; line-height: 1.5 !important; }
.question-sequence { margin: 2.2rem 0; border-top: 3px solid var(--ink); }
.question-sequence > h3 { margin-top: 1.5rem; }
.question-step { scroll-margin-top: 6rem; padding: 1.6rem 0 2rem; border-top: 1px solid var(--rule); }
.reading-section .question-step > h3 { font-size: 1.2rem; line-height: 1.35; }
.question-step[hidden], .question-answer[hidden] { display: none; }
.stage-label { display: block; margin-bottom: .75rem; color: var(--blue); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.question-response { display: grid; gap: .75rem; margin: 1.4rem 0 0; padding: 1.2rem; background: var(--blue-wash); }
.question-response label { color: var(--ink-soft); font-size: .78rem; font-weight: 750; }
.question-response textarea { width: 100%; min-height: 7.5rem; resize: vertical; border: 1px solid var(--rule); padding: .9rem; background: white; color: var(--ink); font-family: var(--serif); font-size: 1rem; line-height: 1.55; }
.question-response-mcq fieldset { display: grid; gap: .65rem; margin: 0; border: 0; padding: 0; }
.question-response-mcq legend { margin-bottom: .7rem; color: var(--ink-soft); font-size: .78rem; font-weight: 750; }
.question-response-mcq label { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; border: 1px solid var(--rule); padding: .85rem .95rem; background: white; color: var(--ink); font-family: var(--serif); font-size: 1rem; font-weight: 500; line-height: 1.45; cursor: pointer; }
.question-response-mcq label:has(input:checked) { border-color: var(--blue); background: var(--surface); }
.question-response-mcq input { margin-top: .25rem; accent-color: var(--blue); }
.question-response-reveal { padding: 0; background: transparent; }
.question-response button { justify-self: start; min-height: 2.75rem; border: 0; padding: .75rem 1.05rem; background: var(--blue); color: white; font-size: .78rem; font-weight: 800; }
.question-response button:disabled { opacity: .45; }
.question-answer { scroll-margin-top: 6rem; margin-top: 1rem; padding: 1.15rem 1.3rem; border-left: 4px solid var(--green); background: var(--green-wash); }
.question-answer > span { display: block; margin-bottom: .5rem; color: var(--green); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.reading-section .question-answer p { margin: 0; font-size: 1rem; line-height: 1.6; }
.reading-section .question-answer .choice-result { margin-bottom: .45rem; color: var(--ink-soft); font-family: var(--sans); font-weight: 800; }
.reading-section .question-answer .choice-result.is-correct { color: var(--green); }
.reading-section .question-answer .choice-result.is-false { color: var(--red); }
.classification-match { margin: 2.5rem 0; border-top: 3px solid var(--ink); }
.classification-match > h3 { margin: 1.5rem 0 .6rem; }
.classification-match > p { margin-top: 0; color: var(--ink-soft); font-size: 1rem; }
.classification-head, .classification-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(10rem, .75fr) minmax(0, 1.35fr); gap: 1rem; align-items: start; }
.classification-head { padding: .9rem .75rem .55rem; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.classification-row { padding: 1rem .75rem; border-top: 1px solid var(--rule); }
.classification-row label { font-family: var(--serif); font-size: 1rem; line-height: 1.5; cursor: pointer; }
.classification-row select { width: 100%; border: 1px solid var(--rule); border-radius: 0; padding: .65rem .7rem; background: white; color: var(--ink); font: 750 .78rem/1.3 var(--sans); }
.classification-row.is-correct select { border-color: var(--green); }
.classification-row.is-false select { border-color: var(--red); }
.classification-feedback { color: var(--ink-soft); font-size: .8rem; line-height: 1.45; }
.classification-row.is-correct .classification-feedback { color: var(--green); }
.classification-row.is-false .classification-feedback { color: var(--red); }
.classification-actions { display: flex; align-items: center; gap: 1rem; padding: 1rem .75rem; border-top: 1px solid var(--rule); }
.classification-actions button { min-height: 2.75rem; border: 0; padding: .75rem 1.05rem; background: var(--blue); color: white; font-size: .78rem; font-weight: 800; }
.classification-actions button:disabled { opacity: .45; }
.classification-actions p { margin: 0; color: var(--ink-soft); font-family: var(--sans); font-size: .8rem; font-weight: 750; }
.classification-print-key { display: none; }
.solution-locked { position: relative; margin: 2rem 0; padding: 1.15rem 1.3rem 1.15rem 4rem; border: 1px solid var(--rule); background: var(--surface); }
.solution-locked::before { content: ""; position: absolute; top: 1.15rem; left: 1.25rem; width: 1.5rem; height: 1.5rem; background: url("identity/note-warning.svg") center / contain no-repeat; }
.solution-locked span { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.solution-locked p { margin: .45rem 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }
.released-solution { margin: 2rem 0; border-top: 1px solid var(--green); border-bottom: 1px solid var(--green); }
.released-solution summary { padding: 1rem 0; color: var(--green); cursor: pointer; font-family: var(--sans); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.released-solution > p { color: var(--ink-soft); font-size: 1rem; }
.interval { display: grid; grid-template-columns: auto 1fr auto; align-items: center; margin: 2.4rem 0; color: var(--ink-soft); font-size: .72rem; font-weight: 750; }
.interval i { height: 5px; background: var(--green); }
.endpoint { position: relative; padding-top: 1.5rem; }
.endpoint::before { content: ""; position: absolute; top: .45rem; width: 1rem; height: 1rem; border-radius: 50%; }
.endpoint.seller { color: var(--red); }
.endpoint.seller::before { right: -.5rem; background: var(--red); }
.endpoint.buyer { color: var(--blue); }
.endpoint.buyer::before { left: -.5rem; background: var(--blue); }
.surplus-grid, .distinction { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); margin: 2rem 0; }
.surplus-grid { grid-template-columns: repeat(3, 1fr); }
.surplus-grid div, .distinction div { padding: 1.2rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.surplus-grid > div > span, .distinction > div > span { display: block; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.surplus-grid strong { display: block; margin-top: .5rem; font-family: var(--serif); font-size: 1.05rem; }
.formula-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.75rem; margin: 2.25rem 0 2.75rem; }
.formula-pair > div { padding-top: 1rem; border-top: 2px solid var(--blue); }
.formula-pair > div:last-child { border-top-color: var(--green); }
.formula-pair > div > span { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.formula-pair > div > strong { display: block; margin-top: .65rem; color: var(--ink); font-family: var(--serif); font-size: 1.85rem; font-weight: 600; letter-spacing: normal; line-height: 1; text-transform: none; }
.reading-section .formula-pair > div > p { max-width: 24ch; margin: .65rem 0 0; color: var(--ink-soft); font-size: .98rem; font-weight: 400; letter-spacing: normal; line-height: 1.5; text-transform: none; }
.distinction p { margin: .5rem 0 0; font-size: 1rem; line-height: 1.45; }
.reading table:not(.kg-container *) { width: 100%; margin: 2rem 0; border-collapse: collapse; font-size: .86rem; }
.reading th:not(.kg-container *), .reading td:not(.kg-container *) { padding: .85rem .6rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.reading th:not(.kg-container *) { color: var(--muted); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.reading th .katex { letter-spacing: normal; text-transform: none; font-size: 1.4em; }
.reading .tools-table thead th { color: var(--ink); font-weight: 800; }
.reading th .plain-name { display: block; margin-top: .3rem; color: var(--ink-soft); }
.person-ref { position: relative; border-bottom: 1px dotted currentColor; cursor: help; }
.person-card { position: absolute; z-index: 20; left: 50%; bottom: calc(100% + .55rem); display: none; grid-template-columns: 72px minmax(0, 1fr); gap: .75rem; width: min(22rem, 80vw); padding: .75rem; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-soft); box-shadow: 0 8px 24px rgba(24,32,43,.16); font-size: .78rem; line-height: 1.45; text-align: left; transform: translateX(-50%); }
.person-card-text { grid-template-columns: minmax(0, 1fr); }
.person-card-credit { display: block; margin-top: .4rem; font-size: .68rem; color: var(--ink-muted, var(--ink-soft)); }
.person-card img { display: block; width: 72px; height: auto; filter: grayscale(1); }
.person-card strong { color: var(--ink); }
.person-ref:hover .person-card, .person-ref:focus .person-card, .person-ref:focus-within .person-card { display: grid; }
.text-link { color: var(--blue); font-family: var(--sans); font-size: .9rem; font-weight: 750; text-underline-offset: 3px; }
.takeaway { position: relative; margin: 3.5rem 0 0; padding: 1.1rem 1.25rem 1.2rem 4rem; border-top: 2px solid var(--green); background: var(--green-wash); }
.takeaway::before { content: ""; position: absolute; top: 1.15rem; left: 1.25rem; width: 1.5rem; height: 1.5rem; background: url("identity/note-summary.svg") center / contain no-repeat; }
.takeaway p { margin: 0; color: var(--green); font-family: var(--sans); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.takeaway h2, .takeaway h3 { margin: .45rem 0 0; color: var(--ink-soft); font-family: var(--serif); font-size: 1.08rem; font-style: italic; font-weight: 400; line-height: 1.6; }
.reading-pagination { display: grid; grid-template-columns: 1fr 1fr; margin-top: 4rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.reading-pagination a { display: grid; padding: 1.2rem 0; text-decoration: none; font-family: var(--serif); }
.reading-pagination a:last-child { text-align: right; padding-left: 1rem; }
.reading-pagination span { color: var(--muted); font-family: var(--sans); font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.reading-pagination a:hover { color: var(--blue); }

.concept-dialog { width: min(33rem, calc(100% - 2rem)); border: 1px solid var(--rule); padding: 2rem; box-shadow: 0 22px 80px rgba(24, 32, 43, .2); }
.concept-dialog::backdrop { background: rgba(24, 32, 43, .42); backdrop-filter: blur(3px); }
.dialog-close { float: right; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .76rem; font-weight: 750; }
.dialog-kicker { display: flex; align-items: center; gap: .65rem; margin: 0; color: var(--blue); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dialog-kicker::before { content: ""; flex: 0 0 1.5rem; width: 1.5rem; height: 1.5rem; background: url("identity/note-definition.svg") center / contain no-repeat; }
.concept-dialog h2 { margin: .7rem 0 1rem; font-size: 1.65rem; }
.concept-dialog p { color: var(--ink-soft); }
.dialog-note { padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .78rem; }

/* Complete notes */
.print-contents { margin: 2rem 0 5rem; padding: 1.5rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.print-contents h2 { margin: 0 0 .8rem; font-size: 1rem; }
.print-contents a { display: grid; grid-template-columns: 2rem 1fr; padding: .4rem 0; text-decoration: none; color: var(--ink-soft); }
.print-contents a:hover { color: var(--blue); }
.print-chapter { padding-top: 2rem; margin-top: 5rem; border-top: 4px solid var(--ink); }
.print-chapter > header .eyebrow { margin: 0; }
.print-chapter > header h2 { margin: .4rem 0; font-size: clamp(2.1rem, 5vw, 3.3rem); }
.print-chapter .chapter-question { color: var(--blue); font-family: var(--serif); font-size: 1.3rem; }
.print-chapter .chapter-lede { max-width: 66ch; color: var(--ink-soft); font-family: var(--serif); font-size: 1.06rem; line-height: 1.65; }
.chapter-summary { position: relative; margin: 2rem 0 0; padding: 1rem 0 1rem 2.4rem; border-top: 2px solid var(--green); font-family: var(--serif); font-size: 1.02rem; line-height: 1.55; }
.chapter-summary::before { content: ""; position: absolute; top: 1.05rem; left: 0; width: 1.5rem; height: 1.5rem; background: url("identity/note-summary.svg") center / contain no-repeat; }
.chapter-summary strong { color: var(--green); }
.print-brand { display: none; width: 58mm; height: auto; margin-bottom: 16mm; }

/* Class landing and tools */
.tool-hero { max-width: 920px; padding-bottom: clamp(3rem, 7vw, 6rem); }
.deck-overview { display: grid; grid-template-columns: 1fr; border-top: 3px solid var(--ink); border-left: 1px solid var(--rule); }
.deck-overview article { min-height: 16rem; padding: 2rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; align-items: flex-start; }
.deck-overview h2 { margin: 0; font-size: clamp(1.65rem, 3.3vw, 2.5rem); }
.deck-overview p:not(.eyebrow) { max-width: 54ch; color: var(--ink-soft); }
.deck-overview .primary-action { margin-top: auto; }
.edition-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; margin-top: 3rem; padding: 1.5rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.edition-row h2 { margin: 0; }
.edition-row p { margin: .3rem 0 0; color: var(--ink-soft); }
.edition-row > span { display: grid; gap: .35rem; }
.edition-row > span a { color: var(--blue); font-size: .8rem; font-weight: 800; }

.explorer { container: bakery-explorer / inline-size; border-top: 3px solid var(--ink); background: var(--surface); }
.explorer-controls { display: grid; grid-template-columns: auto repeat(3, minmax(9rem, 1fr)) auto; gap: 1.2rem; align-items: end; padding: 1.4rem; border-bottom: 1px solid var(--rule); }
.stage-switch { display: grid; grid-template-columns: 1fr 1fr; }
.stage-switch button { border: 1px solid var(--rule); padding: .65rem .75rem; background: white; color: var(--muted); cursor: pointer; font-size: .72rem; font-weight: 800; }
.stage-switch button + button { border-left: 0; }
.stage-switch button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: white; }
.control label { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-soft); font-size: .72rem; font-weight: 700; }
.control output { color: var(--blue); font-variant-numeric: tabular-nums; }
.control input { width: 100%; accent-color: var(--blue); }
.control.is-disabled { opacity: .45; }
.reset-button { border: 1px solid var(--rule); background: white; padding: .58rem .8rem; color: var(--ink-soft); cursor: pointer; font-size: .72rem; font-weight: 750; }
@container bakery-explorer (max-width: 52rem) {
  .explorer-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stage-switch { grid-column: 1 / -1; }
  .control { min-width: 0; }
  .reset-button { justify-self: start; }
}
.equation-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule); }
.equation-strip div { padding: 1rem 1.4rem; border-right: 1px solid var(--rule); }
.equation-strip > div > span { display: block; color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.equation-strip strong { display: block; margin-top: .3rem; font-family: var(--serif); font-size: 1rem; }
.graph-grid { display: grid; grid-template-columns: 1fr 1fr; }
.graph-grid figure { margin: 0; padding: 1.4rem; min-width: 0; }
.graph-grid figure + figure { border-left: 1px solid var(--rule); }
.graph-grid figcaption { color: var(--ink-soft); font-size: .75rem; font-weight: 750; }
.graph-grid figcaption span { float: right; color: var(--blue); font-family: var(--serif); }
.graph-grid svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-axis { stroke: var(--ink); stroke-width: 1; }
.chart-grid { stroke: var(--rule); stroke-width: 1; }
.chart-label { fill: var(--muted); font: 12px var(--sans); }
.chart-cost { fill: none; stroke: var(--blue); stroke-width: 4; }
.chart-ac { fill: none; stroke: var(--blue); stroke-width: 4; }
.chart-mc { fill: none; stroke: var(--red); stroke-width: 4; }
.chart-intersection { fill: var(--green); stroke: white; stroke-width: 3; }
.chart-capacity-shade { fill: var(--surface); opacity: .78; pointer-events: none; }
.chart-capacity-line { stroke: var(--green); stroke-width: 3; stroke-dasharray: 8 6; pointer-events: none; }
.chart-capacity-handle { fill: var(--green); stroke: white; stroke-width: 3; pointer-events: none; }
.chart-capacity-label { fill: var(--green); font: 800 12px var(--sans); pointer-events: none; }
.chart-capacity-hit { fill: transparent; cursor: ew-resize; touch-action: none; }
.chart-capacity-hit:focus { outline: none; stroke: color-mix(in srgb, var(--green) 30%, transparent); stroke-width: 2; }
.graph-legend { display: flex; justify-content: flex-end; gap: 1.5rem; padding: 0 1.4rem 1.4rem; color: var(--ink-soft); font-size: .7rem; }
.graph-legend span::before { content: ""; display: inline-block; width: 1.6rem; height: 3px; margin-right: .5rem; vertical-align: middle; background: var(--blue); }
.graph-legend .mc::before { background: var(--red); }
.observe { display: grid; grid-template-columns: 12rem 1fr 1fr; gap: 2rem; margin-top: 3rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.observe h2 { margin: 0; }
.observe p:not(.eyebrow) { color: var(--ink-soft); }
.standalone-applet { margin: 0; border-top: 3px solid var(--ink); background: var(--surface); }
.video-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin: 1.75rem 0; }
.video-embed { margin: 0; padding: .5rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); }
.video-embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 3px; background: #000; }
.video-embed figcaption { margin: .5rem .15rem .1rem; color: var(--muted); font-family: var(--sans); font-size: .78rem; line-height: 1.35; }
@media (max-width: 720px) { .video-pair { grid-template-columns: 1fr; } }
.standalone-applet iframe { display: block; width: 100%; height: clamp(38rem, 56vw, 48rem); border: 0; background: white; }
.standalone-applet figcaption { padding: .8rem 1rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .75rem; }

.market-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 1.2rem; align-items: end; padding: 1.4rem; border-bottom: 1px solid var(--rule); }
.market-readout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.market-readout > div { min-width: 0; padding: 1rem 1.2rem; border-right: 1px solid var(--rule); }
.market-readout > div:last-child { border-right: 0; }
.market-readout span { display: block; color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.market-readout strong { display: block; margin: .2rem 0; color: var(--blue); font-family: var(--serif); font-size: 1.35rem; }
.market-readout small { color: var(--ink-soft); font-size: .72rem; }
.market-chart { margin: 0; padding: 1.4rem; }
.market-chart figcaption { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; color: var(--ink-soft); font-size: .75rem; font-weight: 750; }
.market-chart figcaption span { color: var(--blue); font-family: var(--serif); }
.market-chart svg { display: block; width: 100%; height: auto; }
.market-grid { stroke: var(--rule); stroke-width: 1; }
.market-axis { stroke: var(--ink); stroke-width: 1.5; }
.market-axis-label { fill: var(--muted); font: 12px var(--sans); }
.market-demand-line { stroke: var(--blue); stroke-width: 4; }
.market-supply-line { stroke: var(--red); stroke-width: 4; }
.market-price-line { stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 6 5; }
.market-demand-point { fill: var(--blue); stroke: white; stroke-width: 3; }
.market-supply-point { fill: var(--red); stroke: white; stroke-width: 3; }
.market-drop { stroke-width: 1.5; stroke-dasharray: 4 4; }
.market-demand-drop { stroke: var(--blue); }
.market-supply-drop { stroke: var(--red); }
.market-series-label { font: 700 14px var(--sans); }
.market-series-label.demand { fill: var(--blue); }
.market-series-label.supply { fill: var(--red); }

.question-card { width: min(760px, 100%); border-top: 3px solid var(--ink); padding-top: 2rem; }
.question-stage { display: flex; align-items: center; gap: .7rem; color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.question-stage span { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; background: var(--blue); color: white; border-radius: 50%; }
.question-card h2 { font-size: clamp(1.45rem, 3.3vw, 2.3rem); }
.question-card form { display: grid; gap: .55rem; }
.question-card label { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1rem; border: 1px solid var(--rule); background: var(--surface); cursor: pointer; }
.question-card label:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }
.question-card input { accent-color: var(--blue); }
.question-card form button { justify-self: start; margin-top: .8rem; border: 0; background: var(--blue); color: white; padding: .75rem 1.1rem; cursor: pointer; font-size: .8rem; font-weight: 800; }
.question-card form button:disabled { opacity: .45; cursor: not-allowed; }
.question-feedback { margin-top: 1.5rem; padding: 1.5rem; border-left: 4px solid var(--green); background: var(--green-wash); }
.question-feedback p { margin-top: 0; }
.question-feedback a { color: var(--green); font-weight: 800; }
.transfer { width: min(760px, 100%); margin-top: 5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.transfer h2 { font-size: 1.65rem; }

.practice-ledger { max-width: 920px; border-top: 3px solid var(--ink); }
.practice-ledger > :is(a, .practice-placeholder) { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; min-height: 8rem; border-bottom: 1px solid var(--rule); text-decoration: none; }
.practice-placeholder { opacity: .72; }
.practice-ledger i { color: var(--blue); font-family: var(--serif); font-size: 1.3rem; font-style: normal; }
.practice-ledger h2 { margin: 0; font-size: 1.4rem; }
.practice-ledger p { margin: .3rem 0 0; color: var(--ink-soft); }
.practice-ledger small { color: var(--muted); }
.practice-ledger a:hover h2 { color: var(--blue); }
.worksheet, .case-sheet, .case-solutions, .submission-note { width: min(900px, 100%); }
.worksheet, .case-sheet > section, .case-solutions, .submission-note { border-top: 3px solid var(--ink); padding: 2rem 0; }
.worksheet > h2, .case-solutions > h2, .submission-note h2 { margin-top: 0; font-size: clamp(1.5rem, 3.3vw, 2.25rem); }
.case-sheet h2 { margin-top: 0; font-size: clamp(1.3rem, 2.65vw, 1.85rem); }
.worksheet table:not(.kg-container *), .case-sheet table:not(.kg-container *) { width: 100%; border-collapse: collapse; background: var(--surface); }
.worksheet th:not(.kg-container *), .worksheet td:not(.kg-container *), .case-sheet th:not(.kg-container *), .case-sheet td:not(.kg-container *) { padding: .85rem; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.worksheet thead th:not(.kg-container *), .case-sheet thead th:not(.kg-container *) { color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.worksheet .exhibit-group th:not(.kg-container *) { color: var(--blue); background: var(--blue-wash); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.worksheet input { width: 5rem; border: 0; border-bottom: 1px solid var(--ink); background: transparent; }
.write-lines { margin: 2rem 0; }
.write-lines p { min-height: 2.4rem; border-bottom: 1px solid var(--rule); }
.worksheet details, .case-sheet details { margin-top: 2rem; border: 1px solid var(--rule); background: var(--surface); }
.worksheet summary, .case-sheet summary { padding: 1rem; color: var(--blue); cursor: pointer; font-weight: 800; }
.worksheet details > p, .case-sheet details > p, .case-sheet details > table:not(.kg-container *) { margin: 0; padding: 0 1rem 1rem; }
.worksheet .folded-solution { margin-top: 0; }
.solution-body { padding: 0 1rem 1.25rem; }
.solution-body p { max-width: 74ch; color: var(--ink-soft); }
.solution-body h3 { margin: 1.75rem 0 .4rem; font-size: 1.15rem; }
.solution-body h4 { margin: 1.4rem 0 .35rem; color: var(--blue); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.solution-body table { margin-top: 1rem; }
.solution-body .solution-total > * { background: var(--green-wash); font-weight: 800; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.financial-table { min-width: 38rem; }
.financial-equation { display: grid; overflow-x: auto; }
.financial-equation strong.equation-stack { min-width: max-content; }
.case-sheet > section + section { margin-top: 3rem; }
.case-sheet > section > p { max-width: 74ch; color: var(--ink-soft); }
.cost-exhibit th:first-child { width: 65%; }
.tv-cost-exhibit { min-width: 46rem; }
.tv-cost-exhibit th:first-child { width: 25%; }
.tv-cost-exhibit th:nth-child(2) { width: 35%; }
.case-solutions { margin-top: 4rem; }
.case-solutions article { padding: 1rem 0 2rem; border-bottom: 1px solid var(--rule); }
.case-solutions h3 { font-size: 1.35rem; }
.submission-note { margin-top: 4rem; padding: 2rem; border-top-color: var(--blue); background: var(--blue-wash); }
.solution-release, .released-solution { margin-top: 4rem; }
.solution-release { border-top-color: var(--blue); }
.solution-lock { display: grid; grid-template-columns: 8rem 1fr; column-gap: 2rem; align-items: baseline; padding: 1.5rem 0; }
.solution-lock .eyebrow { grid-row: 1 / span 2; }
.solution-lock h2 { margin: 0; }
.solution-lock > p:last-child { margin: .5rem 0 0; color: var(--ink-soft); }
.activity-next { display: flex; justify-content: space-between; gap: 1rem; width: min(900px, 100%); margin-top: 4rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.activity-next a { color: var(--blue); font-weight: 800; }

.retrieval-list { max-width: 860px; border-top: 3px solid var(--ink); }
.retrieval-list details { border-bottom: 1px solid var(--rule); }
.retrieval-list summary { display: grid; grid-template-columns: 3rem 1fr auto; gap: 1rem; align-items: center; padding: 1.35rem 0; cursor: pointer; list-style: none; }
.retrieval-list summary::-webkit-details-marker { display: none; }
.retrieval-list summary span { color: var(--blue); font-family: var(--serif); }
.retrieval-list summary strong { font-family: var(--serif); font-size: 1.25rem; }
.retrieval-list summary small { color: var(--muted); }
.retrieval-list details p { margin: 0 0 1.4rem 4rem; color: var(--ink-soft); }
.quiz-preview { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem; max-width: 860px; margin-top: 4rem; padding: 2rem; background: var(--blue-wash); border-top: 4px solid var(--blue); }
.quiz-preview h2 { margin: 0; font-size: 1.65rem; }
.quiz-preview p:not(.eyebrow) { max-width: 57ch; color: var(--ink-soft); }
.quiz-preview > span { display: flex; gap: .6rem; }
.atlas-hero { max-width: 850px; padding-bottom: clamp(3rem, 7vw, 6rem); }
.atlas-hero h1 { margin: 0; font-size: clamp(2.45rem, 5.7vw, 5.35rem); line-height: .97; }
.atlas-hero > p:last-child { max-width: 62ch; color: var(--ink-soft); }
.concept-map { border-top: 3px solid var(--ink); }
.concept-map-header { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; padding: 1.35rem 0 1rem; }
.concept-map-header .eyebrow { margin-bottom: .25rem; }
.concept-map-header h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.concept-map-actions { display: flex; align-items: end; justify-content: flex-end; gap: .65rem; }
.concept-map-search { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; width: min(24rem, 40vw); }
.concept-map-search input { width: 100%; min-height: 2.7rem; border: 1px solid var(--rule); border-right: 0; padding: .55rem .75rem; background: var(--surface); color: var(--ink); font-size: .78rem; }
.concept-map-search input:focus { border-color: var(--blue); }
.concept-map-search > span { display: flex; align-items: center; border: 1px solid var(--rule); border-left: 0; padding: 0 .75rem; background: var(--surface); color: var(--muted); font-size: .66rem; pointer-events: none; }
.concept-search-results { position: absolute; z-index: 8; top: calc(100% + .35rem); right: 0; left: 0; max-height: 20rem; overflow-y: auto; border: 1px solid var(--rule); background: var(--surface); box-shadow: 0 12px 34px rgba(24,32,43,.16); }
.concept-search-results button { display: grid; width: 100%; border: 0; border-bottom: 1px solid var(--rule); padding: .7rem .8rem; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.concept-search-results button:last-child { border-bottom: 0; }
.concept-search-results button:hover, .concept-search-results button:focus-visible { background: var(--blue-wash); }
.concept-search-results strong { font-family: var(--serif); font-size: .9rem; }
.concept-search-results small { margin-top: .1rem; color: var(--muted); font-size: .65rem; }
.concept-search-empty { margin: 0; padding: .85rem; color: var(--muted); font-size: .75rem; }
.concept-map-controls { display: flex; align-items: stretch; }
.concept-map-controls button { min-width: 2.7rem; min-height: 2.7rem; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-soft); cursor: pointer; font-size: .78rem; font-weight: 750; }
.concept-map-controls button + button { border-left: 0; }
.concept-map-controls button:hover { color: var(--blue); background: var(--blue-wash); }
.concept-map-status { margin: 0 0 .8rem; color: var(--muted); font-size: .75rem; }
.concept-map-stage { position: relative; height: clamp(34rem, 67vw, 48rem); overflow: hidden; border: 1px solid #111720; background: #111720; touch-action: none; }
.concept-map-world { position: absolute; inset: 0; }
.concept-map-nodes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.concept-map-node { --node-color: #5B8FE0; --depth-opacity: 1; position: absolute; top: 0; left: 0; display: inline-flex; align-items: center; gap: .32rem; width: max-content; max-width: 11rem; padding: .1rem .3rem; border: 0; border-radius: 3px; background: transparent; color: #DCE3EC; cursor: pointer; font-size: .64rem; font-weight: 650; line-height: 1.15; text-align: center; text-shadow: 0 1px 3px #111720, 0 0 6px #111720; opacity: var(--depth-opacity); pointer-events: auto; transform-origin: 50% 0; user-select: none; transition: opacity .16s ease, color .16s ease, background-color .16s ease; }
.concept-map-node:hover, .concept-map-node:focus-visible, .concept-map-node.is-active { z-index: 2000 !important; color: #FFFFFF; background: rgba(17,23,32,.82); box-shadow: inset 0 -2px 0 var(--node-color); opacity: 1; outline: none; }
.concept-map-node.is-related { color: #FFFFFF; opacity: 1; }
.concept-map-node.is-dimmed { opacity: .14; }
.concept-map-node.is-search-dimmed { opacity: .1; }
.concept-map-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: 1rem 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: .7rem; }
.concept-map-legend li { --node-color: var(--blue); display: inline-flex; align-items: center; gap: .4rem; }
.concept-map-legend i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--node-color); }
.atlas-index { margin-top: 4rem; border-top: 1px solid var(--rule); }
.atlas-index > summary { padding: 1.2rem 0; color: var(--blue); cursor: pointer; font-size: .8rem; font-weight: 800; }
.atlas-groups, .tool-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 3px solid var(--ink); border-left: 1px solid var(--rule); }
.atlas-groups article, .tool-cards > a { min-height: 15rem; padding: 2rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: rgba(255,255,255,.28); }
.atlas-groups h2, .tool-cards h2 { margin-top: 0; font-size: 1.65rem; }
.atlas-groups article > div { display: flex; flex-wrap: wrap; gap: .55rem; }
.atlas-node { border: 1px solid var(--rule); border-radius: 999px; padding: .55rem .8rem; background: var(--surface); color: var(--ink-soft); cursor: pointer; font-size: .78rem; }
.atlas-node:hover { border-color: var(--blue); color: var(--blue); }
.tool-cards > a { color: inherit; text-decoration: none; }
.tool-cards > a:hover h2 { color: var(--blue); }
.tool-cards p:last-child { color: var(--ink-soft); }

.placeholder { width: min(760px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(4rem, 12vw, 9rem) 0; }
.placeholder h1 { margin: 0; font-size: clamp(2.45rem, 6.6vw, 5rem); }
.placeholder > p:not(.eyebrow):not(.hero-question) { max-width: 62ch; color: var(--ink-soft); }
.placeholder .primary-action { margin-top: 1rem; }

@media (max-width: 900px) {
  :root { --rail: 13.5rem; }
  .week-rail { padding: 1.5rem 1rem; }
  .rail-question { font-size: 1.05rem; }
  .week-home main, .class-landing main, .explore-page main, .practice-page main, .review-page main, .atlas-page main, .tools-page main { padding-inline: 2rem; }
  .explorer-controls { grid-template-columns: 1fr 1fr; }
  .stage-switch { grid-column: 1 / -1; }
  .reset-button { justify-self: start; }
  .section-number { position: static; text-align: left; margin-bottom: .6rem; }
}

@media (max-width: 700px) {
  .site-header { height: 3.8rem; padding-inline: .8rem; }
  .wordmark-lockup { display: none; }
  .wordmark-icon { display: block; width: 2.2rem; height: 2.2rem; }
  .site-header nav { gap: .75rem; }
  .site-header nav a { font-size: .72rem; }
  .print-button { display: none; }
  .page-shell.has-rail { display: block; }
  .week-rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--rule); padding: .8rem 1rem; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; overflow: visible; }
  .week-stamp { grid-template-columns: 2.5rem auto; gap: .6rem; }
  .week-stamp > img { width: 2.5rem; height: 2.5rem; }
  .week-stamp b { font-size: 1.2rem; }
  .rail-question { margin: 0; font-size: .96rem; }
  .week-rail nav { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); overflow-x: auto; border-top: 1px solid var(--rule); }
  .week-rail nav a { display: flex; justify-content: center; padding: .65rem .35rem; border-bottom: 0; text-align: center; }
  .week-rail nav a i, .week-rail nav a small { display: none; }
  .course-home main { width: calc(100% - 1.5rem); max-width: 1040px; padding-top: 3rem; }
  .course-intro { display: block; }
  .course-intro > *, .course-week > * { min-width: 0; }
  .course-intro h1 { min-width: 0; font-size: clamp(2.3rem, 10.5vw, 3.7rem); }
  .intro-question { width: 100%; margin-top: 1.5rem; }
  .course-week { grid-template-columns: 3rem 1fr; gap: .7rem; }
  .course-week b { display: none; }
  .course-week-number { grid-template-columns: 2.6rem; align-self: start; }
  .course-week-number img { width: 2.6rem; height: 2.6rem; }
  .course-information-mark { width: 2.6rem; height: 2.6rem; }
  .course-information-mark i { width: 1.4rem; height: 1.4rem; border-width: 2px; }
  .course-information-mark i:first-child { top: .2rem; left: .2rem; }
  .course-information-mark i:last-child { right: .2rem; bottom: .2rem; }
  .course-week div > span { display: block; margin-top: .25rem; }
  .course-info { width: min(100% - 2rem, 900px); }
  .course-info-nav { margin-inline: -1rem; padding-inline: 1rem; }
  .course-info-section .section-number { position: static; width: auto; margin-bottom: .55rem; text-align: left; }
  .lecturer-profile { grid-template-columns: 1fr; gap: 1.75rem; }
  .lecturer-portrait { order: -1; width: min(72vw, 17rem); margin-top: 0; }
  .course-audio-grid { grid-template-columns: 1fr; }
  .course-audio-card { min-height: 0; }
  .week-home main, .class-landing main, .explore-page main, .practice-page main, .review-page main, .atlas-page main, .tools-page main { padding: 2.5rem 1rem 4rem; }
  .week-hero h1 { font-size: clamp(2.1rem, 10vw, 3rem); }
  .tool-hero h1 { font-size: clamp(2.3rem, 12vw, 3.55rem); }
  .tool-hero h1.explorer-title { font-size: clamp(2.15rem, 10.5vw, 3.15rem); }
  .section-heading { display: block; }
  .mode-row { grid-template-columns: 2rem 5rem 1fr; gap: .7rem; padding: .8rem 0; }
  .mode-row small { display: none; }
  .outcomes ol { margin-left: 0; }
  .reading { width: min(100% - 2rem, 790px); }
  .reading-interactive.is-floating { right: .6rem; bottom: .6rem; width: calc(100vw - 1.2rem); max-height: calc(100vh - 5rem); padding: .6rem; }
  .reading-interactive.is-floating .interactive-tools { top: -.6rem; margin: -.6rem -.6rem .5rem; }
  .reading-interactive.is-floating .interactive-size-controls { display: none; }
  .reading-progress { margin-inline: -1rem; padding-inline: 1rem; }
  .reading-header { padding-top: 3.2rem; }
  .reading-header h1 { font-size: clamp(2.3rem, 12vw, 3.7rem); }
  .equation { display: grid; }
  .surplus-grid, .formula-pair, .distinction { grid-template-columns: 1fr; }
  .reading table:not(.kg-container *) { font-size: .75rem; }
  .reading th:not(.kg-container *), .reading td:not(.kg-container *) { padding-inline: .35rem; }
  .profit-range-fields { grid-template-columns: 1fr; align-items: stretch; }
  .profit-range-inequality { justify-self: center; padding: 0; }
  .matching-controls { grid-template-columns: 1fr; }
  .classification-head { display: none; }
  .classification-row { grid-template-columns: 1fr; gap: .65rem; }
  .classification-actions { align-items: flex-start; flex-direction: column; }
  .reading-pagination { grid-template-columns: 1fr; }
  .reading-pagination a:last-child { border-left: 0; border-top: 1px solid var(--rule); }
  .deck-overview { grid-template-columns: 1fr; }
  .edition-row { grid-template-columns: 1fr; }
  .edition-row div { grid-column: auto; }
  .equation-strip, .graph-grid { grid-template-columns: 1fr; }
  .equation-strip div, .graph-grid figure + figure { border-right: 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .explorer-controls { grid-template-columns: 1fr; }
  .stage-switch { grid-column: auto; }
  .observe { grid-template-columns: 1fr; gap: .4rem; }
  .market-controls, .market-readout { grid-template-columns: 1fr; }
  .market-readout > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .market-readout > div:last-child { border-bottom: 0; }
  .quiz-preview { grid-template-columns: 1fr; }
  .quiz-preview > span { flex-direction: column; }
  .practice-ledger > :is(a, .practice-placeholder) { grid-template-columns: 2rem 1fr; padding: 1rem 0; }
  .practice-ledger small { grid-column: 2; }
  .worksheet { overflow-x: auto; }
  .financial-equation strong { font-size: .9rem; }
  .financial-equation strong.equation-stack { min-width: 0; width: 100%; }
  .financial-equation .equation-stack > span { white-space: normal; text-align: center; }
  .solution-lock { grid-template-columns: 1fr; }
  .solution-lock .eyebrow { grid-row: auto; }
  .concept-map-header { align-items: flex-start; flex-direction: column; }
  .concept-map-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .concept-map-search { width: 100%; }
  .concept-map-controls { align-self: flex-end; }
  .concept-map-stage { height: 34rem; }
  .concept-map-status { max-width: 46ch; }
  .atlas-groups, .tool-cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@page { size: A4; margin: 17mm 18mm 19mm; }
/* Payoff matrices (Week 6). The row player's payoffs are red and the column player's blue. */
.payoff-matrix { margin: 2rem 0; overflow-x: auto; }
.payoff-matrix .matrix-table { width: auto; margin: 0 auto; border-collapse: collapse; background: transparent; font-family: var(--serif); font-size: 1rem; }
.payoff-matrix .matrix-table th, .payoff-matrix .matrix-table td { padding: .6rem .9rem; border: 0; color: var(--ink); font-size: 1rem; letter-spacing: normal; text-align: center; text-transform: none; vertical-align: middle; }
.payoff-matrix .matrix-table td { min-width: 5.5rem; border: 1px solid var(--rule); background: var(--surface); font-variant-numeric: tabular-nums; white-space: nowrap; }
.payoff-matrix .matrix-table .matrix-corner { border: 0; background: transparent; }
.payoff-matrix .matrix-table .matrix-player { font-weight: 700; }
.payoff-matrix .matrix-table .col-player { color: var(--blue); }
.payoff-matrix .matrix-table .row-player { width: 2rem; padding-inline: .2rem; color: var(--red); }
.payoff-matrix .row-player span { display: inline-block; transform: rotate(180deg); writing-mode: vertical-rl; }
.payoff-matrix .matrix-table .matrix-strategy { color: var(--ink-soft); font-family: var(--sans); font-size: .85rem; font-weight: 600; }
.payoff-matrix .p1 { color: var(--red); }
.payoff-matrix .p2 { color: var(--blue); }
.payoff-matrix .is-best { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.payoff-matrix .matrix-table td.is-nash { background: var(--green-wash); outline: 3px solid var(--green); outline-offset: -3px; }
.payoff-matrix figcaption { max-width: 36rem; margin: .7rem auto 0; color: var(--muted); font-size: .85rem; text-align: center; }
.question-step .payoff-matrix { margin: 1rem 0 1.25rem; }

@media print {
  .reading-interactive { break-inside: avoid; }
  .interactive-tools, .floating-interactive-placeholder { display: none !important; }
  .reading-interactive.is-floating { position: static; width: auto; max-height: none; margin: 2.4rem 0 2.8rem; padding: 0; overflow: visible; border: 0; box-shadow: none; }
  .reading-interactive .kg-choice-controls,
  .reading-interactive .kg-choice-actions { display: none !important; }
  :root { --paper: #fff; --surface: #fff; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .site-header, .week-rail, .reading-progress, .reading-pagination, .dialog-close, .explorer-controls, .print-button, .skip-link, .activity-next { display: none !important; }
  .page-shell.has-rail { display: block; }
  .reading-page main { background: #fff; }
  .reading { width: 100%; padding: 0; }
  .reading-header { padding: 0 0 16mm; }
  .print-notes .print-brand { display: block; }
  .reading-header h1 { font-size: 26pt; }
  .reading-section { padding: 11mm 0 2mm; break-inside: auto; }
  .reading-section h2, .reading-section h3 { break-after: avoid; }
  .reading-section p { font-size: 10.5pt; line-height: 1.55; orphans: 3; widows: 3; }
  .section-number { position: static; text-align: left; margin-bottom: 2mm; }
  .equation.derivation > strong { min-width: 0; grid-template-columns: max-content max-content minmax(0, 1fr) 8rem; }
  .derivation-line > small { white-space: normal; }
  .reading th:not(.kg-container *), .reading td:not(.kg-container *) { padding: .55rem .5rem; }
  .equation, .prompt, .model-warning, .surplus-grid, .formula-pair, .distinction, table, .takeaway, .matching-figure, .question-step, .classification-row { break-inside: avoid; }
  .matching-controls, .matching-readout, .question-response, .classification-match select, .classification-actions { display: none; }
  .classification-head { display: none; }
  .classification-row { display: block; }
  .classification-feedback { display: none; }
  .classification-print-key { display: block; }
  .question-step[hidden], .question-answer[hidden] { display: block !important; }
  .concept { border: 0; color: #000; text-decoration: none; }
  .print-contents { break-after: page; }
  .print-chapter { break-before: page; margin-top: 0; padding-top: 0; border-top: 0; }
  .print-chapter > header { border-bottom: 2px solid #000; padding-bottom: 7mm; }
  .print-chapter > header h2 { font-size: 23pt; }
  .chapter-summary { display: none; }
  .reading-self-check details > p { display: block !important; }
  .reading-self-check summary::after { display: none; }
  .folded-solution > summary { display: none; }
  .folded-solution > .solution-body { display: block !important; }
  a { text-decoration: none; }
  .worksheet, .case-sheet, .case-solutions { width: 100%; }
  .case-sheet > section, .case-solutions article { break-inside: avoid; }
}

/* Interactives */
.iw-toolbar{margin:0 0 1rem}
.iw-toggle{appearance:none;border:1px solid var(--rule);background:var(--surface);color:var(--ink-soft);font:inherit;font-size:.86rem;padding:.3rem .7rem;cursor:pointer}
.iw-toggle:hover{border-color:var(--blue);color:var(--blue)}
.interactive-weeks{border-top:3px solid var(--ink)}
.interactive-week{border-bottom:1px solid var(--rule)}
.interactive-week summary{display:grid;grid-template-columns:4.75rem minmax(0,1fr) auto 1.25rem;gap:1rem;align-items:baseline;padding:1rem .25rem;cursor:pointer;list-style:none}
.interactive-week summary::-webkit-details-marker{display:none}
.interactive-week summary::after{content:"+";color:var(--blue);font-size:1.25rem;line-height:1;text-align:right}
.interactive-week[open] summary::after{content:"−"}
.interactive-week summary:hover .iw-title{color:var(--blue)}
.iw-week{color:var(--blue);font-family:var(--serif);font-size:.98rem}
.iw-title{font-family:var(--serif);font-size:1.28rem;font-weight:600;letter-spacing:-.015em;line-height:1.2}
.iw-count{color:var(--muted);font-size:.8rem}
.interactive-list{margin:0 0 1rem;padding:0;list-style:none}
.interactive-list a{display:grid;grid-template-columns:minmax(0,20rem) minmax(0,1fr) 4.5rem;gap:1rem;align-items:baseline;padding:.55rem .25rem;border-top:1px solid var(--rule);color:inherit;text-decoration:none}
.interactive-list a:hover{background:var(--blue-wash)}
.interactive-list strong{color:var(--blue);font-weight:600;font-size:.98rem;line-height:1.3}
.iw-note{color:var(--ink-soft);font-size:.9rem;line-height:1.4}
.iw-type{color:var(--muted);font-size:.76rem;text-align:right}
@media (max-width:720px){
  .interactive-week summary{grid-template-columns:minmax(0,1fr) auto 1.25rem;gap:.1rem .75rem}
  .iw-week{grid-column:1/-1}
  .interactive-list a{grid-template-columns:minmax(0,1fr) auto;gap:.15rem .75rem}
  .iw-note{grid-column:1/-1;grid-row:2}
}

/* Books */
.books-hero{max-width:850px;padding-bottom:clamp(1.5rem,3vw,2.5rem)}
.books-hero h1{margin:0;font-size:clamp(2.2rem,4.4vw,3.4rem);line-height:.97}
.books-hero .hero-question{margin:.6rem 0 0;font-size:clamp(1.05rem,1.7vw,1.3rem);line-height:1.3}
.book-tile strong{font-size:.9rem}
.books-filter{display:flex;flex-wrap:wrap;gap:.4rem;margin:0 0 1.5rem;padding:0;list-style:none}
.books-filter button{appearance:none;border:1px solid var(--rule);background:var(--surface);color:var(--ink-soft);font:inherit;font-size:.86rem;padding:.3rem .7rem;cursor:pointer}
.books-filter button:hover{border-color:var(--blue);color:var(--blue)}
.books-filter button[aria-pressed="true"]{background:var(--blue);border-color:var(--blue);color:#fff}
.books-week-note{margin:-.8rem 0 1.5rem;color:var(--muted);font-size:.92rem;min-height:1.4em}
.books-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(19rem,25rem);gap:2.25rem;align-items:start}
.books-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(7.25rem,1fr));gap:1.75rem 1.25rem;margin:0;padding:0;list-style:none}
.book-tile{display:block;width:100%;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.book-cover{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;background:var(--surface);border:1px solid var(--rule);box-shadow:0 1px 2px rgba(24,32,43,.12);transition:transform .14s ease,box-shadow .14s ease}
.book-tile:hover .book-cover{transform:translateY(-3px);box-shadow:0 8px 16px rgba(24,32,43,.16)}
.book-tile[aria-pressed="true"] .book-cover{outline:3px solid var(--blue);outline-offset:2px}
.book-tile:focus-visible{outline:none}
.book-tile:focus-visible .book-cover{outline:3px solid var(--blue);outline-offset:2px}
.book-plain{display:flex;flex-direction:column;justify-content:space-between;box-sizing:border-box;padding:.9rem .8rem;background:var(--blue-wash);color:var(--ink);font-family:var(--serif)}
.book-plain b{font-weight:600;font-size:1.02rem;line-height:1.2}
.book-plain span{color:var(--ink-soft);font-size:.82rem}
.book-tile strong{display:block;margin-top:.7rem;font-family:var(--serif);font-weight:600;line-height:1.22}
.book-tile:hover strong{color:var(--blue)}
.book-tile small{display:block;margin-top:.2rem;color:var(--muted);font-size:.8rem;line-height:1.35}
.book-panel{position:sticky;top:5.5rem;max-height:calc(100vh - 6.5rem);overflow-y:auto;background:var(--surface);border:1px solid var(--rule)}
.book-head{display:grid;grid-template-columns:5.5rem minmax(0,1fr);gap:1rem;padding:1.15rem;border-bottom:1px solid var(--rule)}
.book-head .book-cover{box-shadow:none}
.book-head .book-plain{padding:.4rem}
.book-head .book-plain b{font-size:.68rem}
.book-head .book-plain span{display:none}
.book-head h2{margin:0;font-size:1.3rem;line-height:1.15}
.book-head p{margin:.35rem 0 0;color:var(--muted);font-size:.88rem;line-height:1.35}
.book-block{padding:1rem 1.15rem;border-bottom:1px solid var(--rule)}
.book-block:last-child{border-bottom:0}
.book-block h3{margin:0 0 .6rem;color:var(--muted);font-family:var(--sans);font-size:.72rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase}
.book-note{margin:0;color:var(--ink-soft);font-size:.95rem;line-height:1.5}
.book-links{margin:0;padding:0;list-style:none}
.book-links li+li{margin-top:.7rem}
.book-links a{font-weight:500}
.book-links small{display:block;color:var(--muted);font-size:.8rem;line-height:1.35}
.get-row{display:grid;grid-template-columns:4rem minmax(0,1fr);gap:.6rem;align-items:baseline}
.get-kind{justify-self:start;padding:.02rem .4rem;font-size:.72rem;font-weight:600}
.get-free{background:var(--green-wash);color:var(--green)}
.get-borrow{background:var(--blue-wash);color:var(--blue)}
.get-buy{background:var(--red-wash);color:var(--red)}
.get-library{background:#EDF0F4;color:var(--ink-soft)}
.books-shelf+.books-shelf{margin-top:2.75rem;padding-top:2rem;border-top:1px solid var(--rule)}
.books-shelf h2{margin:0;font-size:1.55rem;line-height:1.15}
.books-shelf>p{margin:.3rem 0 1.25rem;color:var(--ink-soft);font-size:.95rem;line-height:1.4;max-width:46ch}
.book-group{margin:0 0 .3rem!important;color:var(--blue)!important;font-size:.72rem!important;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
.books-credit{margin:2.5rem 0 0;color:var(--muted);font-size:.82rem}
@media (max-width:860px){
  .books-layout{grid-template-columns:1fr}
  .book-panel{position:static;max-height:none;order:-1}
  .books-grid{grid-template-columns:repeat(auto-fill,minmax(7.5rem,1fr));gap:1.4rem 1rem}
}
@media (prefers-reduced-motion:reduce){.book-cover{transition:none}}

/* History of Economic Thought */
.history-page{--soft:var(--ink-soft);--wash:var(--blue-wash);--gold:#C8960C;--goldwash:#FBF3DC}
.history-page .legend{display:flex;flex-wrap:wrap;gap:18px;margin:0 0 12px;font-size:13px;color:var(--soft)}
.history-page .legend span{display:inline-flex;align-items:center;gap:6px}
.history-page .swatch{display:inline-block;width:22px;height:14px;background:var(--wash);border:1px solid var(--blue);border-radius:2px}
.history-page .swatch.nobel{border:2px solid var(--gold);background:var(--goldwash)}
.history-page .swatch.arrow{height:0;border:0;border-top:2px solid #8a1c0c;background:none;border-radius:0}
.history-page #wrap{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}
.history-page #tl{background:var(--surface)}
.history-page #panel{background:var(--surface);border:1px solid var(--rule);position:sticky;top:5.5rem;max-height:calc(100vh - 6.5rem);overflow:auto}
.history-page .head{display:grid;grid-template-columns:88px minmax(0,1fr);gap:14px;padding:16px;border-bottom:1px solid var(--rule)}
.history-page .head.nophoto{grid-template-columns:minmax(0,1fr)}
.history-page .head img{display:block;width:88px;height:auto;filter:grayscale(1)}
.history-page .head h2{font:700 21px/1.2 var(--serif);margin:0 0 3px}
.history-page .dates{color:var(--muted);font-size:13px;margin:0 0 7px}
.history-page .badge{display:inline-block;padding:1px 8px;border:1px solid var(--gold);background:var(--goldwash);font-size:12px;color:#6b5000}
.history-page section.block{padding:13px 16px;border-bottom:1px solid var(--rule)}
.history-page section.block:last-child{border-bottom:0}
.history-page .block h3{font:600 11px/1.3 var(--sans);letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 8px}
.history-page .bio{margin:0;font-size:14px;color:var(--soft)}
.history-page .src{margin:6px 0 0;font-size:12px;color:var(--muted)}
.history-page #panel a{color:var(--blue)}
.history-page .c{display:grid;grid-template-columns:44px minmax(0,1fr);gap:8px;margin:0 0 12px}
.history-page .c:last-child{margin-bottom:0}
.history-page .c .y{font:700 14px/1.4 var(--serif);color:var(--blue)}
.history-page .c strong{display:block;font:700 15px/1.3 var(--serif)}
.history-page .c em{display:block;font-size:13px;color:var(--soft)}
.history-page .c .go{font-size:13px;margin-top:2px}
.history-page .c .wk{color:var(--muted);font-size:12px}
.history-page .l{margin:0 0 12px;font-size:14px;color:var(--soft)}
.history-page .l:last-child{margin-bottom:0}
.history-page .l .k{display:inline-block;font:600 11px/1.5 var(--sans);padding:0 7px;background:var(--wash);color:var(--blue);margin-right:6px}
.history-page .l button{all:unset;cursor:pointer;color:var(--blue);text-decoration:underline;font-weight:600}
.history-page .empty{padding:16px;color:var(--soft)}
.history-page .vis-item{border-color:var(--blue);background:var(--wash);color:var(--ink);font-size:12px;border-radius:2px}
.history-page .vis-item.nobel{border:2px solid var(--gold);background:var(--goldwash)}
.history-page .vis-item.vis-selected{background:var(--blue);border-color:var(--blue);color:#fff}
.history-page .vis-item.nobel.vis-selected{border-color:var(--gold)}
.history-page .vis-item.vis-background.life{background:rgba(245,190,40,.18)}
.history-page .vis-item.vis-line,.history-page .vis-item.vis-dot{display:none}
.history-page .vis-labelset .vis-label{display:flex;align-items:center}
.history-page .vis-labelset .vis-label .vis-inner{white-space:normal;width:170px;font-size:12.5px;line-height:1.3;padding:6px 8px}
@media (max-width:860px){.history-page #wrap{grid-template-columns:1fr}.history-page #panel{position:static;max-height:none}}
.reading .reading-definition { margin: 1.6rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--blue); background: var(--blue-wash); }
.reading .reading-definition p { margin: 0; }
.reading .reading-definition .reading-definition-label { margin: 0 0 .35rem; color: var(--blue); font-family: var(--sans); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
@media print { .reading .reading-definition { break-inside: avoid; } }
