.figure-enlarge {
  align-self: flex-end;
  margin: .25rem .5rem 0;
  min-height: 2.75rem;
  padding: .25rem .85rem;
  border: 1px solid #a8bfb1;
  border-radius: .45rem;
  background: white;
  color: #125e49;
  font: 600 .875rem/1.3 system-ui, sans-serif;
  cursor: pointer;
}
.figure-enlarge[hidden] { display: none; }
#fit-range-form[hidden], #fit-range-form figure[hidden] { display:none; }
.coupon-fields, .stack-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,13em),1fr)); gap:.65rem 1rem; }
#countersink-form fieldset { min-width:0; border:1px solid #acbfb4; border-radius:.5rem; }
#countersink-form output { display:block; margin:.6rem 0; font-weight:600; }
#countersink-diagram[hidden] { display:none; }
#roller-form fieldset { min-width:0; border:1px solid #acbfb4; border-radius:.5rem; }
#roller-result { display:block; margin:.6rem 0; font-weight:600; }
#pad-pair-form fieldset { min-width:0; border:1px solid #acbfb4; border-radius:.5rem; }
#pad-pair-result { display:block; margin:.6rem 0; font-weight:600; }
.coupon-fields label, .stack-fields label { min-width:0; display:grid; gap:.2rem; }
.coupon-fields input, .stack-fields :is(input, select) { min-width:0; width:100%; box-sizing:border-box; padding:.4rem; font:inherit; }
.stack-fields label:first-child { grid-column:1/-1; }
#coupon-form fieldset { min-width:0; border:1px solid #acbfb4; border-radius:.5rem; }
#coupon-result { display:block; margin-top:.6rem; color:#234c43; font-weight:600; }
#draft-controls label { display:grid; gap:.3rem; }
#draft-controls select { width:fit-content; max-width:100%; font:inherit; padding:.4rem; }
#draft-depth { width:100%; accent-color:#19654e; }
#draft-result { font-weight:600; color:#284c40; }
.figure-enlarge:focus-visible, .figure-reading-area:focus-visible {
  outline: 2px solid #995326;
  outline-offset: -3px;
}
@media screen {
  .figure-reading-area {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
  figure .figure-reading-area > svg,
  figure .figure-reading-area > img[src$=".svg"] {
    width: max(100%, var(--reading-width));
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0;
  }
  .hex-cutaway .hex-views:has(.figure-reading-area) { aspect-ratio: auto; }
}
@media print {
  .figure-enlarge { display: none; }
}
