* {box-sizing:border-box}
body {margin:0; color:#232529; font:1rem/1.55 system-ui,sans-serif; background:#f5f4f1}
main {max-width:51rem; margin:0 auto; padding:2rem clamp(1rem,4vw,3rem) 4rem; background:white}
header {border-top:5px solid #aa1c30; padding-top:1rem}
header p:first-child {font-weight:650}
h1,h2 {line-height:1.15}
h1 {font-size:clamp(2rem,6vw,3rem)}
h2 {font-size:1.35rem; margin-top:2rem; border-bottom:1px solid #bbb; padding-bottom:.4rem}
label {display:block; margin:1rem 0; font-weight:600}
input,textarea,select {display:block; margin-top:.2rem; width:100%; font:inherit; border:1px solid #666; border-radius:3px; padding:.5rem; background:white; color:#222}
textarea {min-height:5rem}
a {color:#8b1728}
button {font:inherit; border:1px solid #333; border-radius:4px; background:white; padding:.65rem 1rem; cursor:pointer}
#print {background:#8b1728; border-color:#8b1728; color:white}
.signature {margin:2rem 0}
.answer {display:none}
img {display:block; max-width:min(100%,30rem)}
@media print {
 body, main {background:white; color:black; font:10pt/1.3 sans-serif; padding:0; max-width:none}
 .screen,input,textarea,select {display:none}
 .answer {display:block; white-space:pre-wrap; overflow-wrap:anywhere; font-weight:400; min-height:1.2em}
 label {margin:.35rem 0}
 h2,h3 {break-after:avoid}
 h2 {margin:1rem 0 .4rem}
 .signature,img {break-inside:avoid}
 header {border:0;padding:0}
}

.pain-figure {margin:1.25rem 0; break-inside:avoid}
.pain-figure figcaption {font-weight:650}
#pain-map {display:block; width:100%; height:auto; border:1px solid #888; border-radius:4px; touch-action:none; cursor:crosshair}
#pain-map:focus-visible {outline:3px solid #27649a; outline-offset:2px}
#pain-marks {fill:none; stroke:#b00034; stroke-width:13; stroke-linecap:round; stroke-linejoin:round}
.pain-tools {margin-top:.5rem; display:flex; gap:.75rem; align-items:center}
@media print {
  #pain-map {width:100%; max-width:6in; border:none}
  .pain-tools,#pain-cursor {display:none}
}
