:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: #233b34;
  background: #f5f3ed;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1000px; margin: auto; padding: 32px; }
h2 { font-size: 18px; margin: 0 0 16px; }
.editor { border: 1px solid #cfd7ce; background: #fcfcf8; border-radius: 12px; padding: 24px; }
label { display: block; }
textarea { resize: vertical; width: 100%; min-height: 100px; padding: 14px; border: 1px solid #9daa9e; border-radius: 6px; background: white; color: #233b34; font: 18px/1.5 ui-sans-serif, system-ui, sans-serif; }
textarea[aria-invalid="true"] { border-color: #9a3724; }
.editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin-top: 16px; }
#feedback { font-size: 14px; line-height: 1.5; margin: 0; }
#feedback:empty { display: none; }
.invalid-worksheet #feedback { color: #9a3724; margin-right: auto; }
button { border: 0; border-radius: 6px; padding: 14px 20px; background: #285a47; color: white; font: 600 15px ui-sans-serif, system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
button:hover { background: #1b4534; }
button:disabled { background: #dce1db; color: #59645b; cursor: not-allowed; }
:focus-visible { outline: 3px solid #b0731b; outline-offset: 4px; }
.preview-section { margin-top: 24px; }
.preview-scroll { overflow: auto; padding: 20px; background: #e4e8df; border-radius: 8px; }
.worksheet { width: 8.5in; height: 11in; margin: auto; background: white; box-shadow: 0 3px 12px #233b3420; }
.worksheet-svg { display: block; width: 8.5in; height: 11in; }
@media (max-width: 600px) {
  main { padding: 20px 16px; }
  .editor { padding: 18px; }
  .editor-actions { align-items: stretch; flex-direction: column; gap: 14px; }
  .preview-scroll { padding: 12px; }
}
@page { size: letter portrait; margin: 0; }
@media print {
  html, body { width: 8.5in; height: 11in; margin: 0; padding: 0; background: white; }
  main, .preview-section, .preview-scroll { display: block; max-width: none; width: 8.5in; height: 11in; margin: 0; padding: 0; overflow: visible; border: 0; border-radius: 0; background: white; }
  .editor, noscript { display: none; }
  .worksheet { margin: 0; padding: 0; border: 0; box-shadow: none; }
  body.invalid-worksheet main { display: none; }
}
