/* Only the OCR page and component are affected. Shared site files stay unchanged. */
.stranica-instrumenty-ocr .instrument-page { max-width: 1280px; padding: 10px 12px 24px; }
.stranica-instrumenty-ocr .instrument-page__head { max-width: none; display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.stranica-instrumenty-ocr .instrument-page__head h1 { font-size: 24px; line-height: 1.2; margin: 0; order: -1; }
.stranica-instrumenty-ocr .instrument-page__intro { display: none; }
.stranica-instrumenty-ocr .instrument-page__back { margin-left: auto; white-space: nowrap; font-size: 13px; }
@media (min-width: 761px) {
 .stranica-instrumenty-ocr .menublok { display: none; }
 .stranica-instrumenty-ocr .sitehead { padding-block: 8px; margin-bottom: 0; }
}
.instrument-ocr { --ocr-border: #d9d3d3; margin: 0; color: #303033; font-size: 12px; line-height: 1.35; position: relative; }
.instrument-ocr [hidden] { display: none !important; }
.instrument-ocr p { margin: 0; }
.instrument-ocr button,.instrument-ocr input,.instrument-ocr select,.instrument-ocr textarea { font: inherit; }
.instrument-ocr .act { cursor: pointer; min-height: 29px; padding: 4px 9px; max-width: 100%; white-space: nowrap; border-radius: 6px; margin: 0; }
.instrument-ocr .act:disabled { opacity: .48; cursor: default; }
.instrument-ocr :focus-visible,.instrument-ocr .ocr-entry:focus-within { outline: 3px solid #8c1821; outline-offset: 2px; }
.instrument-ocr .ocr-entry { display: flex; align-items: center; justify-content: center; gap: 16px; border: 2px dashed #ad6871; border-radius: 10px; background: #fcf8f7; padding: 30px 20px; cursor: pointer; min-height: 145px; box-sizing: border-box; position: relative; margin-bottom: 10px; }
.instrument-ocr .ocr-entry:hover,.instrument-ocr.ocr-dragover .ocr-entry { background: #f8eeee; border-color: #8c1821; }
.instrument-ocr.ocr-dragover .ocr-entry { outline: 3px solid #8c1821; }
.instrument-ocr .ocr-upload-icon { font-size: 36px; color: #8c1821; }
.instrument-ocr .ocr-upload-copy { min-width: 0; display: grid; gap: 4px; }
.instrument-ocr .ocr-upload-copy strong { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.instrument-ocr .ocr-upload-copy > span { color: #625c60; }
.instrument-ocr .ocr-pick { padding: 10px 16px; border-radius: 6px; background: #8c1821; color: white; font-weight: 600; white-space: nowrap; }
.instrument-ocr .ocr-file-native { position: absolute; width: 1px !important; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.instrument-ocr .ocr-controls { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; margin: 0; }
.instrument-ocr .ocr-field { display: grid; gap: 4px; min-width: 0; font-size: 12px; color: #5e585c; }
.instrument-ocr .zpole { display: block; min-width: 0; }
.instrument-ocr .zpole input,.instrument-ocr .zpole select { width: 100%; box-sizing: border-box; background: white; color: #303033; border: 1px solid var(--ocr-border); border-radius: 5px; padding: 5px 7px; min-height: 30px; font-size: 12px; }
.instrument-ocr .ocr-controls > .ocr-field { flex: 1 1 170px; }
.instrument-ocr .ocr-controls > .ocr-field:has([data-ocr-preview-page]) { flex: 1.25 1 220px; }
.instrument-ocr .ocr-controls > .ocr-field:has([data-ocr-pages]) { flex: 0 0 95px; }
.instrument-ocr .ocr-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0; }
.instrument-ocr .ocr-run-actions { margin-left: 0; flex: 0 0 auto; }
.instrument-ocr .ocr-feedback { min-height: 26px; padding-block: 5px; box-sizing: border-box; font-size: 11px; }
.instrument-ocr progress { width: 100%; height: 5px; display: block; margin-top: 4px; }
.instrument-ocr .ocr-note { color: #676166; font-size: 12px; }
.instrument-ocr .ocr-workspace { display: grid; grid-template-columns: 155px minmax(0,1fr) minmax(0,1fr); grid-template-rows: minmax(0,1fr) auto; gap: 6px 10px; min-height: 0; }
.instrument-ocr .ocr-source,.instrument-ocr .ocr-output { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 6px; position: relative; }
.instrument-ocr .ocr-source { grid-column: 2; grid-row: 1; }
.instrument-ocr .ocr-output { grid-column: 3; grid-row: 1; }
.instrument-ocr .ocr-source > strong,.instrument-ocr .ocr-output > strong { font-size: 12px; }
.instrument-ocr .ocr-canvas-wrap { flex: 1; overflow: auto; min-height: 0; border: 1px solid var(--ocr-border); border-radius: 6px; background: #f1eeee; padding: 8px; position: relative; box-sizing: border-box; }
.instrument-ocr canvas { display: block; height: auto; margin: auto; background: white; box-shadow: 0 1px 6px #35282422; }
.instrument-ocr .ocr-image-tools { grid-column: 1; grid-row: 1 / 3; min-height: 0; overflow: auto; padding: 8px; border: 1px solid var(--ocr-border); border-radius: 6px; background: #faf7f6; }
.instrument-ocr .ocr-image-tools > strong { display: block; font-size: 12px; margin-bottom: 7px; }
.instrument-ocr .ocr-image-tools .ocr-actions { display: grid; gap: 4px; }
.instrument-ocr .ocr-image-tools .ocr-note { font-size: 10px; margin-block: 7px; }
.instrument-ocr .ocr-image-tools .zgalka { font-size: 11px; line-height: 1.3; }
.instrument-ocr .ocr-image-tools .ocr-field { margin-top: 7px; font-size: 11px; }
.instrument-ocr .ocr-zoom-tools { min-height: 28px; flex-wrap: wrap; }
.instrument-ocr .ocr-zoom-tools .act { min-height: 28px; padding: 3px 7px; }
.instrument-ocr .ocr-zoom-tools output { margin-left: auto; font-size: 10px; color: #70666b; }
.instrument-ocr .ocr-image-tools .act { padding: 4px 5px; min-height: 27px; text-align: left; font-size: 11px; }
.instrument-ocr .ocr-image-tools output { font-size: 11px; color: #70666b; }
.instrument-ocr summary { cursor: pointer; font-size: 12px; color: #8c1821; }
.instrument-ocr [data-ocr-prep] > label:not(.ocr-field):not(.zgalka) { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px; margin-block: 9px; font-size: 11px; }
.instrument-ocr [data-ocr-prep] input[type=range] { grid-column: 1 / -1; grid-row: 2; height: 13px; margin: 0; }
.instrument-ocr input[type=range] { width: 100%; min-width: 0; }
.instrument-ocr .ocr-cropping { cursor: crosshair; touch-action: none; }
.instrument-ocr .ocr-crop-box { position: absolute; pointer-events: none; border: 2px solid #8c1821; background: #8c182120; box-sizing: border-box; }
.instrument-ocr .ocr-editor-tools { flex: 0 0 auto; }
.instrument-ocr .ocr-editor-tools .act { min-height: 28px; padding: 3px 9px; }
.instrument-ocr [aria-pressed=true] { background: #f8e8e9; border-color: #8c1821; }
.instrument-ocr .ocr-editor-body { flex: 1; min-height: 0; display: flex; }
.instrument-ocr .ocr-text-label { display: flex; flex-direction: column; width: 100%; font-size: 0; gap: 0; }
.instrument-ocr .ocr-text-label > .zpole { flex: 1; min-height: 0; display: flex; }
.instrument-ocr .ocr-text-label textarea { width: 100%; height: 100%; min-height: 0; resize: none; box-sizing: border-box; font-size: 14px; line-height: 1.5; padding: 12px; border: 1px solid var(--ocr-border); border-radius: 6px; background: white; color: #303033; }
.instrument-ocr .ocr-text-label textarea:disabled { background: #fafbfc; }
.instrument-ocr .ocr-rich { width: 100%; min-height: 0; overflow: auto; box-sizing: border-box; padding: 12px; border: 1px solid var(--ocr-border); border-radius: 6px; background: white; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.instrument-ocr .ocr-rich p { margin: 0 0 .55em; }
.instrument-ocr .ocr-rich table { border-collapse: collapse; width: 100%; margin: .7rem 0; }
.instrument-ocr .ocr-rich td,.instrument-ocr .ocr-rich th { border: 1px solid #b9adae; padding: 6px; vertical-align: top; min-width: 2rem; }
.instrument-ocr .ocr-formatbar { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.instrument-ocr .ocr-formatbar button { min-width: 26px; min-height: 27px; font-size: 11px; background: #faf7f6; border: 1px solid var(--ocr-border); border-radius: 4px; cursor: pointer; padding: 3px 6px; }
.instrument-ocr .ocr-edit-options { grid-column: 2 / 4; min-width: 0; display: grid; gap: 5px; padding-top: 2px; }
.instrument-ocr .ocr-tools-caption { font-size: 11px; flex: 0 0 105px; }
.instrument-ocr .ocr-find { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; margin: 0; }
.instrument-ocr .ocr-find .act { min-height: 27px; font-size: 11px; padding: 3px 7px; }
.instrument-ocr .ocr-find input { flex: 1 1 120px; min-width: 0; width: 120px; padding: 5px; font-size: 11px; border: 1px solid var(--ocr-border); border-radius: 4px; }
.instrument-ocr .ocr-review { display: flex; align-items: center; gap: 5px; min-width: 0; }
.instrument-ocr [data-ocr-review-hint] { font-size: 10px; flex: 0 0 auto; }
.instrument-ocr .ocr-review-list { display: flex; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow: auto; max-height: 32px; }
.instrument-ocr [data-ocr-page-status] { font-size: 10px; }
.instrument-ocr .ocr-review-token { font: inherit; font-size: 10px; white-space: nowrap; padding: 3px 5px; border: 1px solid var(--ocr-border); border-radius: 4px; background: #faf7f6; cursor: pointer; }
.instrument-ocr .ocr-save { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding-top: 7px; }
.instrument-ocr .ocr-save > .ocr-note { grid-column: 1; }
.instrument-ocr .ocr-window-bar { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: start; }
.instrument-ocr .ocr-bottom { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 10px 20px; padding-top: 5px; }
.instrument-ocr .ocr-lead-details:not([open]) { text-align:right; }
.instrument-ocr .ocr-bottom details[open] { grid-column:1 / -1; position:static; padding:12px; background:#faf7f6; border:1px solid var(--ocr-border); border-radius:8px; }
.instrument-ocr .ocr-bottom details[open] summary { margin-bottom: 8px; }
.instrument-ocr .ocr-help p { margin-block: 8px; }
.instrument-ocr .zgalka { display: flex; align-items: center; gap: 6px; margin-block: 8px; }
.instrument-ocr .ocr-file-info { color: #676166; font-size: 12px; }
.instrument-ocr:not(.ocr-has-file) .ocr-save,.instrument-ocr:not(.ocr-has-file) .ocr-lead-details { display: none; }
.instrument-ocr.ocr-has-file { height: calc(100dvh - 155px - var(--tools-bottom-space,16px)); min-height: 480px; display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto auto; }
.instrument-ocr.ocr-has-file .ocr-entry { min-height: 0; margin: 0 0 8px; padding: 6px 10px; justify-content: start; gap: 10px; }
.instrument-ocr.ocr-has-file .ocr-entry strong { font-size: 12px; }
.instrument-ocr.ocr-has-file .ocr-pick { margin-left: auto; padding: 6px 10px; font-size: 11px; }
.instrument-ocr.ocr-has-file .ocr-upload-icon { font-size: 25px; }
.instrument-ocr.ocr-expanded { position: fixed; z-index: 2147483600; inset: 10px; padding: 12px; margin: 0; background: white; border: 1px solid var(--ocr-border); border-radius: 8px; box-shadow: 0 0 0 100vmax #30252799; height: auto; min-height: 0; max-width: none; }
@media (min-width: 761px) and (max-height: 820px) {
 .instrument-ocr .ocr-image-tools { padding: 6px; }
 .instrument-ocr .ocr-image-tools > strong { margin-bottom: 4px; font-size: 11px; }
 .instrument-ocr .ocr-image-tools .ocr-actions { gap: 3px; }
 .instrument-ocr .ocr-image-tools .act { min-height: 23px; padding: 2px 4px; font-size: 10.5px; }
 .instrument-ocr [data-ocr-prep] > label:not(.ocr-field):not(.zgalka) { margin-block: 4px; gap: 2px; font-size: 10px; }
 .instrument-ocr .ocr-image-tools .zgalka { margin-block: 4px; font-size: 10px; line-height: 1.15; }
 .instrument-ocr .ocr-image-tools .ocr-note { margin-block: 4px; font-size: 10px; }
 .instrument-ocr .ocr-image-tools .ocr-field { margin-top: 4px; font-size: 10px; }
 .instrument-ocr .ocr-image-tools .zpole select { min-height: 26px; padding: 3px 5px; font-size: 11px; }
}
.instrument-ocr .ocr-mobile-options { display:block; min-height:0; min-width:0; }
.instrument-ocr .ocr-image-options { grid-column:1; grid-row:1 / 3; overflow:hidden; }
.instrument-ocr .ocr-image-options > .ocr-image-tools { height:100%; box-sizing:border-box; }
.instrument-ocr .ocr-editing-options { grid-column:2 / 4; grid-row:2; }
.instrument-ocr .ocr-mobile-options > summary,.instrument-ocr .ocr-mobile-tabs { display: none; }
@media (max-width: 760px), (max-width: 980px) and (max-height: 500px) {
 .stranica-instrumenty-ocr .instrument-page__head h1 { font-size: 20px; }
 .stranica-instrumenty-ocr .instrument-page__back { display: none; }
 .instrument-ocr.ocr-has-file { height: auto; min-height: 0; display: block; }
 .instrument-ocr .ocr-entry { flex-wrap: wrap; padding: 18px 10px; gap: 10px; }
 .instrument-ocr .ocr-upload-copy { flex: 1; }
 .instrument-ocr .ocr-upload-copy strong { font-size: 17px; white-space: normal; }
 .instrument-ocr.ocr-has-file .ocr-entry strong { overflow-wrap: anywhere; }
 .instrument-ocr .ocr-controls > .ocr-field { flex: 1 1 140px; }
 .instrument-ocr .ocr-run-actions { margin: 0; width: 100%; }
 .instrument-ocr .ocr-run-actions .act { min-height: 40px; }
 .instrument-ocr .ocr-workspace { display: flex; flex-direction: column; }
 .instrument-ocr .ocr-image-tools { order: 0; }
 .instrument-ocr .ocr-image-tools [data-ocr-prep] { display: grid; grid-template-columns: 1fr; gap: 5px 12px; }
 .instrument-ocr .ocr-source { order: 1; }
 .instrument-ocr .ocr-output { order: 2; }
 .instrument-ocr .ocr-edit-options { order: 3; }
 .instrument-ocr .ocr-find { flex-wrap: wrap; }
 .instrument-ocr .ocr-tools-caption { flex-basis: 100%; }
 .instrument-ocr .ocr-review { flex-wrap: wrap; }
 .instrument-ocr .ocr-review-list { flex: 1; }
 .instrument-ocr .ocr-canvas-wrap { height: 270px; flex: none; }
 .instrument-ocr .ocr-editor-body { height: 320px; flex: none; }
 .instrument-ocr .ocr-save { display: flex; flex-direction: column; }
 .instrument-ocr .ocr-window-bar { margin-top: 4px; }
 .instrument-ocr .ocr-bottom { margin-top: 5px; }
 .instrument-ocr.ocr-expanded { inset: 0; overflow: auto; height: auto; border-radius: 0; padding: 10px; }
 .instrument-ocr { font-size:14px; line-height:1.4; }
 .stranica-instrumenty-ocr .instrument-page { padding-inline:0; }
 .instrument-ocr .act,.instrument-ocr button,.instrument-ocr summary { min-height:44px; min-width:44px; font:inherit; font-size:14px; line-height:1.3; white-space:normal; overflow-wrap:anywhere; box-sizing:border-box; }
 .instrument-ocr .act { padding:8px 10px; }
 .instrument-ocr .ocr-run-actions .act,.instrument-ocr .ocr-zoom-tools .act,.instrument-ocr .ocr-editor-tools .act { min-height:44px; }
 .instrument-ocr input:not([type=checkbox]),.instrument-ocr select,.instrument-ocr textarea,.instrument-ocr .ocr-rich { font-size:16px; line-height:1.4; min-width:0; }
 .instrument-ocr .ocr-text-label textarea { font-size:16px; line-height:1.4; }
 .instrument-ocr .zpole input,.instrument-ocr .zpole select { min-height:44px; padding:8px; font-size:16px; }
 .instrument-ocr :is(.ocr-field,.ocr-note,.ocr-file-info,.ocr-upload-copy span,.ocr-tools-caption,.ocr-review-hint,[data-ocr-page-status]) { font-size:14px; line-height:1.4; }
 .instrument-ocr .ocr-controls { display:grid; grid-template-columns:minmax(0,1fr); gap:6px 8px; }
 .instrument-ocr .ocr-controls > label:first-child,.instrument-ocr .ocr-run-actions { grid-column:1 / -1; }
 .instrument-ocr:not(.ocr-has-file) .ocr-controls > label:not(:first-child),.instrument-ocr:not(.ocr-has-file) .ocr-run-actions { display:none; }
 .instrument-ocr .ocr-field { gap:3px; }
 .instrument-ocr .ocr-run-actions { display:flex; flex-wrap:wrap; gap:6px; }
 .instrument-ocr .ocr-run-actions .act { flex:1 1 10em; overflow-wrap:normal; word-break:normal; }
 .instrument-ocr .ocr-run-actions [data-ocr-run] { font-weight:650; }
 .instrument-ocr .ocr-feedback { font-size:14px; line-height:1.4; margin-block:6px; }
 .instrument-ocr .ocr-entry { min-height:100px; padding:12px; margin-bottom:8px; }
 .instrument-ocr .ocr-upload-icon { display:none; }
 .instrument-ocr .ocr-pick,.instrument-ocr.ocr-has-file .ocr-pick { display:flex; align-items:center; justify-content:center; min-height:44px; box-sizing:border-box; font-size:14px; padding:8px 10px; }
 .instrument-ocr.ocr-has-file .ocr-entry { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; padding:6px; }
 .instrument-ocr.ocr-has-file .ocr-entry strong { font-size:14px; line-height:1.3; }
 .instrument-ocr.ocr-has-file .ocr-entry .ocr-file-info { margin:2px 0 0; }
 .instrument-ocr .ocr-upload-copy { min-width:0; }
 .instrument-ocr .ocr-workspace { gap:6px; }
 .instrument-ocr .ocr-mobile-tabs { display:flex; gap:6px; order:1; }
 .instrument-ocr .ocr-mobile-tabs button { flex:1; }
 .instrument-ocr .ocr-mobile-tabs [aria-pressed=true] { background:#f8e8e9; border-color:#8c1821; color:#75121a; font-weight:650; }
 .instrument-ocr .ocr-mobile-options { display:block; min-width:0; }
 .instrument-ocr .ocr-mobile-options > summary { display:list-item; padding:11px 7px; border:1px solid var(--ocr-border); border-radius:6px; cursor:pointer; }
 .instrument-ocr .ocr-mobile-options:not([open]) > :not(summary) { display:none; }
 .instrument-ocr .ocr-image-options { order:0; }
 .instrument-ocr .ocr-editing-options { order:4; }
 .instrument-ocr:not(.ocr-has-text) .ocr-editing-options { display:none; }
 .instrument-ocr .ocr-source,.instrument-ocr .ocr-output { order:2; min-width:0; }
 .instrument-ocr[data-mobile-pane=source] .ocr-output,.instrument-ocr[data-mobile-pane=output] .ocr-source { display:none; }
 .instrument-ocr[data-mobile-pane=output] .ocr-image-options { display:none; }
 .instrument-ocr .ocr-source > strong,.instrument-ocr .ocr-output > strong { font-size:14px; }
 .instrument-ocr .ocr-canvas-wrap,.instrument-ocr .ocr-editor-body { height:220px; min-height:0; }
 .instrument-ocr .ocr-zoom-tools { flex-wrap:wrap; }
 .instrument-ocr .ocr-zoom-tools output { font-size:14px; }
 .instrument-ocr .ocr-image-tools .act { min-height:44px; font-size:14px; }
 .instrument-ocr [data-ocr-prep] > label:not(.ocr-field):not(.zgalka) { font-size:14px; }
 .instrument-ocr [data-ocr-prep] input[type=range] { height:44px; }
 .instrument-ocr .zgalka { min-height:44px; font-size:14px; }
 .instrument-ocr .ocr-find { display:grid; grid-template-columns:1fr; gap:6px; }
 .instrument-ocr .ocr-find input { min-height:44px; width:100%; box-sizing:border-box; }
 .instrument-ocr .ocr-review-list { max-height:100px; overflow:auto; }
 .instrument-ocr .ocr-review-token { min-height:44px; font-size:14px; }
 .instrument-ocr .ocr-formatbar { flex-wrap:wrap; }
 .instrument-ocr:not(.ocr-has-text) .ocr-save { display:none; }
 .instrument-ocr .ocr-save > .ocr-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:6px; }
 .instrument-ocr .ocr-save [data-ocr-docx] { order:0; }
 .instrument-ocr .ocr-save [data-ocr-download] { order:2; }
 .instrument-ocr .ocr-save [data-ocr-copy] { order:1; }
 .instrument-ocr .ocr-save [data-ocr-html] { order:3; }
 .instrument-ocr .ocr-save [data-ocr-md] { order:4; }
 .instrument-ocr .ocr-lead-details:not([open]) { text-align:left; }
 .instrument-ocr .ocr-window-bar { display:none; }
 .instrument-ocr .ocr-bottom { display:block; }
 .instrument-ocr .ocr-bottom summary { padding:11px 0; }
 .instrument-ocr .ocr-bottom details[open] { position:static; max-height:none; overflow:visible; padding:0; box-shadow:none; border:0; }
 .instrument-ocr .instrument-page__body { margin-top:16px; }
}
@media(max-width:360px){
 .instrument-ocr .ocr-canvas-wrap,.instrument-ocr .ocr-editor-body { height:180px; }
}

/* Entry page: public explanation and file choice. Workspace keeps its compact layout. */
.instrument-ocr .ocr-upload-icon svg { display:block; width:32px; height:36px; }
.instrument-ocr.ocr-has-file :is(.ocr-welcome,.ocr-start-preview,.ocr-start-privacy,.ocr-start-steps,.ocr-start-quality) { display:none; }
.stranica-instrumenty-ocr .instrument-page:has(.instrument-ocr:not(.ocr-has-file)) { padding-top:22px; }
.stranica-instrumenty-ocr .instrument-page:has(.instrument-ocr:not(.ocr-has-file)) .instrument-page__head { margin-bottom:12px; }
.stranica-instrumenty-ocr .instrument-page:has(.instrument-ocr:not(.ocr-has-file)) .instrument-page__head h1 { font-size:clamp(24px,2.8vw,36px); letter-spacing:-.035em; line-height:1.18; }
.instrument-ocr:not(.ocr-has-file) { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); column-gap:28px; font-size:14px; line-height:1.5; color:#292c30; }
.instrument-ocr .ocr-welcome { grid-column:1 / -1; grid-row:1; margin-bottom:16px; }
.instrument-ocr .ocr-welcome-description { font-size:16px; color:#50565e; max-width:880px; }
.instrument-ocr .ocr-benefits { list-style:none; display:flex; flex-wrap:wrap; gap:8px 22px; margin:12px 0 0; padding:0; font-size:13px; color:#6a2831; }
.instrument-ocr .ocr-benefits li::before { content:'✓'; margin-right:7px; font-weight:700; }
.instrument-ocr:not(.ocr-has-file) .ocr-entry { grid-column:1; grid-row:2; flex-direction:column; gap:10px; padding:18px; margin:0; min-height:205px; text-align:center; border:1.5px dashed #ad6871; background:#fcf8f7; border-radius:12px; }
.instrument-ocr:not(.ocr-has-file) .ocr-entry:hover,.instrument-ocr:not(.ocr-has-file).ocr-dragover .ocr-entry { background:#f8eeee; border-color:#8c1821; }
.instrument-ocr:not(.ocr-has-file) .ocr-upload-icon { display:block; color:#941c2a; }
.instrument-ocr:not(.ocr-has-file) .ocr-upload-copy strong { font-size:21px; letter-spacing:-.025em; white-space:normal; color:#28282a; }
.instrument-ocr:not(.ocr-has-file) .ocr-upload-copy > span { color:#65606a; font-size:13px; }
.instrument-ocr:not(.ocr-has-file) .ocr-pick { display:flex; align-items:center; justify-content:center; min-height:44px; padding:10px 30px; background:#8c1821; border-radius:7px; font-size:14px; }
.instrument-ocr:not(.ocr-has-file) .ocr-entry:hover .ocr-pick { background:#75121a; }
.instrument-ocr:not(.ocr-has-file) .ocr-controls { grid-column:1; grid-row:3; margin-top:12px; }
.instrument-ocr:not(.ocr-has-file) .ocr-controls > :not(.ocr-field:has([data-ocr-language])) { display:none; }
.instrument-ocr:not(.ocr-has-file) .ocr-controls .ocr-field:has([data-ocr-language]) { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px; flex:1; font-size:13px; color:#4d5055; }
.instrument-ocr:not(.ocr-has-file) .ocr-controls select { min-height:40px; font-size:14px; border-color:#d9d4d3; }
.instrument-ocr:not(.ocr-has-file) .ocr-feedback { grid-column:1; grid-row:4; font-size:12px; padding-block:6px; color:#5c5f65; }
.instrument-ocr .ocr-start-preview { grid-column:2; grid-row:2 / 5; border:1px solid #e6e1df; border-radius:12px; padding:19px 20px 16px; background:#f5f3f1; overflow:hidden; }
.instrument-ocr .ocr-preview-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:14px; }
.instrument-ocr .ocr-preview-heading > span { font-size:11px; color:#756a67; }
.instrument-ocr .ocr-preview-papers { display:flex; align-items:center; justify-content:center; gap:9px; margin:18px 0; }
.instrument-ocr .ocr-paper { min-width:0; flex:1; min-height:176px; max-width:210px; padding:16px 13px; border:1px solid #e2ddda; background:#fff; border-radius:3px; box-shadow:0 5px 12px #35282409; }
.instrument-ocr .ocr-paper-source { transform:rotate(-3deg); background:#faf9f6; color:#696563; }
.instrument-ocr .ocr-paper-label { display:block; font-size:8px; letter-spacing:.06em; white-space:nowrap; color:#7b7472; margin-bottom:14px; }
.instrument-ocr .ocr-paper strong { font-size:15px; display:block; margin-bottom:8px; }
.instrument-ocr .ocr-paper p { font-size:10px; line-height:1.6; }
.instrument-ocr .ocr-paper-source p { font-family:Georgia,serif; }
.instrument-ocr .ocr-paper i { display:block; margin-top:7px; height:3px; background:#e5e1dc; width:90%; }
.instrument-ocr .ocr-paper i:last-child { width:55%; }
.instrument-ocr .ocr-paper-arrow { color:#991c2a; font-size:22px; }
.instrument-ocr .ocr-paper-selection { display:inline-block; background:#f8e8e9; color:#831523; font-size:9px; margin-top:10px; padding:2px 4px; }
.instrument-ocr .ocr-paper-format { display:block; font-size:9px; color:#776c6b; margin-top:12px; }
.instrument-ocr .ocr-preview-description { font-size:12px; line-height:1.55; color:#625e5c; }
.instrument-ocr .ocr-start-privacy { grid-column:1 / -1; grid-row:5; display:flex; gap:10px; align-items:center; margin:12px 0 16px; }
.instrument-ocr .ocr-start-privacy svg { width:23px; height:25px; flex:none; color:#8c1821; }
.instrument-ocr .ocr-start-privacy strong { display:block; font-size:13px; font-weight:600; }
.instrument-ocr .ocr-start-privacy span { display:block; color:#62646a; font-size:12px; margin-top:2px; }
.instrument-ocr .ocr-start-steps { grid-column:1 / -1; grid-row:6; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:25px; list-style:none; padding:14px 0; margin:0; border-top:1px solid #e7e2e0; border-bottom:1px solid #e7e2e0; }
.instrument-ocr .ocr-start-steps li { display:flex; align-items:flex-start; gap:12px; }
.instrument-ocr .ocr-start-steps li > span { font-size:25px; line-height:1.1; color:#981d2a; font-weight:500; }
.instrument-ocr .ocr-start-steps strong { font-size:14px; }
.instrument-ocr .ocr-start-steps p { font-size:12px; line-height:1.6; color:#65646a; margin-top:5px; }
.instrument-ocr .ocr-start-quality { grid-column:1 / -1; grid-row:7; display:flex; gap:20px; padding:16px 0 6px; font-size:12px; line-height:1.6; }
.instrument-ocr .ocr-start-quality strong { flex:0 0 205px; font-weight:600; }
.instrument-ocr .ocr-start-quality p { color:#65646a; }
.instrument-ocr:not(.ocr-has-file) .ocr-bottom { grid-column:1 / -1; grid-row:8; padding-top:4px; }
.instrument-ocr:not(.ocr-has-file) .ocr-bottom details[open] { position:static; padding:0; border:0; box-shadow:none; max-height:none; }
.instrument-ocr:not(.ocr-has-file) .ocr-bottom summary { color:#852331; font-size:12px; cursor:pointer; }
@media(max-width:760px),(max-width:980px) and (max-height:500px){
 .stranica-instrumenty-ocr .instrument-page:has(.instrument-ocr:not(.ocr-has-file)) { padding-top:12px; }
 .stranica-instrumenty-ocr .instrument-page:has(.instrument-ocr:not(.ocr-has-file)) .instrument-page__head h1 { font-size:26px; }
 .instrument-ocr:not(.ocr-has-file) { display:flex; flex-direction:column; }
 .instrument-ocr .ocr-welcome { order:0; margin-bottom:16px; }
 .instrument-ocr .ocr-welcome-description { font-size:14px; }
 .instrument-ocr .ocr-benefits { font-size:12px; gap:5px 12px; margin-top:10px; }
 .instrument-ocr:not(.ocr-has-file) .ocr-entry { order:1; min-height:166px; padding:16px 12px; }
 .instrument-ocr:not(.ocr-has-file) .ocr-upload-icon { display:none; }
 .instrument-ocr:not(.ocr-has-file) .ocr-upload-copy strong { font-size:20px; }
 .instrument-ocr:not(.ocr-has-file) .ocr-controls { order:2; }
 .instrument-ocr:not(.ocr-has-file) .ocr-controls select { font-size:16px; min-height:44px; }
 .instrument-ocr:not(.ocr-has-file) .ocr-controls .ocr-field:has([data-ocr-language]) { grid-template-columns:1fr; gap:4px; }
 .instrument-ocr:not(.ocr-has-file) .ocr-feedback { order:3; font-size:12px; }
 .instrument-ocr .ocr-start-privacy { order:4; margin:10px 0 20px; align-items:flex-start; }
 .instrument-ocr .ocr-start-preview { order:5; padding:16px; }
 .instrument-ocr .ocr-start-steps { order:6; grid-template-columns:1fr; gap:16px; margin-top:20px; }
 .instrument-ocr .ocr-start-steps p { font-size:14px; }
 .instrument-ocr .ocr-start-quality { order:7; display:block; font-size:13px; }
 .instrument-ocr .ocr-start-quality p { margin-top:5px; }
 .instrument-ocr:not(.ocr-has-file) .ocr-bottom { order:8; }
 .instrument-ocr:not(.ocr-has-file) .ocr-bottom summary { font-size:14px; }
}

/* Brand accents also apply to native controls and the expanded workspace. */
.instrument-ocr { accent-color:#8c1821; }
.instrument-ocr :is(a,summary) { color:#8c1821; }
.instrument-ocr :is(input,select,textarea,button) { accent-color:#8c1821; }
.instrument-ocr .act.main { background:#8c1821; border-color:#8c1821; color:#fff; }
.instrument-ocr .act.main:hover:not(:disabled) { background:#75121a; border-color:#75121a; }
.instrument-ocr .act.sec { color:#4b3036; border:1px solid #cbbfc1; background:#fff; }
.instrument-ocr .act.sec:hover:not(:disabled) { background:#fcf2f2; border-color:#a65c66; }
.instrument-ocr .act.sec[aria-pressed=true] { color:#75121a; background:#f8e8e9; border-color:#8c1821; }
.instrument-ocr ::selection { background:#f3d6da; color:#35151c; }
.instrument-ocr progress::-webkit-progress-value { background:#8c1821; }
.instrument-ocr progress::-moz-progress-bar { background:#8c1821; }
.stranica-instrumenty-ocr .instrument-page__back { color:#8c1821; }
.instrument-ocr.ocr-expanded { overflow:auto; }
@media(min-width:761px) and (min-height:501px) {
 .instrument-ocr.ocr-has-file:has(.ocr-bottom details[open]) { height:auto; grid-template-rows:auto auto auto minmax(300px,calc(100dvh - 360px - var(--tools-bottom-space,16px))) auto auto; }
 .instrument-ocr.ocr-expanded:has(.ocr-bottom details[open]) { grid-template-rows:auto auto auto minmax(300px,calc(100dvh - 245px)) auto auto; }
}

/* Правки Павла 17.11.2026. Кегли интерфейса - три размера: 12 - подписи полей, выпадающие списки, мелкие кнопки панелей,
   подсказки, строка статуса и названия областей; 14 - кнопки действий (page.css); 16 - вводный текст стартового экрана
   и строка преимуществ. Текст документа в поле правки (14) - содержимое, не интерфейс. */
.instrument-ocr .ocr-benefits { font-size:16px; }
.instrument-ocr .ocr-help p { font-size:12px; line-height:1.5; }
.instrument-ocr.instrument-ocr :is(.ocr-field, .ocr-note, [data-ocr-status], .ocr-tools-caption, .ocr-image-tools label,
  .ocr-image-tools output, .ocr-image-tools strong, .ocr-source > strong, .ocr-output > strong, [data-ocr-zoom-label],
  .ocr-review-token, .ocr-find input, .zpole select, .zpole input:not([type=file]), .ocr-image-tools .act, .ocr-zoom-tools .act,
  .ocr-editor-tools .act, .ocr-find .act, .ocr-formatbar button, .ocr-file-info, .ocr-start-quality p,
  [data-ocr-file-caption]) { font-size:12px; }
.instrument-ocr.ocr-status-oshibka [data-ocr-status] { color:#8c1821; font-weight:600; }
/* «Отправить документ на перевод» - красная кнопка последней в ряду выгрузок (второй круг 17.11); панель заявки
   открывается этой кнопкой и стоит над «Как пользоваться и ограничения». */
.instrument-ocr .ocr-save [data-ocr-lead-open] { order:99; }
.instrument-ocr .ocr-lead-details > summary { display:none; }
.instrument-ocr .ocr-lead-details:not([open]) { display:none; }
/* Второй круг 17.11 (Word «было - стало», строки 1, 22, 102, 123): ровная раскладка. */
/* Старт: язык текста над полем «Перетащите файл сюда», подпись красная и того же размера, что строка преимуществ;
   строка «Выберите файл для распознавания» до загрузки не показывается (ошибка - показывается). */
.instrument-ocr:not(.ocr-has-file) .ocr-controls { grid-row:2; margin:0 0 12px; }
.instrument-ocr:not(.ocr-has-file) .ocr-entry { grid-row:3; }
.instrument-ocr:not(.ocr-has-file) .ocr-controls .ocr-field:has([data-ocr-language]) { font-size:16px; color:#6a2831; }
.instrument-ocr.instrument-ocr:not(.ocr-has-file) .ocr-controls :is(.ocr-field, select) { font-size:16px; }
.instrument-ocr:not(.ocr-has-file):not(.ocr-status-oshibka) [data-ocr-status] { display:none; }
/* Панель «Как пользоваться и ограничения» - один цвет текста. */
.instrument-ocr .ocr-help :is(p, .ocr-note) { color:#3d4247; }
/* Рабочее окно: подписи «Язык текста», «Что распознать», «Смотреть страницу» над полями высотой 40, кнопки
   «Распознать» и «Убрать файл» на одной линии с полями; «Заменить файл» той же высоты. */
.instrument-ocr.ocr-has-file .ocr-controls { align-items:end; }
.instrument-ocr.ocr-has-file .ocr-controls .zpole :is(select, input:not([type=file])) { height:40px; min-height:40px; box-sizing:border-box; }
.instrument-ocr.ocr-has-file .ocr-run-actions { align-self:end; align-items:end; }
/* Оригинал и распознанный текст начинаются на одном уровне: подпись «Текст этой страницы» над полем скрыта
   (остается для чтения с экрана). */
.instrument-ocr .ocr-text-label > :not(.zpole) { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.instrument-ocr.instrument-ocr.instrument-ocr label.ocr-text-label.ocr-text-label { font-size:0; line-height:0; }
/* «Сверить числа»: фрагменты переносятся на следующую строку, без прокрутки вбок и обрезанных плашек. */
.instrument-ocr .ocr-review-list { flex-wrap:wrap; overflow-x:hidden; overflow-y:auto; max-height:56px; }
/* Снимок Павла 17.11 (выделил «Как пользоваться и ограничения»): не мелкая ссылка, а кнопка - как «Развернуть
   инструмент»; «Сверить числа» - ровно две строки фрагментов, третья не срезается, остальное прокруткой. */
.instrument-ocr .ocr-help > summary { display:inline-flex; align-items:center; height:40px; padding:0 16px; box-sizing:border-box;
  border:1px solid #d9dbde; border-radius:999px; background:#fff; color:#1b1b1b; font-size:14px; font-weight:600;
  list-style:none; cursor:pointer; transition:background-color .18s ease; }
.instrument-ocr .ocr-help > summary::-webkit-details-marker { display:none; }
.instrument-ocr .ocr-help > summary::marker { content:""; }
@media (hover:hover) and (pointer:fine) { .instrument-ocr .ocr-help > summary:hover { background:#f5f6f7; } }
.instrument-ocr .ocr-bottom .ocr-help[open] > summary { margin-bottom:10px; }
.instrument-ocr.instrument-ocr:not(.ocr-has-file) .ocr-bottom summary { font-size:14px; color:#1b1b1b; }
/* Третий круг 17.11: вкладок «Текст / Оформление» нет, на их месте - панель кнопок оформления, видна всегда. */
.instrument-ocr .ocr-editor-tools > .ocr-actions:has([data-ocr-plain-tab]) { display:none; }
.instrument-ocr .ocr-editor-tools .ocr-formatbar { display:flex; flex-wrap:nowrap; align-items:center; gap:2px; margin:0; }
.instrument-ocr .ocr-editor-tools .ocr-formatbar[hidden] { display:flex; visibility:hidden; }
.instrument-ocr .ocr-editor-tools .ocr-formatbar button { height:28px; padding:0 4px; white-space:nowrap; }
/* Кнопки оформления «А»: вид буквы = само оформление. */
.instrument-ocr .ocr-formatbar [data-ocr-command=bold] { font-weight:800; }
.instrument-ocr .ocr-formatbar [data-ocr-command=italic] { font-style:italic; font-family:Georgia, serif; }
.instrument-ocr .ocr-formatbar [data-ocr-command=underline] { text-decoration:underline; }
.instrument-ocr .ocr-formatbar [data-ocr-command=strikeThrough] { text-decoration:line-through; }
.instrument-ocr .ocr-formatbar [data-ocr-command] { min-width:26px; }
/* Четвертый круг 17.11: кнопки оформления - квадраты 28 x 28, знак по центру; «Без стиля» - отступы 8 слева и справа.
   Кегль прежний (12). */
.instrument-ocr.instrument-ocr .ocr-formatbar [data-ocr-command] { display:inline-flex; align-items:center;
  justify-content:center; box-sizing:border-box; width:28px; min-width:28px; height:28px; padding:0; }
.instrument-ocr.instrument-ocr .ocr-formatbar [data-ocr-command=removeFormat] { width:auto; padding:0 8px; }
.instrument-ocr .ocr-formatbar svg { display:block; pointer-events:none; }
/* Кнопки панели «Изображение» во всю ширину панели: текст по центру, отступы слева и справа равны. */
.instrument-ocr .ocr-image-tools :is(button, .act) { justify-content:center; text-align:center; }
/* Ряд выгрузок: все кнопки и «Развернуть инструмент» на одной линии. */
.instrument-ocr .ocr-save { align-items:center; }
.instrument-ocr .ocr-save > .ocr-actions { flex-wrap:wrap; gap:6px; }
.instrument-ocr .ocr-save { grid-template-columns:minmax(0,1fr) auto; }
.instrument-ocr .ocr-window-bar { grid-row:1; align-self:center; }
@media (min-width:701px) {
  /* На невысоком экране панель «Изображение» заходила под ряд «Скачать Word»: рабочее окно не сжимается ниже 660,
     кнопки опускаются. */
  .instrument-ocr.ocr-has-file { min-height:660px; }
  /* Панель «Изображение» (около 490 по высоте) не подрезается: рабочая область не ниже 510, окно инструмента растет,
     если экран ниже; в развернутом виде (ocr-expanded) - как у Codex, с прокруткой. */
  .instrument-ocr.instrument-ocr.ocr-has-file:not(.ocr-expanded) { height:auto;
    min-height:max(660px, calc(100dvh - 155px - var(--tools-bottom-space,16px)));
    grid-template-rows:auto auto auto minmax(510px,calc(100dvh - 365px - var(--tools-bottom-space,16px))) auto auto; }
  .instrument-ocr.instrument-ocr.ocr-has-file:not(.ocr-expanded):has(.ocr-bottom details[open]) {
    grid-template-rows:auto auto auto minmax(510px,calc(100dvh - 360px - var(--tools-bottom-space,16px))) auto auto; }
  .instrument-ocr.instrument-ocr.ocr-expanded:has(.ocr-bottom details[open]) {
    grid-template-rows:auto auto auto minmax(510px,calc(100dvh - 245px)) auto auto; }
}
@media (max-width:700px), (max-width:980px) and (max-height:500px) {
  .instrument-ocr .ocr-benefits { font-size:14px; }
  .instrument-ocr:not(.ocr-has-file) .ocr-controls { order:1; }
  .instrument-ocr:not(.ocr-has-file) .ocr-entry { order:2; }
  .instrument-ocr.instrument-ocr:not(.ocr-has-file) .ocr-controls :is(.ocr-field, select) { font-size:14px; }
  .instrument-ocr .ocr-save > .ocr-actions { flex-wrap:wrap; }
  .instrument-ocr .ocr-save [data-ocr-lead-open] { grid-column:1 / -1; }
  .instrument-ocr .ocr-editor-tools .ocr-formatbar { flex-wrap:wrap; row-gap:4px; }
  /* Телефон: два ровных ряда по 8 мест - отмена, повтор, начертание, заголовки; списки, выравнивание, «Без стиля»
     (на три места). Кнопки растягиваются на свое место, знак по центру. */
  .instrument-ocr.instrument-ocr .ocr-editor-tools .ocr-formatbar { display:grid; grid-template-columns:repeat(8, minmax(0,1fr));
    gap:4px; width:100%; }
  .instrument-ocr.instrument-ocr.instrument-ocr .ocr-formatbar [data-ocr-command] { width:auto; min-width:0; }
  .instrument-ocr.instrument-ocr.instrument-ocr .ocr-formatbar [data-ocr-command=removeFormat] { grid-column:span 3; }
}
