.worksheet { scroll-margin-top: 24px; padding: clamp(20px,4vw,44px); margin-block: 32px 48px; border: 1px solid var(--ink); border-radius: 18px; background: #fffef9; }
.worksheet h2 { font-family: var(--display); font-size: clamp(1.7rem,4vw,2.55rem); line-height: 1.12; letter-spacing: -.04em; }
.worksheet > p { margin: 12px 0 20px; max-width: 75ch; }
.sheet-rows { display: grid; gap: 12px; }
.sheet-row { margin: 0; min-width: 0; padding: 14px; border: 1px solid #c9c8b9; border-radius: 10px; }
.sheet-cells { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.sheet-field { flex: 1 1 125px; min-width: 0; display: grid; gap: 5px; font-weight: 650; font-size: .88rem; }
.sheet-field input { box-sizing: border-box; min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid #797a70; border-radius: 6px; background: white; color: var(--ink); font: inherit; font-weight: 400; }
.sheet-date { max-width: 14rem; margin-bottom: 18px; }
.sheet-check { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; font-size: .88rem; cursor: pointer; }
.sheet-check input { width: 18px; height: 18px; accent-color: #155b4d; }
.sheet-tools:not([hidden]) { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 12px; }
.sheet-tools button { color: var(--ink); background: var(--paper); font: inherit; font-weight: 650; padding: 10px 14px; border: 1px solid var(--ink); border-radius: 7px; cursor: pointer; }
.sheet-tools [data-add] { background: #c9efd5; }
.sheet-row button { margin-top: 10px; font: inherit; font-size: .8rem; text-decoration: underline; border: 0; background: transparent; color: inherit; cursor: pointer; }
.sheet-row button:disabled { visibility: hidden; }
.worksheet :focus-visible { outline: 3px solid #1e6f58; outline-offset: 2px; }
.sheet-hint { color: #52554d; font-size: .9rem; }
.sheet-sr { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.print-value { display: none; }
@media (max-width: 640px) {
  .sheet-row { padding: 12px; }
  .sheet-field { flex-basis: 100%; }
  .sheet-field input { font-size: 16px; }
  .sheet-check { min-width: 48px; }
}
@media print {
  @page { margin: 14mm; }
  .header, .site-footer, .skip, .library-main > :not(.worksheet), .sheet-tools, .sheet-row button, .sheet-hint { display: none !important; }
  .library-main, .worksheet { margin: 0; padding: 0; width: 100%; max-width: none; border: 0; }
  body, .worksheet { background: white; color: black; }
  .worksheet h2 { font-size: 19pt; }
  .worksheet > p { margin-block: 6pt; font-size: 10pt; }
  .sheet-rows { display: block; }
  .sheet-row { break-inside: avoid; margin: 0 0 7pt; padding: 6pt; }
  .sheet-field { flex: 1 1 85pt; font-size: 9pt; }
  .sheet-cells { gap: 6pt; }
  .sheet-check { min-width: auto; min-height: auto; font-size: 9pt; }
  .enhanced .sheet-field input { display: none; }
  .enhanced .print-value { display: block; min-height: 1.5em; border-bottom: 1px solid #aaa; font-weight: 400; white-space: pre-wrap; overflow-wrap: anywhere; }
  .sheet-date { margin-bottom: 7pt; }
}
