/* Tape worksheet: print first (Letter portrait), readable on screen. Sizes in mm so the plan crops
   come out at the same scale on paper and on screen. Readable with and without tinted lenses:
   black on white, no colour-coded meaning. */
html, body { margin: 0; background: #e9e9e9; color: #1a1a1a; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 10.5pt; line-height: 1.3; }
.screen-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 8px 14px; background: #fff; border-bottom: 2px solid #1a1a1a; font-size: 14px; }
.screen-bar a { color: #1f4e9c; }
.screen-bar button { font: inherit; padding: 6px 12px; border: 2px solid #1a1a1a; border-radius: 6px; background: #fff; cursor: pointer; }
main#sheet { max-width: 216mm; margin: 12px auto; }
section.ws { background: #fff; padding: 10mm 12mm; margin: 0 0 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.15); break-after: page; }
section.ws:last-child { break-after: auto; }
h1 { font-size: 20pt; margin: 0 0 2mm; }
h2 { font-size: 14pt; margin: 0 0 2mm; border-bottom: 2px solid #1a1a1a; padding-bottom: 1mm; display: flex; justify-content: space-between; align-items: baseline; gap: 8mm; }
h2 .photo { font-size: 10pt; font-weight: 400; white-space: nowrap; }
h3 { font-size: 11.5pt; margin: 5mm 0 1.5mm; }
h3.page { break-before: page; margin-top: 0; }
p { margin: 0 0 2mm; }
.muted { color: #5f5f5f; }
.subtitle { font-size: 10.5pt; margin-bottom: 3mm; }
.datum { border: 1.5px solid #1a1a1a; background: #f4f4f2; padding: 3mm 4mm; margin: 3mm 0; }
.datum ul { margin: 1mm 0 0; padding-left: 5mm; }
.datum li { margin: 0.6mm 0; }
.fields { display: flex; gap: 10mm; margin: 2mm 0 4mm; }
.fields .f { flex: 1; border-bottom: 1px solid #1a1a1a; padding: 0 1mm; min-height: 7mm; white-space: nowrap; }
.tick { display: inline-block; width: 4mm; height: 4mm; border: 1.5px solid #1a1a1a; vertical-align: -0.8mm; margin-right: 1.5mm; }
.crop { display: block; margin: 2mm auto 3mm; border: 1px solid #c9c9c9; background: #efeeea; }
.wrap { font-size: 9.5pt; margin: 1mm 0 3mm; }
table.rows { border-collapse: collapse; width: 100%; font-size: 9.5pt; margin: 1mm 0 2mm; }
table.rows th, table.rows td { border: 1px solid #8a8a8a; padding: 1.2mm 1.6mm; vertical-align: top; text-align: left; }
table.rows th { background: #e9e9e9; font-size: 9pt; }
table.rows td.code { font-weight: 700; white-space: nowrap; width: 15mm; font-variant-numeric: tabular-nums; }
table.rows td.what .ref { display: block; color: #5f5f5f; font-size: 8.5pt; }
table.rows td.plan { width: 30mm; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.rows td.plan .b { display: inline-block; min-width: 4mm; padding: 0 1mm; border: 1px solid #1a1a1a; border-radius: 2mm; font-size: 8pt; font-weight: 700; text-align: center; line-height: 4mm; margin-right: 1mm; }
table.rows td.plan .b.m { background: #1a1a1a; color: #fff; }
table.rows td.plan .b.d { border-style: dashed; }
table.rows td.plan .b.o { background: #b35900; border-color: #b35900; color: #fff; }
table.rows td.meas { width: 36mm; height: 8mm; }
table.rows td.meas .unit { float: right; color: #5f5f5f; font-size: 8.5pt; }
table.rows td.meas.wide { width: 60mm; }
table.rows td.tick { width: 6mm; text-align: center; border-color: #8a8a8a; display: table-cell; height: auto; margin: 0; vertical-align: middle; }
table.rows tr.key td { background: #fbe9d9; }
table.rows tr.key td.code::after { content: " ★"; }
table.free td { height: 8mm; }
.notes { margin-top: 3mm; }
.notes .line { border-bottom: 1px solid #8a8a8a; height: 7mm; }
.foot { font-size: 8.5pt; color: #5f5f5f; margin-top: 4mm; display: flex; justify-content: space-between; }

@media print {
  @page { size: letter portrait; margin: 11mm 11mm 12mm; }
  html, body { background: #fff; }
  .screen-bar { display: none; }
  main#sheet { max-width: none; margin: 0; }
  section.ws { padding: 0; margin: 0; box-shadow: none; }
  table.rows th { background: #e9e9e9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.rows td.plan .b, table.rows tr.key td, .datum { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  tr { break-inside: avoid; }
}
