/* V119 Print precision: screen preview and actual paper are separate outputs. */
.print-sheets-v119{display:none}
body:has(#printSheetsV119) .print-settings-more-v119 select{width:100%}
body:has(#printSheetsV119) .print-settings-more-v119{font-size:11px;min-width:0}
@media screen and (min-width:1190px){
 body:has(#printSheetsV119) .print-controls{
  grid-template-columns:1fr 1fr .83fr 1.17fr 1.1fr 1.18fr 1.28fr 64px!important;
  gap:7px!important;
 }
 body:has(#printSheetsV119) .print-controls select,
 body:has(#printSheetsV119) .print-controls button{font-size:10.5px!important;padding:5px 7px!important}
 body:has(#printSheetsV119) .print-controls .inline-check{font-size:9.5px!important}
}
@media screen and (min-width:800px) and (max-width:1189px){
 body:has(#printSheetsV119) .print-controls{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 body:has(#printSheetsV119) .print-controls label{grid-column:auto!important}
 body:has(#printSheetsV119) .print-controls .inline-check{grid-column:auto!important;min-height:35px}
}
@media screen and (max-width:799px){
 body:has(#printSheetsV119) .print-controls{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body:has(#printSheetsV119) .print-controls .inline-check{grid-column:1/-1!important}
}
@media screen{
 body:has(#printSheetsV119) #printPreview[data-count="1"] .print-grid{width:min(100%,430px)!important;max-width:430px!important}
 body:has(#printSheetsV119) #printPreview[data-count="1"] .print-grid td{
  width:auto!important;height:auto!important;aspect-ratio:1;font-size:clamp(16px,1.65vw,22px)}
 body:has(#printSheetsV119) #printPreview[data-count="1"] .print-puzzle{padding:15px!important}
}
/* Explicit, page-grouped print layout; no inherited 90mm grid or 48% board. */
@media print{
 html,body{margin:0!important;padding:0!important;background:#fff!important;color:#14243b!important}
 body:has(#printSheetsV119) .top,
 body:has(#printSheetsV119) .footer,
 body:has(#printSheetsV119) .owner-quickbar-v115,
 body:has(#printSheetsV119) main.wrap > :not(#printSheetsV119){display:none!important}
 body:has(#printSheetsV119) main.wrap{max-width:none!important;width:100%!important;padding:0!important;margin:0!important}
 body:has(#printSheetsV119) #printSheetsV119{display:block!important;margin:0!important;padding:0!important}
 body:has(#printSheetsV119) #printSheetsV119 .print-sheet-v119{
  display:grid!important;grid-template-columns:1fr!important;
  justify-items:center!important;align-content:start!important;
  row-gap:3mm!important;column-gap:4mm!important;
  width:100%!important;padding:0!important;margin:0!important;
  break-inside:avoid!important;break-after:page!important;
  page-break-after:always!important;box-sizing:border-box!important;
 }
 body:has(#printSheetsV119) #printSheetsV119 .print-sheet-v119:last-child{
  break-after:auto!important;page-break-after:auto!important;
 }
 body:has(#printSheetsV119) #printSheetsV119 .print-sheet-v119[data-per-sheet="4"]{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-content:start!important;row-gap:7mm!important
 }
 body:has(#printSheetsV119) #printSheetsV119 .print-puzzle{
  width:var(--print-board-mm)!important;max-width:100%!important;
  min-width:0!important;break-inside:avoid!important;
  display:block!important;box-sizing:border-box!important;
  margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;background:#fff!important;
 }
 body:has(#printSheetsV119) #printSheetsV119 .print-puzzle h2{
  display:block!important;font-size:12pt!important;font-weight:800!important;
  line-height:1.25!important;color:#173a68!important;margin:0 0 3mm!important;
  text-align:center!important;
 }
 body:has(#printSheetsV119) #printSheetsV119 .print-grid{
  width:var(--print-board-mm)!important;max-width:100%!important;
  table-layout:fixed!important;border-collapse:collapse!important;
  margin:0 auto!important;padding:0!important;
 }
 body:has(#printSheetsV119) #printSheetsV119 .print-grid td{
  width:calc(var(--print-board-mm) / 9)!important;
  min-width:0!important;
  height:calc(var(--print-board-mm) / 9)!important;
  min-height:0!important;max-height:none!important;
  font-size:clamp(11pt,2vw,17pt)!important;
  line-height:1!important;padding:0!important;text-align:center!important;
  color:#132d51!important;background:#fff!important;
 }
 body:has(#printSheetsV119) #printSheetsV119 .print-sheet-v119[data-per-sheet="4"] .print-grid td{
  font-size:11pt!important;
 }
 body:has(#printSheetsV119) #printSheetsV119 .print-sheet-v119[data-per-sheet="2"] .print-grid td{
  font-size:13pt!important;
 }
}
/* Fill the custom numbers area rather than leaving a blank region below it. */
@media screen and (min-width:1100px){
 .custom-workspace .custom-controls>.numbers-card{
  display:flex!important;flex-direction:column!important;
  align-self:stretch!important;height:auto!important;min-height:0!important;
 }
 .custom-workspace .custom-controls>.build-around-card{align-self:stretch!important}
 .custom-workspace .custom-controls>.numbers-card .custom-pad{
  flex:1 1 auto!important;grid-template-rows:repeat(3,minmax(50px,1fr))!important;
  gap:9px!important;margin:9px 0!important;
 }
 .custom-workspace .custom-controls>.numbers-card .custom-pad button{
  height:100%!important;min-height:51px!important;
  font-size:19px!important;border-radius:10px!important;
 }
 .custom-workspace .custom-controls>.numbers-card .small-actions{margin-top:auto!important}
 .custom-workspace .custom-controls>.build-around-card .build-note{
  margin-top:8px!important;padding:8px 0 0!important;
  border-top:1px solid #dce6f4!important;
 }
}
/* Tidy interactive help affordances in the administration interface. */
#webCmsPanel .web-cms-help,
#webCmsPanel button.web-cms-help,
body:has(#navWebContent) .web-cms-help{
 width:15px!important;height:15px!important;min-width:15px!important;
 flex:0 0 15px!important;line-height:13px!important;padding:0!important;
 border-radius:50%!important;font-size:9px!important;font-weight:800!important;
 vertical-align:middle!important;margin:0 2px!important;
 box-shadow:none!important;
}
#webCmsPanel label:has(.web-cms-help){gap:5px!important;font-size:11px!important}
/* For any non-CMS help bubbles shared by legacy admin forms */
.admin-page button[aria-label="شرح الإعداد"]{width:15px!important;height:15px!important;padding:0!important;font-size:9px!important}
/* Editorial footer and citations */
.editorial-sources-v115,.editorial-sources-v119{
 display:flex;align-items:center;gap:5px 12px;flex-wrap:wrap;
 padding:11px 14px!important;margin:22px 0!important;
 border:1px solid #d5e4ef;border-radius:10px;background:#f7fafc;
 font-size:12px!important;color:#587087!important;text-align:start!important;
}
.editorial-sources-v115 a,.editorial-sources-v119 a{font-size:12px!important;font-weight:700}
.editorial-footer-v119{border-top:1px solid #bed6e9!important;background:#f3f8ff!important;
 margin-top:30px!important;padding:28px 0!important;line-height:1.6!important}
.editorial-footer-v119 .wrap{display:grid!important;
 grid-template-columns:minmax(0,1fr) auto!important;gap:15px 35px!important;
 align-items:center!important;max-width:1200px!important}
.editorial-footer-v119 .editorial-footer-intro{display:grid;gap:3px}
.editorial-footer-v119 .editorial-footer-intro strong{font-size:17px;color:#153e68}
.editorial-footer-v119 .editorial-footer-intro span{font-size:12px;color:#536c84}
.editorial-footer-v119 nav{display:flex!important;gap:9px 19px!important;flex-wrap:wrap!important}
.editorial-footer-v119 nav a{font-size:12.5px!important;color:#125d99!important;text-decoration:none!important}
.editorial-footer-v119 nav a:hover{text-decoration:underline!important}
body.dark .editorial-footer-v119{background:#15263a!important;border-color:#40617b!important}
body.dark .editorial-footer-v119 .editorial-footer-intro strong{color:#e3f2ff}
body.dark .editorial-sources-v115,body.dark .editorial-sources-v119{background:#1d3147;color:#c2d8e9;border-color:#456680}
@media(max-width:650px){.editorial-footer-v119 .wrap{grid-template-columns:1fr!important;padding:0 18px!important}}
/* Guided worked examples complement the original printable lessons. */
.learning-examples-v119{margin:24px 0;padding:21px 24px;
 border:1px solid #b9d3e9;border-radius:15px;background:#f6faff}
.learning-examples-v119 h2{font-size:20px;margin:0 0 10px;line-height:1.35}
.learning-examples-v119 .learning-steps-v119{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:10px}
.learning-examples-v119 article{background:#fff;border:1px solid #d5e5f2;border-radius:11px;padding:12px 14px}
.learning-examples-v119 h3{font-size:14px;margin:0 0 5px}
.learning-examples-v119 p{font-size:12.5px;line-height:1.8;margin:4px 0}
.learning-examples-v119 .lesson-follow-v119{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px;font-size:12px}
.learning-examples-v119 .lesson-follow-v119 a{font-weight:750;padding:6px 9px;border:1px solid #c3d9ee;background:#fff;border-radius:8px}
body.dark .learning-examples-v119{background:#1a2b41;border-color:#4b6581}
body.dark .learning-examples-v119 article{background:#203954;border-color:#3c6083}
@media(max-width:650px){.learning-examples-v119{padding:14px}.learning-examples-v119 .learning-steps-v119{grid-template-columns:1fr}}
@media print{.learning-examples-v119,.editorial-footer-v119,.editorial-sources-v115{display:none!important}}
