/* Phần thêm cho khung sách (sach_khung.html) khi đưa lên baitap.toancachep.vn. Nạp sau CSS của khung. */
#app{display:contents}
#app[hidden]{display:none}
/* nút Khoá lại / Thư viện trên thanh trên cùng, cùng kiểu với các nút khác */
.bar .tv,.bar #khoaLai{display:inline-flex;align-items:center;border:0;border-radius:99px;min-height:36px;padding:0 13px;background:rgba(255,255,255,.14);color:#fff;font:inherit;text-decoration:none;white-space:nowrap;cursor:pointer}
.bar .tv:hover,.bar #khoaLai:hover{background:rgba(255,255,255,.24)}
.bar .tv:focus-visible,.bar #khoaLai:focus-visible{outline:3px solid var(--c3);outline-offset:2px}
@media (max-width:640px){.bar{gap:8px;padding:8px 10px}.bar .tv,.bar #khoaLai{padding:0 10px}}
/* svg công thức (bản đúng như MathJax vẽ) */
.mj svg{overflow:visible;min-height:1px;min-width:1px}
g[data-mml-node="mtable"]>line[data-line],svg[data-table]>g>line[data-line]{stroke-width:70px;fill:none}
g[data-mml-node="mtable"]>rect[data-frame],svg[data-table]>g>rect[data-frame]{stroke-width:70px;fill:none}
/* điện thoại: thanh trên gọn hai hàng (Mục lục · trang · lật · Thư viện / nhảy theo dạng); luôn Web Duo, không bản in */
@media (max-width:640px){.bar .mode,.bar #khoaLai,.bar .tcNut{display:none}.bar .tv{margin-left:auto}}
/* chế độ xem + tuỳ chọn chỉ hiện cho thầy (html.thay) */
html:not(.thay) .bar .mode,html:not(.thay) .bar .tcNut,html:not(.thay) #tuychon{display:none!important}
/* bản dành cho thầy: khung ghi chú dưới mỗi câu (bản học sinh không có khối này) */
.gv{margin:2.4mm 0 0;padding:1.8mm 2.8mm 2mm;border-radius:2.4mm;background:#EAF7EE;border:.7pt solid #BFE3C9;font-size:8.6pt;line-height:1.45}
.gv small{display:block;font:800 6.2pt var(--hf);letter-spacing:.1em;text-transform:uppercase;color:var(--tfdd);margin:0 0 .4mm}
.gv .da{display:flex;align-items:center;gap:2.6mm;flex-wrap:wrap;margin-bottom:1.2mm}.gv .da small{margin:0}
.gv .k{display:inline-grid;place-items:center;width:5.2mm;height:5.2mm;border-radius:50%;background:var(--tfdb);color:#fff;font:800 7.6pt var(--hf)}
.gv .d{color:var(--tfdd);font-weight:800}.gv .s{color:var(--tfs);font-weight:800}.gv .so{font-weight:800}
.gv .ls p{margin:0;text-align:left}


/* cachep-stat-tables-20261019: preserve measured page geometry. */
.sheet .theory-table:not(:has(.raw-tf)){border-color:#9db4d4!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.sheet .theory-table:not(:has(.raw-tf)) :is(th,td){color:#172d4f!important;text-align:center!important;vertical-align:middle!important;border-color:#b5c7df!important}
.sheet .theory-table:not(:has(.raw-tf)) tr>:nth-child(odd){background:#edf3fd!important}
.sheet .theory-table:not(:has(.raw-tf)) tr>:nth-child(even){background:#fff8e4!important}
.sheet .theory-table:not(:has(.raw-tf)) tbody tr:nth-child(even)>:nth-child(odd){background:#e3ecfa!important}
.sheet .theory-table:not(:has(.raw-tf)) tbody tr:nth-child(even)>:nth-child(even){background:#fff1c9!important}
.sheet .theory-table:not(:has(.raw-tf)) :is(thead tr:first-child,tbody:first-child tr:first-child)>:nth-child(odd){background:#124a92!important;color:#fff!important}
.sheet .theory-table:not(:has(.raw-tf)) :is(thead tr:first-child,tbody:first-child tr:first-child)>:nth-child(even){background:#ffda73!important;color:#172d4f!important}
.sheet .theory-table:not(:has(.raw-tf)) thead th:first-child{text-align:center!important}
.sheet .theory-table:not(:has(.raw-tf)) .empty-data{background:#f2f4f7!important}

/* student-footer-20261019: reference Van toc va toi uu, 290 cau. */
.sheet footer.pf.cachep-footer{position:absolute;left:var(--pl);right:var(--pr);bottom:5mm;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:3mm;height:9mm;margin:0;padding:0;border:0;font:500 6pt/1.45 var(--hf);letter-spacing:0;color:#69718c;white-space:nowrap}
.cachep-footer>.cf-side{display:flex;align-items:center;min-width:0;order:0!important;align-self:center;justify-self:stretch}.cachep-footer>.cf-left{justify-content:flex-start;text-align:left}.cachep-footer>.cf-right{justify-content:flex-end;text-align:right}
.cachep-footer>.flogo{height:8mm!important;width:auto!important;max-width:18mm;display:block;object-fit:contain;order:0!important;justify-self:center!important;align-self:center;transform:none!important}
.cachep-footer .cf-text{font:inherit;color:inherit;line-height:1.45;white-space:nowrap;letter-spacing:0;text-transform:none}
.sheet .cachep-footer .pg{width:7mm!important;height:7mm!important;min-width:7mm!important;flex:none;margin:0!important;padding:0!important;border:0!important;border-radius:50% 50% 0 50%!important;background:#1a1f4d!important;color:#fff!important;display:grid!important;place-items:center;font:800 8.5pt/1 var(--hf)!important;order:0!important;justify-self:auto!important;transform:none!important}
.sheet .cachep-footer .pg.l{border-radius:50% 50% 50% 0!important}
.sheet.a4 footer.pf.cachep-footer{bottom:6mm;height:10mm;gap:5mm;font-size:7pt}.sheet.a4 .cachep-footer>.flogo{height:9.5mm!important}.sheet.a4 .cachep-footer .pg{width:8mm!important;height:8mm!important;min-width:8mm!important;font-size:9.5pt!important}

/* algebra-a4-2col-20261019: fixed student layout. */
body .sheet.a4{width:210mm!important;height:297mm!important;padding:10mm 14mm 21mm!important;--pl:14mm!important;--pr:14mm!important;font:9.6pt/1.5 var(--hf);overflow:hidden}
.sheet.a4>.bd.algebra-columns{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7mm;min-height:0;flex:1}
.algebra-columns>.sach-col{height:100%;min-height:0;min-width:0;display:flex;flex-direction:column}
.sach-col>.blk{flex-shrink:0}.sach-col .q{grid-template-columns:8mm minmax(0,1fr)!important}
.sach-col .de,.sach-col .mc,.sach-col .tf{min-width:0}
.sach-col .de table{max-width:100%;table-layout:auto}
.sach-col .de :is(th,td){overflow-wrap:normal;word-break:normal}
.sheet.a4.cover{padding:0!important}.sheet.a4.cover .cv{width:148mm;height:210mm;inset:0 auto auto 0;transform:scale(1.4142857143);transform-origin:top left}
.sheet.a4 .mlb{font-size:9.6pt}.sheet.a4.toc .mlb th:not(.hd){width:25mm}
@page{size:A4 portrait;margin:0}@media print{.sheet.a4{page:a4;break-after:page}@page a4{size:A4 portrait;margin:0}}
