/* Exact unit scope; screen sizing and physical worksheet geometry are separate. */
#page-quiz[data-twt-active] #answer-zone{display:block;max-width:100%;width:100%;min-width:0}
#page-quiz[data-twt-active] .question-card{min-width:0;max-width:100%}
#page-quiz[data-twt-active] #question-text{font-size:1.1rem;line-height:1.6;overflow-wrap:anywhere}
#page-quiz[data-twt-active] #submit-btn,#page-quiz[data-twt-active] #hint-btn,#page-quiz[data-twt-active] .next-hint-btn{min-width:44px;min-height:44px;white-space:normal}
#page-quiz[data-twt-active] #feedback{display:block;width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;font-size:1rem;line-height:1.6}
#page-quiz[data-twt-active] #feedback p{margin-top:8px}
#page-quiz[data-twt-active] #hint-area p{margin:6px 0;line-height:1.6}
.twt-screen-table{border-collapse:collapse;width:100%;max-width:520px;table-layout:fixed;margin:8px auto;font-family:var(--font-learning),sans-serif;font-size:.88rem;line-height:1.3}
.twt-screen-table col:first-child{width:27%}.twt-screen-table col{width:24.333%}
.twt-screen-table th,.twt-screen-table td{border:2px solid #343434;padding:5px 2px;text-align:center;vertical-align:middle;overflow-wrap:anywhere;height:54px;position:relative}
.twt-screen-table thead th{font-size:.82rem}.twt-screen-table thead td{border:none}
.twt-screen-table th{font-weight:600}.twt-screen-table td.twt-total{font-weight:700}
.twt-screen-table input{width:44px;min-width:44px;height:44px;min-height:44px;max-width:100%;padding:0;text-align:center;font:600 1.3rem var(--font-learning),sans-serif;border:2px solid #5b5b5b;border-radius:5px;background:#fff;color:#222;box-sizing:border-box}
.twt-screen-table input:focus-visible{outline:3px solid #125bad;outline-offset:1px}
.twt-screen-table input:disabled{opacity:1;-webkit-text-fill-color:#222;background:#f4f4f4}
.twt-screen-table .twt-invalid input{border:3px solid #a32620}
.twt-field-mark{position:absolute;right:1px;top:1px;font-weight:800;color:#8b1414;font-size:14px}
.twt-screen-table-wrap{position:relative;box-sizing:border-box;width:100%;max-width:536px;margin:8px auto;padding:8px}
.twt-screen-table-wrap .twt-screen-table{margin:0 auto}
.twt-screen-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.twt-screen-lines rect{fill:none;stroke:#111;stroke-width:3px}
.twt-screen-lines [data-twt-frame-kind="error"]{stroke-dasharray:7 5}
.twt-line-symbols{display:inline-block;white-space:nowrap;font-size:14px;font-weight:800;line-height:1.2;color:#111;margin-left:2px}
.twt-alternative{font-size:.85rem;line-height:1.55;text-align:left;margin:10px 0;overflow-wrap:anywhere}
.twt-input-guide{font-size:.95rem;line-height:1.5;text-align:left;margin:10px 0}
.twt-explanation{font-size:.95rem;line-height:1.65;text-align:left;margin:14px 0;padding-top:10px;border-top:2px solid #5a755f}
.twt-explanation p{margin:8px 0}.twt-card-focus,.twt-lesson-focus{font-size:.9rem;line-height:1.6;margin:6px 0}
#lesson-card-content .calc-row:has([data-twt-example-answer]){display:block;white-space:normal;line-height:1.7;font-size:1rem}
#page-print:has(#pr-sheet[data-unit="two_way_table_missing_cells3_4"]){overflow-x:auto;max-width:100%;padding:12px}
#page-print:has(#pr-sheet[data-unit="two_way_table_missing_cells3_4"]) .pr-preview-scroll{overflow-x:auto;max-width:100%;padding:12px}
#pr-sheet[data-unit="two_way_table_missing_cells3_4"],.twt-sheet[data-unit="two_way_table_missing_cells3_4"]{box-sizing:border-box!important;width:210mm!important;min-width:210mm!important;max-width:none!important;height:297mm!important;min-height:297mm!important;padding:10mm!important;margin:12px auto!important;transform:none!important;background:white!important;color:black!important;text-align:left!important}
#pr-sheet[data-unit="two_way_table_missing_cells3_4"] > :not(#pr-problems){display:none!important}
#pr-sheet[data-unit="two_way_table_missing_cells3_4"] #pr-problems{display:block!important;margin:0!important;padding:0!important;width:190mm!important;max-width:190mm!important;gap:0!important}
.twt-print-page{box-sizing:border-box!important;width:190mm;height:267.5mm;color:#000;background:#fff;font-family:'BIZ UDPGothic','Atkinson Hyperlegible',sans-serif}
.twt-print-page[lang="en"]{font-family:'Atkinson Hyperlegible','BIZ UDPGothic',sans-serif}
.twt-print-head{display:block!important;position:static!important;top:auto!important;left:auto!important;right:auto!important;width:190mm!important;max-width:190mm!important;background:white!important;color:black!important;box-shadow:none!important;border:0!important;border-radius:0!important;z-index:auto!important;height:28mm!important;box-sizing:border-box;padding:0;margin:0!important}
.twt-print-head h1{font-size:14.2pt!important;line-height:7mm!important;height:7mm!important;font-weight:700!important;text-align:center!important;margin:0!important;padding:0!important;white-space:nowrap!important}
.twt-print-fields{font-size:10.2pt!important;line-height:7mm!important;height:7mm!important;white-space:pre!important;margin:0!important;padding:0!important;word-spacing:4mm}
.twt-print-head p{font-size:12.7pt!important;line-height:6mm!important;height:6mm!important;margin:0!important;padding:0!important;white-space:nowrap!important}
.twt-print-questions{height:203mm!important;display:grid!important;grid-template-columns:91mm 91mm!important;gap:4mm!important;margin:0!important;padding:0!important;align-items:start}
.twt-print-column{display:grid!important;grid-template-rows:repeat(5,39mm)!important;row-gap:2mm!important;width:91mm!important}
.twt-print-question{height:39mm!important;width:91mm!important;break-inside:avoid!important;margin:0!important;padding:0!important;box-sizing:border-box!important}
.twt-print-number{font-size:12.7pt!important;line-height:6mm!important;height:6mm!important;white-space:nowrap!important}
.twt-print-table-wrap{position:relative!important;width:82mm!important;height:28mm!important;padding:0!important;margin:0!important}
.twt-print-table{border-collapse:collapse!important;border-spacing:0!important;table-layout:fixed!important;width:82mm!important;height:28mm!important;font-size:12.7pt!important;line-height:1!important;margin:0!important;padding:0!important;border:0!important}
.twt-print-table col:nth-child(1){width:20mm!important}.twt-print-table col:nth-child(2),.twt-print-table col:nth-child(3){width:24mm!important}.twt-print-table col:nth-child(4){width:14mm!important}
.twt-print-table td,.twt-print-table th{box-sizing:border-box!important;border:0!important;padding:0!important;text-align:center!important;vertical-align:middle!important;height:8mm!important;background:white!important;color:black!important;font-weight:400!important;font-size:12.7pt!important;line-height:1!important}
.twt-print-table thead tr,.twt-print-table thead td,.twt-print-table thead th,.twt-print-table tbody tr:last-child,.twt-print-table tbody tr:last-child th,.twt-print-table tbody tr:last-child td{height:6mm!important}
.twt-print-table th{font-size:9.2pt!important;white-space:nowrap!important}
.twt-print-lines{position:absolute!important;inset:0!important;width:82mm!important;height:28mm!important;max-width:none!important;pointer-events:none!important;overflow:visible!important}
.twt-print-answers{margin:3mm 0 0!important;padding:0!important;height:33.5mm!important;break-inside:avoid!important}
.twt-print-answers h2{font-size:12.7pt!important;line-height:6mm!important;height:6mm!important;font-weight:600!important;margin:0!important;padding:0!important;text-align:left!important}
.twt-print-answer-columns{display:grid!important;grid-template-columns:91mm 91mm!important;gap:4mm!important}
.twt-print-answer{font-size:10.2pt!important;height:4.5mm!important;line-height:4.5mm!important;white-space:nowrap!important;overflow:visible!important}
.twt-pdf-clone{margin:0!important;box-shadow:none!important}
.twt-pdf-clone > :not(#pr-problems){display:none!important}
.twt-pdf-clone #pr-problems{display:block!important;width:190mm!important;margin:0!important;padding:0!important;gap:0!important}
@media print{
 #page-print:has(#pr-sheet[data-unit="two_way_table_missing_cells3_4"]){overflow:visible!important;padding:0!important;max-width:none!important}
 #pr-sheet[data-unit="two_way_table_missing_cells3_4"]{width:190mm!important;min-width:190mm!important;max-width:190mm!important;height:277mm!important;min-height:277mm!important;margin:0!important;padding:0!important;box-shadow:none!important;break-after:avoid!important}
 #pr-sheet[data-unit="two_way_table_missing_cells3_4"] > :not(#pr-problems){display:none!important}
 #pr-sheet[data-unit="two_way_table_missing_cells3_4"] #pr-problems{display:block!important;grid-template-columns:none!important}
}
@media(max-width:400px){#page-quiz[data-twt-active] .question-card{padding:12px 8px!important}#page-quiz[data-twt-active] .twt-screen-table th{font-size:12px}#page-quiz[data-twt-active] .twt-alternative{font-size:12px}}

#page-quiz[data-twt-active] #feedback.has-text{height:auto;min-height:46px;overflow:visible;padding:8px 0}
@media(max-width:640px){#page-quiz[data-twt-active] #submit-bar{position:static;box-shadow:none;border-top:0;padding:8px 14px calc(8px + env(safe-area-inset-bottom,0px))}#page-quiz[data-twt-active] .quiz-page{padding-bottom:16px}}

.twt-print-fields > [data-twt-surface="SURF-TWT-PRINT-HEADER"]{display:flex!important;gap:0!important;width:158mm!important;white-space:pre!important;font-size:0!important;letter-spacing:0!important;word-spacing:0!important}
.twt-header-slot{font-size:10.2pt!important;letter-spacing:normal!important;word-spacing:normal!important;display:flex!important;align-items:center!important;box-sizing:border-box!important;height:7mm!important;line-height:7mm!important;flex:none!important;width:55mm!important;gap:2mm!important;white-space:nowrap!important}
.twt-header-slot:nth-of-type(2){width:58mm!important}.twt-header-slot:nth-of-type(3){width:35mm!important}
.twt-header-slot::after{content:"";display:block;flex:1;min-width:0;height:4.8mm;border-bottom:.3mm solid #000}

.twt-header-slot~.twt-header-slot{margin-left:5mm!important}
