.report-tools { flex-wrap: wrap; }
.template-toggle { font-size: 18px; font-weight: 650; }
.template-toggle::after { content: "⌄"; margin-left: 16px; }
.template-toggle[aria-expanded="true"]::after { content: "⌃"; }
.protocol-templates { flex-basis: 100%; width: 100%; min-width: 0; border-top: 1px solid var(--line); padding-top: 24px; }
.protocol-templates[hidden] { display: none; }
.template-catalog { display: grid; gap: 14px; margin-bottom: 28px; }
.template-catalog h3 { margin: 0; }
.template-options { display: flex; flex-wrap: wrap; gap: 8px; }
.template-options button { text-align: left; }
.template-options button[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); color: var(--green); background: var(--selected); }
.template-organs { padding: 12px 0; border-block: 1px solid var(--line); }
.template-organs summary { cursor: pointer; }
.template-organs[open] summary { margin-bottom: 14px; }
.pdf-preview-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.pdf-preview-heading h3 { margin: 0; }
.pdf-preview-heading .quiet-note { max-width: 640px; }
.pdf-preview-heading .actions { flex-shrink: 0; flex-wrap: wrap; }
.pdf-preview-status { color: var(--muted); margin: 12px 0; }
.pdf-preview-status:empty { display: none; }
.pdf-preview-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.protocol-pdf { display: block; width: 100%; height: 760px; height: clamp(420px, 75vh, 900px); border: 1px solid var(--line); border-radius: 10px; background: #e9eded; }
@media (max-width: 767px) {
  .pdf-preview-heading { flex-direction: column; }
  .pdf-preview-heading .actions { width: 100%; }
  .template-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-options button { min-width: 0; overflow-wrap: anywhere; padding: 12px; }
  .protocol-pdf { height: 560px; }
}
.print-theme-picker { margin-bottom: 28px; }
.print-theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.print-theme-option { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; text-align: left; }
.print-theme-option > span:last-child { font-size: 12px; color: var(--muted); }
.print-theme-option[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 2px var(--green); background: var(--selected); }
.theme-thumbnail { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 210 / 297; background: #eeefed; overflow: hidden; }
.theme-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.theme-thumbnail > span { font-size: 12px; color: var(--muted); }
.protocol-pdf { overflow: auto; padding: 16px; }
.protocol-pdf figure { margin: 0 auto 20px; max-width: 900px; }
.protocol-pdf img { display: block; width: 100%; height: auto; box-shadow: 0 2px 10px #0002; }
.protocol-pdf figcaption { text-align: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.pdf-preview-links { align-items: center; }
.pdf-preview-links .disabled { opacity: .5; cursor: default; }
.protocol-print-frame { position: fixed; left: -10000px; width: 1px; height: 1px; border: 0; }
@media (max-width: 767px) {
  .print-theme-options { gap: 6px; }
  .print-theme-option { padding: 6px; }
  .print-theme-option > span:last-child { display: none; }
  .protocol-pdf { padding: 5px; }
}
