/* Photo markup only. Drawing geometry stays in normalized source coordinates;
   this stylesheet changes control layout and the displayed canvas size only. */
@font-face{font-family:'DS Markup Sans';src:url('/assets/markup-fonts/DejaVuSans-Bold.ttf') format('truetype');font-style:normal;font-weight:700;font-display:block}
@font-face{font-family:'DS Markup Serif';src:url('/assets/markup-fonts/DejaVuSerif-Bold.ttf') format('truetype');font-style:normal;font-weight:700;font-display:block}
@font-face{font-family:'DS Markup Mono';src:url('/assets/markup-fonts/DejaVuSansMono-Bold.ttf') format('truetype');font-style:normal;font-weight:700;font-display:block}
.annotation-modal .modal-body{background:var(--surface);min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain}
.annotation-modal .modal-head{padding:13px 18px;flex-shrink:0}
.annotation-modal .modal-head h2{font-size:23px;line-height:1.2}
.annotation-modal .modal-head p{font-size:12px;line-height:1.4}
.annotation-modal .annotation-photo-navigation{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;padding:10px 14px 0;flex-shrink:0;min-width:0}
.annotation-modal .annotation-photo-navigation.is-single{grid-template-columns:minmax(0,1fr)}
.annotation-modal .annotation-photo-navigation select{width:100%;min-width:0;max-width:100%;height:44px;padding:8px 10px;font-size:14px;text-overflow:ellipsis}
.annotation-modal .annotation-photo-navigation .btn{min-height:44px;font-size:13px;padding:8px 10px}
.annotation-modal .annotation-photo-info{display:flex;align-items:center;gap:10px;min-height:44px;padding:5px 14px;color:var(--muted);font-size:12px;flex-shrink:0}
.annotation-modal .annotation-save-state{min-width:0;overflow-wrap:anywhere}
.annotation-modal .annotation-save-state.is-dirty{color:var(--text);font-weight:650}
.annotation-modal .editor-label{margin-left:auto;white-space:nowrap;font-variant-numeric:tabular-nums}
.annotation-modal .annotation-photo-info .fullscreen-control{min-height:44px;height:44px;font-size:12px;padding:7px 9px;flex-shrink:0}
.annotation-modal .annotation-toolbar{display:flex;align-items:stretch;gap:6px;padding:8px 14px;background:var(--surface);color:var(--text);border-bottom:1px solid var(--line);overflow-x:auto;overscroll-behavior-x:contain;flex-shrink:0}
.annotation-modal .annotation-tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:70px;flex:1 0 70px;min-height:58px;padding:7px 4px;font-size:12px;line-height:1.2;white-space:normal;text-align:center;box-shadow:none}
.annotation-modal .annotation-tool svg{width:22px;height:22px}
.annotation-modal .annotation-tool.active{background:var(--lime);border-color:var(--lime);color:var(--lime-ink)}
.annotation-modal .annotation-tool:focus-visible,.annotation-modal .annotation-color:focus-visible{outline:3px solid var(--text);outline-offset:2px}
.annotation-modal .annotation-style-options{position:relative;flex-shrink:0;border-bottom:1px solid var(--line);color:var(--text);background:var(--surface)}
.annotation-modal .annotation-style-options>summary{display:flex;align-items:center;gap:10px;min-height:43px;padding:8px 16px;cursor:pointer;font-size:13px;font-weight:650;list-style:none}
.annotation-modal .annotation-style-options>summary::-webkit-details-marker{display:none}
.annotation-modal .annotation-style-options>summary::after{content:'⌄';margin-left:auto;font-size:18px;line-height:1}
.annotation-modal .annotation-style-options[open]>summary::after{transform:rotate(180deg)}
.annotation-modal .annotation-current-colour{width:20px;height:20px;border-radius:50%;box-shadow:0 0 0 1px var(--subtle);flex-shrink:0}
.annotation-modal .annotation-style-body{display:flex;align-items:stretch;flex-direction:column;gap:12px;padding:3px 16px 12px;min-width:0}
.annotation-modal .annotation-colours{display:grid;grid-template-columns:repeat(7,44px);gap:7px;align-items:center;min-width:0}
.annotation-modal .annotation-color{height:44px;width:44px;min-width:44px;min-height:44px;margin:0;border:3px solid transparent;border-radius:50%;box-shadow:inset 0 0 0 2px #0002,0 0 0 1px var(--line)}
.annotation-modal .annotation-color.active{border-color:var(--text);outline:2px solid var(--surface);outline-offset:-5px}
.annotation-modal .annotation-colour-editor{display:grid;gap:10px;min-width:0}
.annotation-modal .annotation-colour-field{min-width:0;gap:6px}
.annotation-modal .annotation-colour-field>label{font-size:13px}
.annotation-modal .annotation-colour-controls input[type=color]{display:block;height:44px;width:52px;min-width:52px;min-height:44px;max-width:52px;flex:0 0 52px;padding:4px;border:1px solid var(--line);border-radius:9px;background:var(--surface);cursor:pointer}
.annotation-modal .annotation-colour-controls input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.annotation-modal .annotation-colour-controls input[type=color]::-webkit-color-swatch{border:0;border-radius:5px}
.annotation-modal .annotation-colour-controls input[type=color]::-moz-color-swatch{border:0;border-radius:5px}
.annotation-modal .annotation-colour-controls input[type=color]:focus-visible{outline:3px solid var(--lime);outline-offset:2px}
.annotation-modal .annotation-colour-code{flex:1;min-width:0;font-size:13px;font-variant-numeric:tabular-nums;color:var(--text)}
.annotation-modal .annotation-stroke-control{display:flex;align-items:center;gap:12px;white-space:nowrap;font-size:13px;min-height:44px;min-width:0}
.annotation-modal .annotation-stroke-control input{width:140px;min-width:70px;max-width:100%}
.annotation-modal .annotation-text-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;padding:10px 16px;border-bottom:1px solid var(--line);flex-shrink:0;position:sticky;top:0;z-index:6;background:var(--surface)}
.annotation-modal .annotation-text-entry .field{min-width:0;gap:6px}
.annotation-modal .annotation-text-entry label{font-size:13px;line-height:1.3}
.annotation-modal .annotation-text-entry input{width:100%;min-width:0;height:44px;font-size:16px;padding:9px 10px}
.annotation-modal .annotation-text-entry textarea{width:100%;min-width:0;min-height:88px;max-height:160px;max-height:min(160px,30dvh);resize:vertical;font-size:16px;line-height:1.4;padding:9px 10px;white-space:pre-wrap;overflow-y:auto}
.annotation-modal .annotation-text-entry .btn{height:44px;font-size:12px}
.annotation-modal .annotation-text-actions{display:flex;gap:7px}
.annotation-modal .annotation-text-prompt{grid-column:1/-1;line-height:1.45;font-size:12px;color:var(--muted)}
.annotation-modal .annotation-text-issue{grid-column:1/-1;line-height:1.45;font-size:13px;color:var(--danger,#FF8F86);font-weight:600}
.annotation-modal .annotation-style-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px}
.annotation-modal .annotation-style-grid .field{min-width:0;gap:6px}
.annotation-modal .annotation-style-grid .field>label{font-size:13px}
.annotation-modal .annotation-range,.annotation-modal .annotation-fill-control{display:flex;gap:10px;align-items:center;min-width:0;min-height:44px}
.annotation-modal .annotation-property-control{display:flex;align-items:center;gap:10px;min-width:0}
.annotation-modal .annotation-property-control select{flex:1;min-width:0}
.annotation-modal .annotation-colour-controls{display:flex;align-items:center;gap:12px;min-width:0}
.annotation-modal .annotation-property-ok{flex:0 0 44px;min-width:44px;min-height:44px;padding:8px 5px;font-size:12px;font-weight:750;line-height:1;border:1px solid var(--line);border-radius:9px;color:var(--text);background:var(--surface);box-shadow:none}
.annotation-modal .annotation-property-ok:hover,.annotation-modal .annotation-property-ok:focus-visible{border-color:var(--lime);box-shadow:0 0 0 1px var(--lime);color:var(--text)}
.annotation-modal .annotation-property-ok:active{background:var(--lime);color:var(--lime-ink)}
.annotation-modal .annotation-range input,.annotation-modal .annotation-fill-control input[type=range]{min-width:0;width:100%;height:44px;flex:1}
.annotation-modal .annotation-range output,.annotation-modal .annotation-fill-control output{font-size:13px;min-width:36px;text-align:right;font-variant-numeric:tabular-nums;color:var(--text)}
.annotation-modal .annotation-fill-control input[type=color]{height:44px;width:44px;min-width:44px;padding:4px;border-radius:8px}
.annotation-modal .annotation-style-grid select{height:44px;min-height:44px;padding:8px 10px;font-size:16px;max-width:100%}
.annotation-modal .annotation-selection{padding:10px 14px;background:var(--surface-2);border-bottom:1px solid var(--line);flex-shrink:0;display:grid;grid-template-columns:minmax(150px,1fr) auto;gap:8px;align-items:center}
.annotation-modal .annotation-selection select{min-height:44px;min-width:0;max-width:100%;font-size:14px;padding:8px 10px}
.annotation-modal .annotation-selection-actions{display:flex;gap:6px;align-items:center;min-width:0}
.annotation-modal .annotation-selection-actions .btn{min-height:44px;font-size:12px;padding:8px 11px;white-space:normal;line-height:1.25}
.annotation-modal .annotation-aspect-lock{grid-column:1/-1;display:flex;align-items:center;gap:8px;min-height:32px;font-size:12px;color:var(--muted)}
.annotation-modal .annotation-aspect-lock input{width:20px;height:20px;accent-color:var(--lime)}
.annotation-modal.annotation-typing .annotation-photo-navigation,.annotation-modal.annotation-typing .annotation-photo-info,.annotation-modal.annotation-typing .annotation-toolbar,.annotation-modal.annotation-typing .annotation-style-options,.annotation-modal.annotation-typing .annotation-selection,.annotation-modal.annotation-typing .annotation-options,.annotation-modal.annotation-typing .annotation-help,.annotation-modal.annotation-typing .modal-footer,.annotation-modal.annotation-typing .modal-brand,.annotation-modal.annotation-typing .modal-head p{display:none!important}
.annotation-modal.annotation-typing .modal-head{padding:8px 12px}
.annotation-modal.annotation-typing .modal-head h2{font-size:18px}
.annotation-modal.annotation-typing .annotation-stage{min-height:80px;flex:1 0 80px}
.annotation-modal .annotation-stage{background:#000000;min-height:120px;flex:1;padding:12px}
.annotation-modal .annotation-stage canvas{max-width:100%;max-height:100%;touch-action:none}
.annotation-modal .annotation-image-state{display:flex;flex-direction:column;align-items:center;gap:16px;padding:20px;max-width:420px;text-align:center;color:#ffffff;font-size:14px;line-height:1.55}
.annotation-modal .annotation-image-state .btn{min-height:44px}
.annotation-modal .annotation-options{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 14px;background:var(--surface);color:var(--text);border-top:1px solid var(--line);flex-shrink:0}
.annotation-modal .annotation-history{display:flex;gap:7px;align-items:center}
.annotation-modal .annotation-options .btn{min-height:44px;min-width:70px;font-size:13px;white-space:normal}
.annotation-modal .annotation-help{display:block;background:var(--surface);color:var(--muted);font-size:12px;line-height:1.45;padding:5px 14px 10px;text-align:left;flex-shrink:0}
.annotation-modal .modal-footer{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.5fr);gap:10px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));flex-shrink:0}
.annotation-modal[data-photo-count="1"] .modal-footer{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr)}
.annotation-modal .modal-footer .btn{width:100%;min-width:0;min-height:48px;font-size:15px;padding:10px;white-space:normal;line-height:1.25}
.annotation-modal [hidden]{display:none!important}
.annotation-modal.annotation-compact .annotation-toolbar{display:flex;overflow-x:auto;overscroll-behavior-x:contain;gap:5px;padding:5px 10px}
.annotation-modal.annotation-compact .annotation-tool{flex:0 0 82px;min-height:44px;flex-direction:row;font-size:11px;padding:5px 4px}
.annotation-modal.annotation-compact .annotation-tool svg{width:17px;height:17px}
.annotation-modal.annotation-compact .annotation-help{display:none}
.annotation-modal.annotation-compact .modal-head p{display:none}
.annotation-modal.annotation-compact .annotation-stage{flex:1 0 120px;min-height:120px}
.finding-markup-start{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0;padding:17px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.finding-markup-start>div{min-width:0}
.finding-markup-start strong{display:block;font-size:17px;line-height:1.35}
.finding-markup-start p{font-size:13px;line-height:1.5;color:var(--muted);margin-top:4px}
.finding-markup-start .btn{min-height:48px;font-size:14px;flex-shrink:0}
.finding-detail-modal .evidence-tools .markup-photo-button{min-height:44px;font-size:13px;padding:9px 12px}
@media(max-width:900px){
 .annotation-modal .annotation-toolbar{grid-template-columns:repeat(5,minmax(0,1fr))}
 .annotation-modal .annotation-style-body{align-items:stretch;flex-direction:column;gap:8px}
 .annotation-modal .annotation-colours{grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;max-width:390px}
 .annotation-modal .annotation-color{justify-self:center}
}
@media(max-width:740px){
 .annotation-modal .modal-head{padding:10px 14px}
 .annotation-modal .modal-head h2{font-size:21px}
 .annotation-modal .modal-head p{font-size:11px}
 .annotation-modal .annotation-photo-navigation{padding:8px 10px 0;gap:6px}
 .annotation-modal .annotation-photo-navigation select{font-size:13px;padding:8px}
 .annotation-modal .annotation-photo-navigation .btn{font-size:12px;padding:8px;gap:5px}
 .annotation-modal .annotation-photo-navigation .btn svg{width:16px;height:16px}
 .annotation-modal .annotation-photo-info{padding:4px 10px;gap:8px;font-size:11px}
 .annotation-modal .annotation-photo-info .fullscreen-control{font-size:11px;gap:5px;padding:6px 8px}
 .annotation-modal .annotation-toolbar{gap:5px;padding:7px 10px}
 .annotation-modal .annotation-tool{min-height:54px;font-size:11.5px;padding:6px 2px;gap:5px}
 .annotation-modal .annotation-tool svg{width:20px;height:20px}
 .annotation-modal .annotation-style-options>summary{padding:8px 12px;font-size:13px}
 .annotation-modal .annotation-style-body{padding:4px 12px 10px}
 .annotation-modal .annotation-colours{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 .annotation-modal .annotation-stage{padding:8px;min-height:100px}
 .annotation-modal .annotation-text-entry{padding:8px 12px;gap:8px}
 .annotation-modal .annotation-text-entry{grid-template-columns:minmax(0,1fr)}
 .annotation-modal .annotation-text-actions{justify-content:flex-end}
 .annotation-modal .annotation-text-actions .btn{min-width:92px}
 .annotation-modal .annotation-text-prompt{font-size:11px}
 .annotation-modal .annotation-selection{grid-template-columns:minmax(0,1fr);padding:8px 10px;gap:6px}
 .annotation-modal .annotation-selection-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 .annotation-modal .annotation-selection-actions .btn{padding:7px 4px;font-size:11px}
 .annotation-modal .annotation-selection-actions .btn[hidden]+.btn{grid-column:span 2}
 .annotation-modal .annotation-style-grid{gap:10px;grid-template-columns:minmax(0,1fr)}
 .annotation-modal .annotation-text-entry .btn{padding:8px;font-size:11px;gap:4px}
 .annotation-modal .annotation-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:6px 10px}
 .annotation-modal .annotation-history{display:contents}
 .annotation-modal .annotation-options .btn{min-width:0;min-height:44px;padding:6px 5px;gap:4px;font-size:11.5px}
 .annotation-modal .annotation-options .btn svg{width:17px;height:17px}
 .annotation-modal .annotation-help{font-size:11px;line-height:1.4;padding:3px 12px 7px}
 .annotation-modal .modal-footer{gap:7px;padding:9px 10px calc(9px + env(safe-area-inset-bottom))}
 .annotation-modal .modal-footer .btn{font-size:13px;min-height:48px;padding:8px 6px;gap:6px}
 .annotation-modal .modal-footer .btn svg{width:18px;height:18px}
 .finding-markup-start{flex-direction:column;align-items:stretch;gap:12px;padding:15px}
 .finding-markup-start .btn{width:100%}
}
@media(max-height:540px) and (orientation:landscape){
 .annotation-modal .annotation-toolbar{display:flex;overflow-x:auto;gap:5px;padding:5px 10px}
 .annotation-modal .annotation-tool{flex:0 0 70px;min-height:44px;flex-direction:row;font-size:11px}
 .annotation-modal .annotation-tool svg{width:17px;height:17px}
 .annotation-modal .annotation-help{display:none}
 .annotation-modal .annotation-photo-info{min-height:34px;padding-top:2px;padding-bottom:2px}
 .annotation-modal .annotation-style-options>summary{min-height:34px;padding-top:5px;padding-bottom:5px}
 .annotation-modal .modal-head p{display:none}
}

/* Explicit, per-report sign-off. White paper keeps exported black ink clear. */
.signature-pad{display:grid;gap:9px;min-width:0;width:100%}
.signature-pad-paper{position:relative;min-width:0;max-width:640px;width:100%;margin-inline:auto;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}
.signature-pad-canvas{display:block;width:100%;height:auto;aspect-ratio:5/2;touch-action:none;background:#fff;cursor:crosshair}
.signature-pad-canvas:focus-visible{outline:3px solid var(--lime);outline-offset:-4px}
.signature-pad-hint{pointer-events:none;position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:20px;text-align:center;font-size:14px;line-height:1.5;color:#666;background:transparent}
.signature-pad-hint[hidden]{display:none}
.signature-pad-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;flex-wrap:wrap}
.signature-pad-status{font-size:13px;line-height:1.4;color:var(--muted);flex:1 1 150px}
.signature-pad-clear{min-height:44px;flex:none}
.signature-pad-help{margin:0;font-size:12px;line-height:1.5}

/* v2.5: discoverable settings and narrative details; neither floats over evidence. */
.annotation-modal .annotation-settings-label{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.annotation-modal .annotation-settings-label strong{font-size:14px;font-weight:700;line-height:1.3}
.annotation-modal .annotation-settings-label small{font-size:11.5px;font-weight:400;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
.annotation-modal .annotation-settings-edit{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:4px 9px;border:1px solid var(--line);border-radius:8px;font-size:12px;font-weight:650;flex-shrink:0;color:var(--text);background:var(--surface-2)}
.annotation-modal .annotation-style-options>summary{min-height:56px}
.annotation-modal .annotation-style-options>summary::after{margin-left:0}
.annotation-modal .annotation-text-placement{display:flex;gap:7px;padding:7px 14px;background:var(--surface);flex-shrink:0}
.annotation-modal .annotation-text-placement .btn{min-height:44px;flex:1;min-width:0;font-size:13px;white-space:normal;line-height:1.3}
.annotation-modal .annotation-text-placement .btn.active{background:var(--surface-2);border-color:var(--lime);box-shadow:inset 0 -2px 0 var(--lime);color:var(--text)}
.annotation-modal .annotation-photo-details{position:relative;flex-shrink:0;border-bottom:1px solid var(--line);color:var(--text);background:var(--surface)}
.annotation-modal .annotation-photo-details>summary{display:flex;gap:10px;align-items:center;min-height:56px;padding:8px 16px;cursor:pointer;list-style:none}
.annotation-modal .annotation-photo-details>summary::-webkit-details-marker{display:none}
.annotation-modal .annotation-photo-details>summary::after{content:'⌄';font-size:18px;line-height:1}
.annotation-modal .annotation-photo-details[open]>summary::after{transform:rotate(180deg)}
.annotation-modal .annotation-details-body{padding:3px 16px 12px;max-height:min(440px,48dvh);overflow-y:auto;overscroll-behavior-y:contain}
.annotation-modal .annotation-details-help{font-size:12px;line-height:1.5;color:var(--muted);margin:0 0 12px}
.annotation-modal .annotation-details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;align-items:start}
.annotation-modal .annotation-details-grid .field{min-width:0;gap:6px;margin:0}
.annotation-modal .annotation-details-grid .field>label{font-size:13px;line-height:1.35}
.annotation-modal .annotation-details-grid input,.annotation-modal .annotation-details-grid select,.annotation-modal .annotation-details-grid textarea{display:block;width:100%;max-width:100%;min-width:0;min-height:44px;font-size:16px;padding:10px 12px;line-height:1.4;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:9px;box-sizing:border-box}
.annotation-modal .annotation-details-grid textarea{resize:vertical;min-height:112px;white-space:pre-wrap}
.annotation-modal .annotation-detail-wide{grid-column:1/-1}
.annotation-modal .annotation-detail-choice{display:grid;gap:8px;min-width:0}
.annotation-modal .annotation-details-done{display:flex;gap:12px;justify-content:space-between;align-items:center;margin-top:12px}
.annotation-modal .annotation-details-done small{font-size:11px;line-height:1.4;color:var(--muted)}
.annotation-modal .annotation-details-done .btn{min-height:44px;min-width:72px;border:1px solid var(--line);color:var(--text)}
.annotation-modal.annotation-typing .annotation-text-placement,.annotation-modal.annotation-typing .annotation-photo-details{display:none!important}
.annotation-modal .annotation-text-actions{flex-wrap:wrap}
.annotation-modal .annotation-text-actions .btn{height:auto;min-height:44px;white-space:normal;line-height:1.3}
.annotation-modal .annotation-photo-frame{position:relative;flex:none;max-width:100%;max-height:100%;line-height:0}
.annotation-modal .annotation-photo-frame canvas{display:block;max-width:100%;max-height:100%}
.annotation-modal .annotation-photo-stamp{position:absolute;left:2%;bottom:2%;width:clamp(90px,25%,150px);max-width:45%;display:flex;flex-direction:column;gap:3px;padding:5px 6px;border-radius:3px;background:rgba(0,0,0,.86);color:#fff;pointer-events:none;line-height:1.25;z-index:1;user-select:none}
.annotation-modal .annotation-photo-stamp img{display:block;width:100%;height:auto;max-height:none}
.annotation-modal .annotation-photo-stamp span{display:block;font:8px/1.25 Arial,sans-serif;color:#fff;overflow-wrap:anywhere}
@media(max-width:540px){
 .annotation-modal .annotation-photo-details>summary{padding:8px 12px}
 .annotation-modal .annotation-details-body{padding:3px 12px 12px}
 .annotation-modal .annotation-details-grid{grid-template-columns:minmax(0,1fr);gap:11px}
 .annotation-modal .annotation-text-placement{padding:7px 10px}
 .annotation-modal .annotation-text-actions{display:flex;width:100%;gap:6px}
 .annotation-modal .annotation-text-actions .btn{flex:1;min-width:0;padding:8px 6px}
 .annotation-modal .annotation-settings-label small{font-size:11px}
}
