.protocol-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 15px;
  margin: -10px 0 14px;
  background: #f4eedc;
  border: 1px solid #e6e2d8;
  border-radius: 8px;
}
.protocol-tools-copy strong { display: block; font-size: 11px; color: #856b32; }
.protocol-tools-copy p { margin: 4px 0 0; color: #716f68; font-size: 10px; }
.protocol-tools-actions { display: flex; align-items: end; gap: 7px; flex-wrap: wrap; }
.protocol-filter { display: grid; gap: 4px; color: #716f68; font-size: 9px; font-weight: 700; }
.protocol-selection { width: 18px; height: 18px; accent-color: #856b32; cursor: pointer; }
.protocol-row-action { white-space: nowrap; }
.protocol-rubric-row th { padding: 8px 11px; background: #f4eedc; border-top: 1px solid #dfd6bf; border-bottom: 1px solid #dfd6bf; color: #715b29; font: 600 12px var(--serif); text-align: left; }
.protocol-count { color: #716f68; font-size: 10px; align-self: center; }
.protocol-selection-hint { color: #716f68; font-size: 10px; align-self: center; }
.protocol-selection-hint[hidden] { display: none; }
.protocol-disclaimer { margin: 0 0 13px; }
.protocol-preview-note { margin: 0 22px 14px; }
#modal.protocol-modal { width: min(1000px, 96vw); }
#modal.protocol-picker-modal { width: min(760px, 96vw); }
#modal.protocol-picker-modal { display: flex; flex-direction: column; overflow: hidden; max-height: 92dvh; }
#modal.protocol-picker-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
#modal.protocol-modal .modal-body { background: #efeee9; padding: 16px; }
.protocol-picker-controls { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(180px, 1fr) auto; align-items: end; gap: 10px; }
.protocol-name-search input { font: inherit; }
.protocol-picker-actions { display: flex; gap: 6px; }
.protocol-picker-count { margin: 10px 0 7px; color: #716f68; font-size: 11px; font-weight: 700; }
.protocol-picker-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: min(42dvh, 400px); overflow-y: auto; padding: 2px; }
.protocol-picker-person { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 10px; border: 1px solid #e6e2d8; border-radius: 5px; background: #fffefa; cursor: pointer; }
.protocol-picker-person[hidden] { display: none; }
.protocol-picker-person input { flex: 0 0 auto; width: 17px; height: 17px; accent-color: #856b32; }
.protocol-picker-person span { min-width: 0; }
.protocol-picker-person strong,.protocol-picker-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.protocol-picker-person strong { color: #292a24; font-size: 11px; }
.protocol-picker-person small { margin-top: 3px; color: #79776e; font-size: 9px; }
.score-mode-options { display: grid; gap: 9px; }
.score-mode-option { display: grid; gap: 5px; padding: 14px 16px; border: 1px solid #dfdcd2; border-radius: 6px; background: #fffefa; color: #2b2c27; text-align: left; cursor: pointer; }
.score-mode-option.selected { border-color: #a58a4b; box-shadow: inset 3px 0 #a58a4b; background: #faf6ea; }
.score-mode-option strong { font-size: 13px; }
.score-mode-option span { color: #716f68; font-size: 11px; line-height: 1.45; }
.fast-score-complete-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #cbb77e; border-radius: 5px; background: #faf5e6; color: #56451d; font-size: 11px; }
.fast-score-complete-banner[hidden] { display: none; }
.protocol-preview-pages { display: grid; gap: 16px; }
.protocol-sheet {
  width: 100%;
  min-height: 850px;
  padding: 24px;
  color: #252620;
  background: white;
  border: 1px solid #e2dfd5;
  box-shadow: 0 5px 18px #15140d12;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.protocol-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 13px 16px;
  background: #191a17;
  border-radius: 5px;
}
.protocol-sheet-head img { display: block; width: min(290px, 58%); max-height: 58px; object-fit: contain; filter: brightness(0) saturate(100%) invert(70%) sepia(22%) saturate(1040%) hue-rotate(7deg) brightness(91%) contrast(88%); }
.protocol-example-label {
  max-width: 205px;
  padding: 7px 9px;
  color: #f6edd6;
  background: #342e1e;
  border: 1px solid #77643a;
  border-radius: 4px;
  font-size: 9px;
  line-height: 1.4;
  font-weight: 750;
  text-align: center;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.protocol-sheet-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.protocol-sheet-title h2 { margin: 0; color: #856b32; font: 600 25px/1.1 var(--serif); }
.protocol-sheet-title p { margin: 5px 0 0; color: #77776f; font-size: 10px; }
.protocol-sheet-index { color: #8c7136; font-size: 9px; font-weight: 750; white-space: nowrap; }
.protocol-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.protocol-meta { min-height: 43px; padding: 7px 9px; border: 1px solid #e9e6dc; border-radius: 4px; }
.protocol-meta span { display: block; color: #85847d; font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.protocol-meta strong { display: block; margin-top: 4px; color: #272822; font-size: 10px; font-weight: 650; }
.protocol-meta.full { grid-column: 1 / -1; }
.protocol-score-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 1px; }
.protocol-score-title h3 { font: 600 15px var(--serif); }
.protocol-score-title span { color: #85847d; font-size: 9px; }
.protocol-score-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.protocol-score-table th { padding: 8px; color: #6d6d65; background: #f7f6f2; border: 1px solid #dedbd1; font-size: 8px; text-align: left; text-transform: uppercase; letter-spacing: .06em; }
.protocol-score-table td { height: 31px; padding: 6px 8px; border: 1px solid #dedbd1; font-size: 9px; }
.protocol-score-table th:nth-child(1) { width: 37%; }
.protocol-score-table th:nth-child(2) { width: 17%; }
.protocol-score-table td small { display: block; color: #9a8a63; font-size: 7px; }
.protocol-score-table td.protocol-mark-cell { text-align: center; font-size: 12px; }
.protocol-score-table td.protocol-mark-cell small { font-size: 6px; line-height: 1.1; }
.protocol-notes { flex: 1; min-height: 92px; padding: 10px; border: 1px solid #dedbd1; border-radius: 4px; }
.protocol-notes strong { color: #77776f; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.protocol-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: auto; padding-top: 10px; }
.protocol-signatures span { padding-top: 22px; border-top: 1px solid #88877f; color: #77776f; font-size: 9px; }
.protocol-sheet-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid #e9e6dc; color: #8b8981; font-size: 8px; }
#protocolPrintRoot { display: none; }
.protocol-pdf-preview { display: block; width: 100%; height: min(76vh, 950px); border: 1px solid #d8d7cf; background: #eee; }
.protocol-pdf-preview[hidden], .protocol-pdf-loading[hidden] { display: none; }
.protocol-pdf-loading { min-height: 300px; display: grid; place-items: center; color: #716f68; font-size: 13px; }
.protocol-pdf-loading.error { color: #a63b33; }
#modal.protocol-modal { width: min(1120px, 96vw); }
#modal.protocol-modal .modal-body { padding: 12px; }
@media (max-width: 620px) {
  .protocol-tools { align-items: stretch; }
  .protocol-tools-actions { align-items: stretch; }
  .protocol-filter { flex: 1; min-width: 125px; }
  .protocol-tools-actions .btn { flex: 1; }
  .protocol-sheet { min-height: 720px; padding: 14px; }
  .protocol-sheet-head { padding: 10px; }
  .protocol-sheet-head img { width: 55%; }
  .protocol-example-label { font-size: 7px; }
}
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  body.printing-protocols { background: white !important; }
  body.printing-protocols > *:not(#protocolPrintRoot) { display: none !important; }
  body.printing-protocols #protocolPrintRoot { display: block !important; }
  body.printing-protocols .protocol-page {
    box-sizing: border-box;
    width: 194mm;
    height: 281mm;
    padding: 2mm;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body.printing-protocols .protocol-page:last-child { break-after: auto; page-break-after: auto; }
  body.printing-protocols .protocol-score-table td { height: 16px; padding: 2px 4px; font-size: 7px; }
  body.printing-protocols .protocol-score-table th { padding: 4px; font-size: 6.5px; }
  body.printing-protocols .protocol-score-table td.protocol-mark-cell { font-size: 9px; }
  body.printing-protocols .protocol-sheet-head,
  body.printing-protocols .protocol-example-label {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body.printing-protocols .protocol-sheet-head { min-height: 24mm; }
  body.printing-protocols .protocol-sheet-head img { width: 84mm; max-height: 16mm; }
  body.printing-protocols .protocol-sheet { min-height: 0; }
body.printing-protocols .protocol-notes { min-height: 28mm; }
}

.fast-score-notice { margin-bottom: 12px; }
.fast-score-scale-note { margin: -4px 0 12px; }
.fast-score-scale-note a { color: #67511f; font-weight: 700; text-decoration: underline; }
.fast-score-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; color: #856b32; }
.fast-score-heading span { color: #74766f; font-size: 10px; }
.fast-score-list { display: grid; gap: 6px; max-height: 300px; overflow: auto; padding: 2px 3px 2px 0; }
.fast-score-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px; align-items: center; gap: 12px; min-height: 45px; padding: 6px 9px; border: 1px solid #e8e5dc; border-radius: 6px; background: #fffefa; }
.fast-score-row.has-notes { grid-template-columns: minmax(125px, .8fr) 76px minmax(150px, 1fr); }
.fast-score-row strong { display: block; color: #303229; font-size: 11px; }
.fast-score-row small { display: block; margin-top: 2px; color: #92783d; font-size: 9px; }
.fast-score-input { width: 76px; padding: 8px; border: 1px solid #d8d7cf; border-radius: 5px; color: #856b32; font-size: 15px; font-weight: 700; text-align: center; }
.fast-score-note-input { width: 100%; min-width: 0; padding: 8px; border: 1px solid #d8d7cf; border-radius: 5px; color: #303229; font: 11px var(--sans); }
.fast-score-input:focus-visible,.fast-score-key:focus-visible { outline: 3px solid #b99141; outline-offset: 2px; }
.fast-score-row.fast-score-points-row { grid-template-columns: minmax(150px, 1fr) 92px 110px; }
.fast-score-row.fast-score-points-row.has-notes { grid-template-columns: minmax(135px, 1fr) 84px 96px minmax(130px, 1fr); }
.fast-score-field { display: grid; gap: 3px; color: #716f68; font-size: 9px; font-weight: 700; }
.fast-score-field .fast-score-input,.fast-score-deduction { width: 100%; min-height: 34px; padding: 6px 7px; border: 1px solid #d8d7cf; border-radius: 5px; background: #fff; color: #303229; font-size: 13px; font-weight: 700; text-align: center; }
.fast-score-rule-note { margin: -4px 0 9px; color: #716f68; font-size: 10px; }
.fast-score-pad-wrap { margin-top: 13px; }
.fast-score-pad-wrap > strong { display: block; margin-bottom: 7px; color: #856b32; font-size: 11px; }
.fast-score-pad { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.fast-score-key { min-height: 34px; padding: 4px 2px; border: 1px solid #d8d2c4; border-radius: 5px; background: #f4eedc; color: #856b32; font-size: 10px; font-weight: 700; cursor: pointer; }
.fast-score-key:hover { background: #e9d9ae; }
.fast-score-total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 6px; background: #f7f5ef; color: #616159; font-size: 11px; }
.fast-score-total strong { color: #856b32; font-size: 15px; }
.fast-score-source { margin-top: 12px; border-top: 1px solid #e7e4db; padding-top: 10px; }
.protocol-pd4-reference { margin: 0 22px 14px; }
.fast-score-source summary { color: #856b32; font-size: 11px; font-weight: 700; cursor: pointer; }
.fast-score-source p,.fast-score-source a { color: #716f68; font-size: 10px; }
.fast-score-source iframe { display: block; width: 100%; height: min(70vh, 760px); border: 1px solid #d8d7cf; background: #efeee9; }
@media (max-width: 620px) {
  .protocol-picker-controls { grid-template-columns: 1fr 1fr; }
  .protocol-picker-actions { grid-column: 1 / -1; }
  .protocol-picker-list { grid-template-columns: 1fr; }
  .fast-score-row.has-notes { grid-template-columns: minmax(0, 1fr) 70px; }
  .fast-score-row.has-notes .fast-score-note-input { grid-column: 1 / -1; }
  .fast-score-row.fast-score-points-row,.fast-score-row.fast-score-points-row.has-notes { grid-template-columns: minmax(100px, 1fr) 76px 88px; }
  .fast-score-row.fast-score-points-row.has-notes .fast-score-note-input { grid-column: 1 / -1; }
  .fast-score-heading { align-items: start; flex-direction: column; gap: 3px; }
  .fast-score-pad { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .fast-score-key { min-height: 40px; }
}
.score-incomplete-label{display:inline-block;padding:3px 6px;border-radius:4px;background:#fff3d9;color:#87651b;font-size:9px;font-weight:700}.score-incomplete-count{margin-top:3px;color:#77766f;font-size:9px}
