@font-face {
  font-family: 'Practice Manuscript';
  src: url('fonts/ABeeZee.ttf') format('truetype');
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: 'Practice Cursive';
  src: url('fonts/PlaywriteUSTrad.ttf') format('truetype');
  font-weight: 100 400;
  font-display: block;
}

.hw-main {padding: 2.1rem 0 4rem}
.hw-main h1 {font-size: clamp(2.5rem,5.2vw,4.5rem); margin: 1rem 0 .7rem; max-width: 21ch; line-height: 1.04}
.hw-main .crumb {display: flex; gap: .55rem; flex-wrap: wrap}
.hw-intro {margin: 0 0 1.75rem; max-width: 64ch}
.hw-layout {display: grid; grid-template-columns: minmax(15rem,.88fr) minmax(0,2.12fr); gap: clamp(1rem,3vw,2.4rem); align-items: start}
#hw-settings {padding: 1.35rem; background: #e8eee2; border: 1px solid #c5cfbf; border-radius: 5px}
#hw-settings h2 {margin: 0 0 1.1rem; font: normal 1.7rem Georgia,serif}
#hw-settings label {display: block; font-weight: 650; margin: .85rem 0 .25rem}
#hw-settings fieldset {min-width: 0; margin: 0; padding: 0; border: 0}
#hw-settings select,#hw-settings textarea {width: 100%; padding: .55rem .65rem; border: 1px solid #83988a; border-radius: 4px; background: #fff; color: #203d33; font: inherit}
#hw-settings textarea {display: block; resize: vertical; min-height: 6rem}
#hw-settings :disabled {color: #627269; background: #f4f6f1}
.hw-hint,.hw-error {font-size: .875rem; line-height: 1.4; margin: .4rem 0 0}
.hw-error {color: #81391e; font-weight: 600}
.hw-error:empty {display: none}
#grade-examples {margin-top: .55rem; padding: .2rem 0; background: transparent; border: 0; color: #244a39; font: inherit; text-decoration: underline; cursor: pointer}
.visually-hidden {position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap}
.hw-actions {display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin: 0 0 .65rem}
#hw-status {font-size: .95rem; margin: 0}
#hw-print {background: #244a39; color: white; border: 1px solid #244a39; border-radius: 4px; padding: .55rem 1rem; font: inherit; font-weight: 650; cursor: pointer}
#hw-print:disabled {opacity: .53; cursor: default}
.hw-main :focus-visible {outline: 3px solid #916120; outline-offset: 3px}
#paper {background: #fff; border: 1px solid #cbd2bd; border-radius: 3px; padding: clamp(.85rem,2.5vw,1.7rem)}
.paper-head {padding-bottom: .6rem; border-bottom: 2px solid #526b58}
.paper-head h2 {font: normal clamp(1.7rem,3.2vw,2.4rem)/1.1 Georgia,serif; margin: 0}
#sheet-meta {font-size: .9rem; margin: .35rem 0 0}
.student-details {display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; font-size: .9rem; margin: .9rem 0}
.student-details i {width: 8em; display: inline-block; border-bottom: 1px solid #647369}
.student-details span:last-child i {width: 5em}
.practice-block {break-inside: avoid; page-break-inside: avoid; padding: 7px 0 12px}
.practice-block + .practice-block {border-top: 1px solid #dce1d8}
.practice-lane {display: grid; grid-template-columns: 3rem minmax(0,1fr); gap: .45rem; align-items: center}
.lane-label {font: 600 .9rem/1.3 'Segoe UI',sans-serif; color: #3d5646}
.practice-lane svg {display: block; width: 100%; height: auto; overflow: hidden}
.print-instruction {display: none}
@media(max-width:760px) {
  .hw-layout {grid-template-columns: minmax(0,1fr)}
  #hw-print,#hw-settings select {min-height: 44px}
}
@media(max-width:450px) {
  .practice-lane {grid-template-columns: 2.45rem minmax(0,1fr); gap: .15rem}
  .lane-label {font-size: .8rem}
}
@page {margin: .55in}
@media print {
  body {background: white; color: black}
  body > header,body > footer,body > .skip,.hw-main > nav,.hw-main > h1,.hw-intro,#hw-settings,.hw-actions,noscript {display: none !important}
  main.hw-main,.hw-layout,.hw-output,#paper {display: block; width: 100%; max-width: 7.15in; margin: 0 auto; padding: 0; border: 0}
  .paper-head {break-after: avoid}
  .paper-head h2 {font-size: 21pt}
  .student-details,#sheet-meta,.lane-label {font-size: 10pt}
  .practice-lane {grid-template-columns: .43in minmax(0,1fr); gap: .07in}
  .practice-block {padding: .04in 0 .1in}
  body:not(.worksheet-ready) .hw-layout {display: none}
  body:not(.worksheet-ready) .print-instruction {display: block}
}
