:root { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: #eef3f8; color: #172d4a; font-family: Arial, sans-serif; }
.sheet { width: 210mm; min-height: 297mm; margin: 18px auto; padding: 12mm 13mm; background: #fff; box-shadow: 0 8px 30px #17365d22; }
.sheet-header { display: flex; justify-content: space-between; gap: 24px; align-items: end; padding-bottom: 8px; border-bottom: 3px solid #346b9b; }
.eyebrow { margin: 0 0 4px; color: #26608f; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0 0 5px; font-size: 25px; }
.sheet-header p { margin-top: 4px; }
.sheet-header label { white-space: nowrap; font-weight: 700; }
.name-line { display: inline-block; width: 40mm; margin-left: 6px; border-bottom: 1px solid #172d4a; }
.task-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm 7mm; padding-top: 7mm; }
.task { position: relative; display: flex; flex-direction: column; break-inside: avoid; min-height: 38mm; padding: 4mm; border: 1.5px solid #9bb6ce; border-radius: 8px; background: #f9fbfd; }
.task-heading { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2.5mm; color: #49657c; font-size: 10px; }
.task-heading strong { color: #2b648f; font-size: 11px; }
.number-row { display: block; width: 100%; min-height: 17mm; margin: 0; padding: 3mm 1mm 1mm; font-size: 18px; font-weight: 700; line-height: 2.4em; text-align: center; white-space: nowrap; }
.number-item { display: inline-flex; align-items: center; justify-content: center; height: 2.4em; line-height: 1; vertical-align: middle; }
.separator { display: inline; margin: 0 .55em 0 .18em; color: #294f70; font-size: 1.55em; font-weight: 800; line-height: 1; vertical-align: middle; }
.separator { color: #8295a5; font-size: 13px; }
.frac { display: inline-flex; flex-direction: column; align-items: center; min-width: 1.5em; line-height: 1; vertical-align: middle; font-size: .82em; }
.frac .top { width: 100%; padding: 0 3px 2px; border-bottom: 1.5px solid currentColor; text-align: center; }
.frac .bottom { padding-top: 2px; }
.sqrt { display: inline-flex; align-items: flex-start; line-height: 1; }
.sqrt::before { content: "√"; margin-right: -1px; font-size: 1.35em; font-weight: 400; }
.radicand { padding: 2px 3px 0 2px; border-top: 1.5px solid currentColor; }
.answer-line { height: 8mm; margin-top: auto; border-bottom: 1.5px solid #8095a8; }
.answer { display: none; position: absolute; left: 4mm; right: 4mm; bottom: 2mm; color: #b42318; font-size: 9px; line-height: 1.1; text-align: center; }
.show-answers .answer { display: block; }
.toolbar { position: sticky; bottom: 16px; display: flex; justify-content: center; gap: 10px; margin: 18px; }
.toolbar button { padding: 10px 16px; border: 0; border-radius: 7px; background: #2d628f; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .sheet { margin: 0; box-shadow: none; }
  .no-print { display: none !important; }
}
