/* ══════════════════════════════════════════
   SPECIMEN SHEET — the object's record, as a print-ready page.
   On screen it floats as a preview over a mat; in print everything else
   is hidden and the sheet alone goes to paper or PDF.
   ══════════════════════════════════════════ */

#specimen-overlay { display: none; }

#specimen-overlay.open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 4000;
  overflow: auto;
  background: rgba(33, 29, 18, 0.55);
  padding: 26px 18px 60px;
}

#specimen-overlay .sp-toolbar {
  max-width: 820px;
  margin: 0 auto 14px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

#specimen-sheet {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-2);
  box-shadow: 6px 6px 0 rgba(33, 29, 18, 0.18);
  padding: 34px 38px 26px;
  font-family: var(--serif);
}

.sp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
}
.sp-title { font-size: 25px; font-weight: 600; letter-spacing: .2px; }
.sp-sub { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.sp-stamp {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--stamp);
  border: 1.5px solid var(--stamp);
  padding: 5px 9px;
  text-align: center;
  line-height: 1.1;
}
.sp-stamp span { display: block; font-size: 7.5px; letter-spacing: .12em; color: var(--ink-3); margin-top: 3px; }

.sp-fig {
  display: block;
  width: 100%;
  margin: 18px 0;
  border: 1px solid var(--line-2);
  background: var(--mat);
}

.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
#specimen-sheet section h3 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  margin: 0 0 8px;
}
.sp-block { margin-top: 20px; }

.sp-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  padding: 3px 0;
  border-bottom: 1px dotted var(--line);
}
.sp-k { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.sp-v { text-align: right; }

.sp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sp-table th {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-3); text-align: left; border-bottom: 1px solid var(--line-2); padding: 4px 6px;
}
.sp-table td { padding: 4px 6px; border-bottom: 1px dotted var(--line); }
.sp-table td:first-child { font-family: var(--mono); color: var(--ink-2); width: 36px; }

.sp-ann { font-size: 13px; padding: 4px 0; border-bottom: 1px dotted var(--line); }
.sp-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; vertical-align: middle; border: 1px solid rgba(33,29,18,.3); }
.sp-empty { font-size: 12.5px; color: var(--ink-3); font-style: italic; }

.sp-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}

@media print {
  body > *:not(#specimen-overlay) { display: none !important; }
  #specimen-overlay.open { position: static; background: none; padding: 0; overflow: visible; }
  #specimen-overlay .sp-toolbar { display: none !important; }
  #specimen-sheet { max-width: none; margin: 0; border: none; box-shadow: none; background: #fff; padding: 0; }
  .sp-fig { border: 1px solid #999; }
  @page { size: A4 portrait; margin: 14mm; }
}
