.article-layout:has(.reference-tables){grid-template-columns:minmax(0,1fr)}.article-layout:has(.reference-tables)>.article-aside{display:none}
.math-lesson .reference-tables{margin:30px 0}.math-lesson .log-reference{min-width:0;border:1px solid #cfded4;border-radius:20px;background:#fff;padding:25px;margin:28px 0 38px;box-shadow:0 8px 28px #1b4b3506}.math-lesson .log-reference h2{margin:0 0 15px;color:#214f3e;font-size:30px}
.math-lesson .reference-downloads{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 18px}.lesson-body a.reference-download{display:inline-flex;align-items:center;justify-content:center;gap:10px;background:#276c55;color:white;border:1px solid #276c55;border-radius:11px;padding:13px 19px;font:650 15px/1.4 var(--body,Arial,sans-serif);text-decoration:none;box-shadow:0 3px 0 #174a3b;min-height:50px}.lesson-body a.reference-download:nth-child(2){background:#fff;color:#245a46;border-color:#b6d0bd;box-shadow:0 3px 0 #dce8df}.lesson-body a.reference-download:hover{background:#1a513e;color:#fff}.lesson-body a.reference-download small{font-size:10px;line-height:1;border:1px solid currentColor;opacity:.8;border-radius:5px;padding:5px 6px;white-space:nowrap}.lesson-body a.reference-download>span{font-size:23px;font-weight:500}
.math-lesson .reference-definition{font-size:.92rem;line-height:1.8;color:#526d5d;margin:0 0 20px}.math-lesson .reference-controls{display:grid;grid-template-columns:minmax(0,1fr) 170px auto;gap:14px;align-items:end;padding:17px;background:#f1f7f2;border:1px solid #dfebe1;border-radius:12px}.math-lesson .reference-controls label{font-size:13px;font-weight:650;color:#365c49;line-height:1.5}.math-lesson .reference-controls input,.math-lesson .reference-controls select{display:block;width:100%;min-width:0;background:white;color:#203f32;border:1px solid #bdd1c2;border-radius:9px;padding:10px 12px;min-height:46px;margin-top:7px;font:inherit;font-size:16px;line-height:1.5}.math-lesson .log-reference button{appearance:none;border:1px solid #bbd0bf;border-radius:9px;background:white;color:#28583f;min-height:44px;padding:10px 15px;font:600 13px/1.4 var(--body,Arial,sans-serif);cursor:pointer}.math-lesson .log-reference button:hover:not(:disabled){background:#e3f0e6}.math-lesson .log-reference button:disabled{opacity:.4;cursor:default}.math-lesson .log-reference :is(button,input,select):focus-visible,.math-lesson .reference-scroll:focus-visible{outline:3px solid #95c1a7;outline-offset:2px}
.math-lesson .reference-hint{font-size:12px;line-height:1.6;color:#65796b;margin:13px 0 8px}.math-lesson .reference-search-status{font-size:13px;line-height:1.6;color:#285c40;min-height:22px;margin:8px 0 13px}.math-lesson .reference-scroll{overflow-x:auto;overscroll-behavior-inline:contain;border:1px solid #d2e1d6;border-radius:10px;scrollbar-color:#91b59b #edf4ee;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.math-lesson table.reference-table{table-layout:fixed;border-collapse:separate;border-spacing:0;width:100%;min-width:950px;margin:0;background:white;font-size:15px;font-variant-numeric:tabular-nums}.math-lesson .reference-table caption{caption-side:bottom;text-align:left;font-size:12px;font-weight:400;color:#687e6d;padding:12px 14px;background:#f7faf6;line-height:1.5}.math-lesson .reference-table th,.math-lesson .reference-table td{padding:12px 8px;text-align:center;border:0;border-bottom:1px solid #e0eae2;white-space:nowrap;font-size:15px;line-height:1.5}.math-lesson .reference-table thead th{background:#285f4b;color:#fff;font-size:13px;font-weight:700;letter-spacing:.02em}.math-lesson .reference-table tbody th,.math-lesson .reference-table thead th[rowspan]{position:sticky;left:0;width:76px;z-index:1;box-shadow:3px 0 6px #153d2510}.math-lesson .reference-table tbody th{background:#e9f3eb;color:#2a5c40;font-weight:700}.math-lesson .reference-table tbody tr:nth-child(even) td{background:#f5f9f4}.math-lesson .reference-table tbody tr:hover td{background:#ebf4eb}.math-lesson .reference-table td.lookup-match{background:#fff0b9!important;box-shadow:inset 0 0 0 2px #ce9b2e;font-weight:750;color:#543e0b}.math-lesson .reference-table tr[hidden],.math-lesson .reference-scroll[hidden],.math-lesson .reference-empty[hidden]{display:none}
.math-lesson .reference-pagination{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;margin-top:15px}.math-lesson .reference-pagination p{font-size:12px;color:#617969;margin:0}.math-lesson .reference-pagination>div{display:flex;gap:7px}.math-lesson .reference-empty{padding:32px 18px;text-align:center;color:#617468;background:#f5f9f5;border:1px dashed #ccdece;border-radius:10px;font-size:14px}.math-lesson .reference-jumps{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.math-lesson .reference-jumps a{font-size:13px;text-decoration:none;background:#edf5ec;border:1px solid #cbded0;border-radius:22px;padding:8px 14px;color:#2a6648}.math-lesson:has(.reference-tables) [data-log-tool]{max-width:840px;margin-inline:auto}
@media(max-width:760px){.math-lesson .log-reference{padding:17px 12px;border-radius:15px}.math-lesson .log-reference h2{font-size:25px}.math-lesson .reference-controls{grid-template-columns:1fr 1fr;padding:12px;gap:12px}.math-lesson .reference-controls>label:first-child{grid-column:1/-1}.math-lesson .reference-controls button{padding:10px 7px}.math-lesson .reference-downloads{gap:10px}.lesson-body a.reference-download{flex:1 1 240px;font-size:14px;padding:12px}.math-lesson .reference-pagination{gap:10px}.math-lesson .reference-pagination>div{margin-left:auto}.math-lesson .reference-definition{font-size:.85rem}.math-lesson .reference-table th,.math-lesson .reference-table td{padding:10px 8px}}
@media print{.reference-controls,.reference-downloads,.reference-pagination{display:none!important}.reference-table tr[hidden]{display:table-row!important}.reference-scroll{overflow:visible}}
/* Keep the accessible table caption without an empty strip when scrolled sideways. */
.math-lesson .reference-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Full tables scroll in both directions; row and column headings stay visible. */
.math-lesson .reference-controls{grid-template-columns:minmax(0,1fr) auto}
.math-lesson .reference-scroll{max-height:560px;overflow:auto;scrollbar-width:auto}
.math-lesson table.reference-table{min-width:1460px}.math-lesson .reference-row-col{width:76px}.math-lesson .reference-value-col{width:86px}.math-lesson .reference-difference-col{width:58px}
.math-lesson .reference-table thead th{position:sticky;top:0;height:40px;z-index:3;padding:8px}.math-lesson .reference-table thead tr:nth-child(2) th{top:40px}.math-lesson .reference-table thead th[rowspan]{height:80px;z-index:5}.math-lesson .reference-table tbody th{z-index:2}
.math-lesson .reference-table thead .difference-heading{background:#77571d}.math-lesson .difference-heading span{font-size:11px;color:#fae7bf}
.math-lesson .reference-table tbody td.difference-cell{background:#fffaf0;color:#77571d}.math-lesson .reference-table tbody tr:nth-child(even) td.difference-cell{background:#fff4de}.math-lesson .reference-table tbody tr:hover td.difference-cell{background:#ffeac4}
.math-lesson .reference-table td[data-difference="1"],.math-lesson .reference-table th[colspan="9"]{border-left:2px solid #c8ad76}.math-lesson .reference-table td.difference-match{background:#f8d78b!important;box-shadow:inset 0 0 0 2px #bd8a26;font-weight:750}
.math-lesson .reference-row-count{font-size:12px;color:#587160;margin:12px 0 6px}.math-lesson .reference-interpolation-note{font-size:12px;line-height:1.7;color:#7a6335;margin:8px 0 0}
@media(max-width:760px){.math-lesson .reference-controls{grid-template-columns:1fr}.math-lesson .reference-controls>label:first-child{grid-column:auto}.math-lesson .reference-controls button{justify-self:start}.math-lesson .reference-scroll{max-height:440px}}
.math-lesson .reference-table thead th[colspan="9"]{text-align:left;padding-left:16px}
@media print{.math-lesson .reference-scroll{max-height:none;overflow:visible}.math-lesson .reference-table thead th,.math-lesson .reference-table tbody th{position:static}}
/* Fit all twenty columns on wide desktops while retaining sideways scrolling on smaller screens. */
.math-lesson table.reference-table{min-width:1120px}.math-lesson .reference-value-col{width:70px}.math-lesson .reference-difference-col{width:38px}
