/* Canonical SAT paper design, used by every worksheet export. */
#mlb-paper{display:none}
@media print{
  @page{size:A4;margin:14mm 13mm 16mm}
  .mlb-print{display:block}
  .mlb-band,.mlb-band *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .mlb-band{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:0 0 9px;margin:0 0 12px;border-bottom:2.5px solid #0b1425;font-family:"DM Sans",Arial,sans-serif;color:#0b1425}
  .mlb-brand{display:flex;align-items:center;gap:10px}
  html body .mlb-logo{width:34px;height:34px;border-radius:8px;background:#e7ff72!important;color:#0b1425;display:flex;align-items:center;justify-content:center;font:700 21px/1 "Space Grotesk","DM Sans",Arial,sans-serif;border:1px solid #0b1425}
  .mlb-name{font:700 20px/1 "Space Grotesk","DM Sans",Arial,sans-serif;letter-spacing:-.01em}
  .mlb-name small{display:block;font:700 8.5pt/1.2 "DM Sans",Arial,sans-serif;letter-spacing:.14em;color:#3a4a63;margin-top:3px}
  .mlb-right{text-align:right;font:500 9pt/1.35 "DM Sans",Arial,sans-serif;color:#3a4a63}
  .mlb-right b{display:block;color:#0b1425;font-size:10pt}
  .mlb-title{display:flex!important;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 10px;color:#000}
  .mlb-title h2{margin:0!important;font:700 17pt/1.15 "Space Grotesk","DM Sans",Arial,sans-serif!important;color:#000!important}
  .mlb-title span{font:600 9pt "DM Sans",Arial,sans-serif;color:#3a4a63;white-space:nowrap}
  .mlb-tag{display:inline-block;padding:3px 9px;border:1.5px solid #0b1425;border-radius:99px;font:700 8.5pt "DM Sans",Arial,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#0b1425}
  .mlb-info{display:grid!important;grid-template-columns:2.4fr 1fr 1.2fr 1fr;border:1.5px solid #0b1425;border-radius:6px;margin:0 0 10px;font:600 9pt "DM Sans",Arial,sans-serif;color:#0b1425}
  .mlb-info div{padding:7px 9px 16px;border-left:1px solid #0b1425}
  .mlb-info div:first-child{border-left:0}
  .mlb-info i{font-style:normal;float:right;font-weight:700}
  .mlb-note{margin:0 0 12px!important;font:500 9.5pt/1.45 "DM Sans",Arial,sans-serif!important;color:#222!important}
  .mlb-note b{color:#000}
  body.mlb-paper-on>*:not(#mlb-paper){display:none!important}
  #mlb-paper{display:block!important;color:#000;font-family:"DM Sans",Arial,sans-serif}
  #mlb-paper .mlb-qs{display:block}
  #mlb-paper .mlb-q{break-inside:avoid;padding:9px 0 12px;border-bottom:1px solid #ccc}
  #mlb-paper .mlb-q:last-child{border-bottom:0}
  #mlb-paper .mlb-qhead{display:flex;gap:8px;align-items:baseline;font-size:12pt;line-height:1.5}
  #mlb-paper .mlb-qn{flex:none;font-weight:700;min-width:26px}
  #mlb-paper .mlb-sec{display:block;float:none;font-size:8pt;color:#555;margin:0 0 3px;line-height:1.4}
  #mlb-paper .mlb-opts{display:grid;grid-template-columns:1fr 1fr;gap:5px 22px;margin:7px 0 0 34px;font-size:11.5pt}
  #mlb-paper .mlb-opts div{display:flex;gap:8px;align-items:center}
  #mlb-paper .mlb-opts b{flex:none;width:20px;height:20px;border:1.3px solid #000;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:9pt}
  #mlb-paper .mlb-key{break-before:page}
  #mlb-paper table{width:100%;border-collapse:collapse;font-size:10.5pt}
  #mlb-paper th,#mlb-paper td{border:1px solid #999;padding:5px 7px;text-align:left;vertical-align:top}
  #mlb-paper th{background:#eef1f5!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;font-size:9pt;text-transform:uppercase;letter-spacing:.04em}
  #mlb-paper .mlb-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:0;border:1.5px solid #0b1425;border-radius:6px;margin:0 0 14px;overflow:hidden}
  #mlb-paper .mlb-grid div{padding:5px 8px;border-right:1px solid #bbb;border-bottom:1px solid #bbb;font-size:11pt}
  #mlb-paper .mlb-grid div b{display:inline-block;min-width:24px}
  #mlb-paper .fraction>span:first-child{border-color:#000}
}
#mlb-paper{display:none}
/* Paper safety rules apply to the shared output, never to course screens. */
@media print{
 html body.mlb-paper-on{background:#fff!important;color:#000!important}
 #mlb-paper{--ink:#111;--muted:#333;--surface:#fff;--surface-raised:#fff;--line:#999;background:#fff!important;box-shadow:none!important;max-width:none;width:auto}
 #mlb-paper .mlw-section+.mlw-section{break-before:page}
 #mlb-paper .mlw-stem{flex:1;min-width:0}
 #mlb-paper .mlw-short-answer{margin:8px 0 0 34px;font-size:10.5pt}
 #mlb-paper .mlw-answer-space{height:18mm;margin:6mm 0 0 34px;border-bottom:1px dotted #bbb}
 #mlb-paper .mlb-q,#mlb-paper .mlb-qhead,#mlb-paper .mlb-key tr{break-inside:avoid;page-break-inside:avoid}
 #mlb-paper .mlb-key{break-before:page;page-break-before:always}
 #mlb-paper .mlb-q p{margin:4px 0;line-height:1.5}
 #mlb-paper .mlb-q .math{color:#111!important;overflow-wrap:anywhere}
 #mlb-paper .mlb-key .math{font-size:9pt!important;line-height:1.45;color:#111!important}
 #mlb-paper .mlb-key table{table-layout:auto}
 #mlb-paper .mlb-key td{overflow-wrap:anywhere;min-width:0}
 #mlb-paper .katex-display,#mlb-paper .katex-display>.katex{overflow:visible;white-space:normal}
 #mlb-paper .katex .base{white-space:nowrap}
 #mlb-paper svg:not(.katex svg){display:block;width:240px;max-width:100%;height:auto;max-height:none;break-inside:avoid;margin:3mm auto;background:#fff!important;color:#000!important}
 #mlb-paper .mlb-key svg:not(.katex svg){width:45mm}
 #mlb-paper .calc-table,#mlb-paper .ml-function-table{width:100%;table-layout:auto;font-size:10pt;color:#111;break-inside:avoid}
 #mlb-paper .calc-table th,#mlb-paper .calc-table td,#mlb-paper .ml-function-table th,#mlb-paper .ml-function-table td{font-size:10pt;padding:4px 6px;min-width:0;background:#fff!important;color:#111;white-space:normal}
 #mlb-paper .mlb-opts b{flex-shrink:0}
}

@media print{
 #mlb-paper svg:not(.katex svg) text{fill:#111!important;color:#111!important}
 #mlb-paper svg:not(.katex svg) :is(.curve,.f){stroke:#000!important;fill:none!important}
 #mlb-paper svg:not(.katex svg) :is(.g,.major,.minor){stroke:#ddd!important}
 #mlb-paper svg:not(.katex svg) :is(.axis,.a){stroke:#555!important;fill:none!important}
}

@media print{#mlb-paper svg.sat-fig>path,#mlb-paper svg.sat-fig>polyline,#mlb-paper svg.sat-fig>polygon{fill:none!important;stroke:#000!important}}

/* Shared student details and form identity for every curriculum and teacher paper. */
@media print{
 #mlb-paper .mlb-logo{flex:0 0 34px;min-width:34px;box-sizing:border-box}
 #mlb-paper .mlb-brand{flex-shrink:0}
 #mlb-paper .mlb-name,#mlb-paper .mlb-name small{white-space:nowrap}
 #mlb-paper .mlb-right{min-width:0;max-width:45%}
 #mlb-paper .mlb-info{grid-template-columns:2.4fr 1.3fr 1.3fr}
 #mlb-paper .mlb-info>div{min-height:10mm;box-sizing:border-box;min-width:0;padding:7px 9px 12px}
 #mlb-paper .mlb-info>div:nth-child(3n+1){border-left:0}
 #mlb-paper .mlb-info>div:nth-child(n+4){border-top:1px solid #0b1425}
 #mlb-paper .mlw-field-value{display:block;font-weight:500;font-size:9pt;line-height:1.35;margin-top:4px;min-height:1em}
 #mlb-paper .mlw-key-meta{margin:0 0 10px;font:600 9pt "DM Sans",Arial,sans-serif;color:#0b1425}
 #mlb-paper .mlw-key-meta .mlw-form-value{display:inline-block;min-width:18mm;min-height:1em;border-bottom:1px solid #999;font-weight:500;margin-left:4px}
}

/* Paper is readable on screen in every site theme, including native share/print fallback. */
@media screen {
 html body #app .worksheet, html body #mlb-paper.mlw-screen-paper {
  --ink:#111;--muted:#415166;--surface:#fff;--surface-raised:#f2f4f7;--line:#aab4c0;
  background:#fff!important;color:#111!important;border:1px solid #c7ced7;
  border-radius:10px;padding:clamp(16px,3vw,32px);box-sizing:border-box;
 }
 html body .worksheet :is(.math,.problem,.question-label,.worksheet-question,h2,h3,p,summary),
 html body #mlb-paper :is(.math,.mlb-note,h2,h3,p){color:#111!important}
 html body .worksheet .problem{background:#fff!important;border-color:#c7ced7!important;min-width:0;padding:16px 0;break-inside:avoid}
 html body .worksheet :is(.problems,.calc-sheet-page){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 28px}
 html body .worksheet :is(.answerkey,#calc-answer-key){margin-top:28px;padding-top:24px;border-top:2px solid #15253b;color:#111;background:#fff}
 html body .worksheet :is(th,td){background:#fff!important;color:#111!important;border-color:#aab4c0!important}
 .worksheet [data-mlw-screen-header] .mlb-print,#mlb-paper .mlb-print{display:block}
 .worksheet .sheet-head .mlb-print{display:none!important}
 .worksheet>h2,.worksheet>p.no-math,.worksheet .sheet-head>h2,.worksheet .sheet-head>.sheet-meta{display:none}
 .mlb-band{display:flex!important;align-items:center;justify-content:space-between;gap:12px;border-bottom:2px solid #15253b;padding-bottom:14px;margin-bottom:16px;color:#15253b}
 .mlb-brand{display:flex;align-items:center;gap:10px;flex-shrink:0}
 html body .mlb-logo{display:flex;align-items:center;justify-content:center;width:34px;height:34px;background:#e7ff72!important;color:#0b1425!important;border:1px solid #15253b;border-radius:8px;font:bold 21px Arial}
 .mlb-name{font:bold 20px Arial}.mlb-name small{display:block;font:bold 10px Arial;letter-spacing:.1em;margin-top:4px}
 .mlb-right{font:13px/1.5 Arial;text-align:right;overflow-wrap:anywhere}.mlb-right b{display:block}
 .mlb-title{display:flex!important;gap:10px;justify-content:space-between;align-items:baseline;margin:18px 0}
 html body .mlb-title h2{font-size:22px!important;margin:0!important;color:#111!important}
 .mlb-tag{font:12px Arial;white-space:nowrap}
 .mlb-info{display:grid!important;grid-template-columns:2fr 1fr 1fr;border:1px solid #15253b;margin-bottom:18px;color:#15253b;font:13px Arial}
 .mlb-info>div{padding:10px;min-height:54px;border-left:1px solid #aab4c0;min-width:0}
 .mlb-info>div:nth-child(3n+1){border-left:0}.mlb-info>div:nth-child(n+4){border-top:1px solid #aab4c0}
 .mlb-info i{float:right;font-style:normal}.mlw-field-value{display:block;margin-top:6px}
 html body.mlw-preview-on>*:not(#mlb-paper):not(.mlb-print-help){display:none!important}
 html body #mlb-paper.mlw-screen-paper{display:block!important;max-width:820px;margin:20px auto;box-shadow:0 8px 40px #0002}
 #mlb-paper .mlw-preview-tools{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding-bottom:20px;border-bottom:1px solid #aab4c0;margin-bottom:20px}
 #mlb-paper .mlb-q{border-bottom:1px solid #c7ced7;padding:18px 0}
 #mlb-paper .mlb-qhead{display:flex;gap:10px;font-size:18px;line-height:1.6}
 #mlb-paper .mlw-stem{min-width:0;flex:1}#mlb-paper .mlb-qn{font-weight:bold;flex:none}
 #mlb-paper .mlb-sec{display:block;font-size:13px;color:#415166}
 #mlb-paper .mlb-opts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0 0 30px}
 #mlb-paper .mlb-opts>div{display:flex;gap:10px;align-items:baseline}
 #mlb-paper .mlw-answer-space{height:70px;border-bottom:1px dotted #aab4c0;margin:12px 0 0 30px}
 #mlb-paper .mlb-key{margin-top:32px;padding-top:24px;border-top:2px solid #15253b}
 #mlb-paper table{width:100%;border-collapse:collapse}#mlb-paper :is(th,td){border:1px solid #aab4c0;padding:8px;text-align:left;vertical-align:top}
 #mlb-paper .mlw-key-meta{margin:12px 0}
 #mlb-paper svg:not(.katex svg){display:block;width:300px;max-width:100%;height:auto;margin:16px auto}
 @media(max-width:600px){html body .worksheet :is(.problems,.calc-sheet-page){grid-template-columns:1fr}.mlb-band{align-items:flex-start;flex-wrap:wrap}.mlb-right{text-align:left}.mlb-title{flex-wrap:wrap}#mlb-paper .mlb-opts{grid-template-columns:1fr}#mlb-paper .mlb-key{overflow-x:auto}html body #mlb-paper.mlw-screen-paper{margin:0;border-radius:0}.mlb-info{grid-template-columns:1.4fr 1fr 1fr}}
}
@media print{#mlb-paper .mlw-preview-tools{display:none!important}#mlb-paper .katex-display>.katex{white-space:nowrap}#mlb-paper .mlw-stem{overflow:visible}}

@media print{.mlw-document+.mlw-document{break-before:page;page-break-before:always}}
