/* Scoped additions: existing course pages retain their original layout. */
.network-lecture .tcp-state { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(100px, 1fr); gap: 8px 16px; font: 11px/1.6 Verdana, sans-serif; margin: 14px 0; }
.network-lecture .tcp-state dt { color: #52616c; }
.network-lecture .tcp-state dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.network-lecture #tcp-prefix-plot { min-width: 520px; }
.network-lecture #tcp-prefix-lab { max-width: 680px; margin-inline: auto; }
.network-lecture .tcp-byte-block rect { fill: #fafbfc; stroke: #aebbc4; stroke-dasharray: 4 3; }
.network-lecture .tcp-byte-block.prefix rect { fill: #dceaf5; stroke: #2b6188; stroke-dasharray: none; }
.network-lecture .tcp-byte-block.buffered rect { fill: #faefc9; stroke: #9b7829; stroke-dasharray: none; }
.network-lecture #tcp-prefix-result { min-height: 85px; }
.network-lecture #tcp-window-result { min-height: 65px; }
.network-lecture .course-toc { max-height: calc(100dvh - 32px); overflow-y: auto; scrollbar-width: thin; padding-right: 8px; }
.network-lecture .course-toc a { padding-block: 6px; line-height: 1.5; }
.network-lecture .course-toc li { margin: 0; }
.network-lecture .course-body section > p { max-width: 106ch; }
.network-lecture .course-body h3 { font-weight: 600; }
.network-lecture .course-body .equation { overflow-x: auto; margin: 16px 0; padding: 14px 12px; background: #f5f8fb; border-left: 2px solid #b9cbdb; }
.network-lecture .equation math { margin: 0; font-size: 15px; }
.network-lecture .course-body :is(th, td).numeric { text-align: right; font-variant-numeric: tabular-nums; }
.network-lecture .source-line { font-size: 10px; color: #626e78; }
.network-lecture .source-line a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.network-lecture .wifi-table { min-width: 700px; }
.network-lecture .course-body canvas { display: block; width: 100%; height: 240px; background: #fbfcfd; }
.network-lecture #qam-plot { max-width: 500px; height: 400px; margin-inline: auto; }
.network-lecture .experiment-result { margin-block: 12px 0; min-height: 64px; padding: 10px 12px; border-left: 2px solid #b7c8d5; background: #f3f6f8; font-variant-numeric: tabular-nums; }
.network-lecture .lab-tools { gap: 12px 18px; }
.network-lecture .lab-tools :is(input, select) { max-width: 100%; }
.network-lecture .lab-tools input[type="range"] { width: 180px; accent-color: #2b6188; height: 28px; padding: 0; }
.network-lecture .lab-tools input[type="number"] { width: 145px; }
.network-lecture #qam-symbol { width: 95px; }
.network-lecture .plot-key, .network-lecture output { color: #465764; font-size: 11px; font-variant-numeric: tabular-nums; }
.network-lecture .lab-tools button:hover:not(:disabled) { background: #e4ebf1; box-shadow: 0 1px 3px #152b4012; }
.network-lecture :is(.lab-tools button, select, input, summary):focus-visible { outline: 2px solid #2b6188; outline-offset: 3px; }
.network-lecture :is(.table-scroll, .equation):focus-visible { outline: 2px solid #2b6188; outline-offset: 2px; }
.network-lecture .course-body .process-flow { list-style: none; padding: 0; margin: 22px 0; display: flex; flex-wrap: wrap; gap: 10px 0; }
.network-lecture .process-flow li { flex: 1 1 140px; padding: 8px 16px; margin: 0; border-left: 2px solid #d0dbe3; }
.network-lecture .process-flow strong { font-size: 11px; font-weight: 500; color: #254c68; }
.network-lecture .process-flow span { display: block; font-size: 10px; color: #65717b; }
.network-lecture .ofdma-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; font-size: 11px; }
.network-lecture .ofdma-axis { grid-column: 1 / -1; color: #596672; padding-bottom: 8px; }
.network-lecture .ofdma-grid span { min-height: 48px; display: grid; place-items: center; padding: 8px; }
.network-lecture .allocation-a { background: #e2edf7; color: #214c74; }
.network-lecture .allocation-b { background: #f4e4e8; color: #793b4d; }
.network-lecture .allocation-c { background: #f5edce; color: #685415; }
.network-lecture .course-body .mail-flow { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0; gap: 12px; margin: 0 0 18px; }
.network-lecture .mail-flow li { margin: 0; padding: 10px 8px; min-height: 108px; border-bottom: 2px solid #d5dde3; background: #f5f7f9; }
.network-lecture .mail-flow :is(strong, span) { display: block; font-size: 10px; line-height: 1.6; }
.network-lecture .mail-flow strong { font-weight: 500; color: #3e5364; }
.network-lecture .mail-flow span { color: #52616c; }
.network-lecture .mail-flow svg { width: 20px; height: 20px; margin-bottom: 7px; color: #60788a; }
.network-lecture .mail-flow .is-current { background: #e7eff6; border-color: #2b6188; }
.network-lecture .mail-flow .is-current strong { color: #153f62; font-weight: 600; }
.network-lecture .mail-flow .is-complete { border-color: #8c9eb0; }
.network-lecture #mail-result { min-height: 105px; }
.network-lecture .course-body pre { overflow-x: auto; }
@media (max-width: 900px) {
 .network-lecture .course-body .mail-flow { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 650px) {
 .network-lecture #tcp-prefix-result { min-height: 170px; }
 .network-lecture #tcp-window-result { min-height: 105px; }
 .network-lecture .tcp-state { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px 12px; }
 .network-lecture .course-toc { max-height: none; overflow: visible; padding-right: 0; }
 .network-lecture .course-toc details { margin: 0; }
 .network-lecture .course-toc summary { padding-bottom: 6px; }
 .network-lecture .course-toc .course-other { margin-top: 8px; }
 .network-lecture .course-body canvas { height: 210px; }
 .network-lecture #qam-plot { height: 300px; }
 .network-lecture .equation math { font-size: 14px; }
 .network-lecture .experiment-result { min-height: 115px; }
 .network-lecture #mail-result { min-height: 170px; }
 .network-lecture .course-body .mail-flow { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .network-lecture .mail-flow li { min-height: 106px; }
 .network-lecture .lab-tools { align-items: end; }
 .network-lecture .lab-tools input[type="range"] { width: 165px; }
 .network-lecture .course-body .process-flow { gap: 8px; }
 .network-lecture .process-flow li { flex-basis: 115px; padding: 5px 10px; }
}
@media print {
 .network-lecture .course-body section > p { max-width: none; }
 .network-lecture .equation { overflow: visible; break-inside: avoid; }
 .network-lecture .course-body .wifi-table { min-width: 0; }
 .network-lecture .course-body .mail-flow { grid-template-columns: repeat(5,minmax(0,1fr)); }
 .network-lecture .course-body :is(canvas, .mail-flow, .ofdma-grid) { print-color-adjust: exact; }
}
