/* Page furniture for the MIT 6.S184 pages, on top of common.css, supp_lesson.css and slides.css. */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 640px) { .two { grid-template-columns: minmax(0, 1fr); } }
canvas.chart { width: 100%; height: 200px; display: block; }
canvas.sq { width: 100%; max-width: 480px; margin-inline: auto; aspect-ratio: 1 / 1; height: auto; display: block; border-radius: 6px; }
.fig { font-size: 13.5px; color: var(--muted); border-left: 3px solid var(--rule); padding: 2px 0 2px 12px; margin: 10px 0 16px; }
.fig b { color: var(--ink); font-weight: 600; }
.src { font-size: 12.5px; color: var(--muted); }
.radio { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.radio label { display: flex; gap: 6px; align-items: center; }
table.plain td, table.plain th { padding: 6px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; font-size: 14px; }
table.plain th { color: var(--muted); font-weight: 600; }
.where { font-size: 14px; background: var(--accent-soft); border-radius: 8px; padding: 8px 14px; margin: 12px 0; }
.where b { color: var(--accent); }
.controls { grid-template-columns: minmax(0, 1fr); }
figure.bookfig { margin: 18px 0; }
figure.bookfig img { display: block; width: 100%; max-width: 100%; height: auto; background: #fff; border: 1px solid var(--rule); border-radius: 8px; cursor: zoom-in; }
figure.bookfig figcaption { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.65; }
dialog.figbox { width: min(100vw, 1200px); max-width: 100vw; max-height: 100dvh; margin: auto; padding: 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--ink); box-sizing: border-box; }
dialog.figbox::backdrop { background: rgba(0, 0, 0, 0.72); }
.figbox .fb-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; color: var(--muted); }
.figbox button { font: inherit; font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.figbox .fb-view { overflow: auto; max-height: calc(100dvh - 60px); touch-action: pan-x pan-y pinch-zoom; background: #fff; }
.figbox .fb-view img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.figbox .fb-view.zoom img { width: 200%; max-width: none; cursor: zoom-out; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: 3px; border-radius: 2px; }

/* 兩位數節號不要被 overflow-wrap 拆成兩行 */
h2 .n { flex: none; white-space: nowrap; }
