/* DDIT-20261019: target-only display and physical worksheet contracts. */
.ddit-question{position:relative;width:100%;max-width:760px;margin:auto;color:#172439}
.ddit-arrows{position:absolute;top:0;left:0;width:100%;height:190px;pointer-events:none;overflow:visible;display:block;color:#234f86}
.ddit-arrows path[data-from]{fill:none;stroke:currentColor;stroke-width:2;marker-end:url(#ddit-arrow-head)}
.ddit-arrows text{font:18px 'Atkinson Hyperlegible','BIZ UDPGothic',sans-serif;fill:currentColor}
.ddit-equation{padding-top:85px;display:flex;align-items:end;justify-content:center;flex-wrap:wrap;gap:32px 12px;font-size:24px;font-weight:bold}
.ddit-original{width:100%;justify-content:center;white-space:nowrap;display:flex;gap:8px;align-items:center}
.ddit-new-equation{display:flex;align-items:center;gap:6px;white-space:nowrap;padding-bottom:27px}
.ddit-field{position:relative;display:inline-flex;flex-direction:column;align-items:center;gap:6px}
.ddit-field>span{position:absolute;top:calc(100% + 6px);font-size:14px;font-weight:600;white-space:nowrap}
.ddit-field input{box-sizing:border-box;width:96px;min-width:44px;min-height:46px;border:2px solid #53657a;border-radius:7px;text-align:center;font:22px 'Atkinson Hyperlegible','BIZ UDPGothic',sans-serif;background:white;color:#172439}
.ddit-field input:focus{outline:3px solid #5880c5;outline-offset:2px}
.ddit-field input[aria-invalid=true]{border-color:#c0392b}
.ddit-factor{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:18px}
.ddit-factor button{min-width:80px;min-height:46px;border:2px solid #53657a;border-radius:8px;background:#fff;color:#172439;font-size:18px}
.ddit-factor button[aria-pressed=true]{background:#d9e9ff;outline:3px solid #244c84}
.ddit-question p{font-size:16px;line-height:1.55;white-space:normal}
.ddit-field-results{display:flex;flex-wrap:wrap;gap:4px 16px;justify-content:center}
.ddit-field-results p{margin:3px}
#page-quiz[data-ddit] #question-text{font-size:clamp(18px,2vw,24px);line-height:1.55;overflow-wrap:anywhere}
#page-quiz[data-ddit] #feedback{height:auto;min-height:46px;white-space:normal}
#page-quiz[data-ddit] .quiz-expl{max-height:none;overflow:visible;text-align:left;line-height:1.65;margin-bottom:18px}
#page-quiz[data-ddit] .quiz-expl p{margin:8px 0}
@media(max-width:480px){.ddit-equation{font-size:20px;gap:32px 8px}.ddit-original{width:100%;justify-content:center}.ddit-new-equation{gap:4px;width:100%;justify-content:center}.ddit-field input{width:63px;font-size:19px}.ddit-field>span{font-size:12px}.ddit-arrows{height:240px}#page-quiz[data-ddit] #answer-zone{padding-left:0;padding-right:0}}
#pr-sheet[data-unit=decimal_division_integer_transform2_5]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit=decimal_division_integer_transform2_5]{width:210mm!important;min-width:210mm!important;max-width:none!important;height:297mm!important;min-height:297mm!important;box-sizing:border-box;padding:10mm!important;margin:16px!important;transform:none!important;background:white!important;color:black!important;overflow:hidden!important}
#pr-sheet[data-unit=decimal_division_integer_transform2_5] #pr-problems{display:block!important;width:190mm!important;height:277mm!important;padding:0!important;margin:0!important;column-count:1!important;transform:none!important}
#page-print:has(#pr-sheet[data-unit=decimal_division_integer_transform2_5]){max-width:100%;overflow-x:auto;padding:0 12px 16px;box-sizing:border-box}
.ddit-print-page{box-sizing:border-box;width:190mm;height:277mm;background:white;color:#000;font-family:'Atkinson Hyperlegible','BIZ UDPGothic',sans-serif;text-align:left;line-height:1.2;transform:none!important}
.ddit-print-page *{box-sizing:border-box;color:#000}
.ddit-print-page header{height:34mm;position:static;display:block;padding:0;margin:0;background:white;box-shadow:none}
.ddit-print-page h1{font-size:14.2pt;line-height:7mm;height:7mm;text-align:center;margin:0;font-weight:700;white-space:nowrap}
.ddit-print-header{font-size:12.7pt;height:7mm;line-height:7mm;white-space:pre}
.ddit-print-instructions{font-size:12.7pt!important;line-height:5mm!important;margin:0!important;max-width:187mm;overflow-wrap:normal}
.ddit-print-columns{display:grid!important;grid-template-columns:92mm 92mm;gap:3mm;margin:0;padding:0}
.ddit-print-page> .ddit-print-columns{margin-top:2mm}
.ddit-print-question{width:92mm;height:38mm;overflow:visible;break-inside:avoid;padding:0;margin:0;border:none}
.ddit-print-first{height:6mm;line-height:6mm;font-size:12.7pt;white-space:pre}
.ddit-print-boxes{height:9mm;display:flex;align-items:center;gap:1mm;font-size:12.7pt;white-space:pre}
.ddit-box{display:inline-block;border:.32mm solid black;height:8mm;flex:none;background:white}
.ddit-box-0{width:18mm}.ddit-box-1{width:14mm}.ddit-box-2{width:12mm}
.ddit-print-memo{height:18mm;font-size:12.7pt;display:flex;align-items:start;padding-top:2mm;white-space:nowrap}
.ddit-print-memo span{display:inline-block;width:70mm;height:14mm;border-bottom:.32mm solid black}
.ddit-print-answers{height:33.5mm;margin-top:2mm;padding:0;break-inside:avoid}
.ddit-print-answers h2{font-size:12.7pt;height:6mm;line-height:6mm;margin:0;padding:0}
.ddit-print-answers p{font-size:10.2pt!important;height:4.5mm;line-height:4.5mm!important;margin:0!important;white-space:pre}
.ddit-app-capture{width:190mm!important;height:277mm!important;margin:0!important;padding:0!important;max-width:none!important;transform:none!important}
@media print{
 #pr-sheet[data-unit=decimal_division_integer_transform2_5]{width:190mm!important;min-width:190mm!important;height:277mm!important;min-height:277mm!important;margin:0!important;padding:0!important;box-shadow:none!important;transform:none!important;break-after:avoid!important}
 #page-print:has(#pr-sheet[data-unit=decimal_division_integer_transform2_5]){overflow:visible!important;padding:0!important;margin:0!important}
 #pr-sheet[data-unit=decimal_division_integer_transform2_5] .ddit-print-page{margin:0!important;transform:none!important}
}

#page-quiz[data-ddit] #submit-bar{position:static!important;inset:auto!important;background:transparent!important;padding:12px 0!important;box-shadow:none!important;transform:none!important}
#page-quiz[data-ddit] #numpad-handoff-spacer{display:none!important}
#page-quiz[data-ddit] #answer-zone,#page-quiz[data-ddit] .ddit-question,#page-quiz[data-ddit] #ddit-response,#page-quiz[data-ddit] #ddit-format{min-width:0!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere;box-sizing:border-box}
#page-quiz[data-ddit] #feedback{overflow:visible!important;max-height:none!important;line-height:1.5}
.ddit-preview-title{display:none}
#page-print:has(#pr-sheet[data-unit=decimal_division_integer_transform2_5]) .ddit-preview-title{display:block;font-weight:bold}
#page-print:has(#pr-sheet[data-unit=decimal_division_integer_transform2_5]) .pr-toolbar{position:sticky;left:0;min-width:0;width:100%;box-sizing:border-box;gap:6px;flex-wrap:wrap}
#page-quiz[data-ddit] #submit-bar{width:auto!important;max-width:100%!important;box-sizing:border-box!important;margin:4px 12px!important}
#page-quiz[data-ddit] .quiz-page{min-height:0!important;padding-bottom:0!important}
@media(max-width:480px){.ddit-field input{width:54px}.ddit-new-equation{gap:3px;font-size:18px}.ddit-field>span{font-size:12px}}
/* Chromium rounds CSS borders to device pixels: keep the completed line above 0.3mm. */
.ddit-box{border-width:.55mm}.ddit-print-memo span{border-bottom-width:.55mm}

/* AC-15: keep the existing mobile language menu reachable for this unit. */
@media(max-width:640px){body.quiz-focus:has(#page-quiz.active[data-ddit=decimal_division_integer_transform2_5])>header{display:flex}}

/* The dedicated history marker keeps all other units on their existing layout. */
#result-details .result-row-top:has(.ddit-history-prompt){flex-wrap:wrap;gap:8px;align-items:flex-start}
#result-details .q-text:has(.ddit-history-prompt){flex:1 1 100%;min-width:0;overflow-wrap:anywhere}
#result-details .result-row-top:has(.ddit-history-prompt)>span:last-child{flex:1 1 100%;min-width:0;overflow-wrap:anywhere}

/* Three clear writing areas retain the exact approved header text and 7mm row. */
.ddit-print-header{display:flex;align-items:center;white-space:pre}
.ddit-header-field{display:inline-flex;align-items:center;gap:2mm;flex:1;min-width:0;height:7mm}
.ddit-header-field:nth-of-type(2){flex:2}
.ddit-header-field:nth-of-type(3){flex:.8}
.ddit-header-line{display:inline-block;flex:1;min-width:10mm;height:5mm;border-bottom:.55mm solid #000}
