.pdf-scan { --scan-brand: #8c1821; --scan-brand-soft: #fbf1f2; --scan-ink: #1b1b1b; --scan-muted: #63676c; --scan-line: #d9dbde; --scan-soft: #f5f6f7; max-width: 1280px; margin-block: 1.5rem; color: var(--scan-ink); }
/* Keep the shared page grid, but let this tool use its full content width. */
.instrument-page:has(.pdf-scan) > .instrument-page__head,
.instrument-page:has(.pdf-scan) > .instrument-page__body { max-width: none; }
.instrument-page:has(.pdf-scan) > .instrument-page__head .instrument-page__back { color: #8c1821; }
.instrument-page:has(.pdf-scan) > .instrument-page__head .instrument-page__back:focus-visible { outline: 3px solid #8c1821; outline-offset: 3px; }
.pdf-scan * { box-sizing: border-box; }
.pdf-scan [hidden] { display: none !important; }
.pdf-scan .pdf-scan__hint { font-size: .9em; color: var(--scan-muted); }
.pdf-scan .pdf-scan__label { display: block; margin-bottom: .4rem; font-weight: 600; }
.pdf-scan .pdf-scan__controls { display: grid; gap: 1rem; margin-block: 0 .75rem; }
.pdf-scan .pdf-scan__intro { max-width: none; margin-bottom: 1.5rem; }
.pdf-scan .pdf-scan__intro h2 { margin-block: .65rem; }
.pdf-scan .pdf-scan__privacy { display: inline-block; border: 1px solid #c9ded3; border-radius: 20px; background: #eef7f1; color: #225c40; padding: .25rem .7rem; font-size: .85em; }
.pdf-scan .pdf-scan__workspace { display: grid; grid-template-columns: minmax(230px, 280px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.pdf-scan .pdf-scan__settings, .pdf-scan .pdf-scan__viewer { min-width: 0; }
.pdf-scan .pdf-scan__upload { padding: 0; margin-bottom: 1.25rem; }
.pdf-scan .pdf-scan__upload-main, .pdf-scan .pdf-scan__upload-info { min-width: 0; }
.pdf-scan .pdf-scan__drop-target { position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .65rem 1rem; border: 2px dashed #a7adb3; border-radius: 10px; background: #eff0f1; color: var(--scan-ink); text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.pdf-scan .pdf-scan__drop-target strong { font-size: 18px; line-height: 1.35; }
.pdf-scan .pdf-scan__upload-icon { display: none; }
.pdf-scan .pdf-scan__drop-formats { font-size: 14px; color: var(--scan-muted); }
.pdf-scan .pdf-scan__drop-formats, .pdf-scan .pdf-scan__drop-limits { max-width: 100%; overflow-wrap: anywhere; }
.pdf-scan .pdf-scan__drop-limits { margin-top: .15rem; font-size: 14px; line-height: 1.4; color: var(--scan-muted); }
.pdf-scan .pdf-scan__choose { margin: 0; color: var(--scan-brand); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; font-weight: 400; }
.pdf-scan .pdf-scan__file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.pdf-scan .pdf-scan__drop-target:hover, .pdf-scan .pdf-scan__drop-target:focus-within { border-color: var(--scan-brand); background: #e9eaec; }
.pdf-scan .pdf-scan__drop-target:focus-within { outline: 3px solid var(--scan-brand); outline-offset: 3px; }
.pdf-scan .pdf-scan__upload-info { padding: .5rem .15rem 0; }
.pdf-scan .pdf-scan__upload-info .pdf-scan__text-button { float: right; margin-left: 1rem; padding: 0; font-size: .85rem; }
.pdf-scan .pdf-scan__upload-info p { margin: 0 0 .25rem; font-size: .78rem; line-height: 1.4; }
.pdf-scan .pdf-scan__upload-info p:last-child { margin-bottom: 0; }
.pdf-scan .pdf-scan__upload[data-dragging="true"] .pdf-scan__drop-target { background: var(--scan-brand-soft); border-color: var(--scan-brand); box-shadow: 0 0 0 2px var(--scan-brand); }
.pdf-scan .pdf-scan__errors { padding-left: 1.2rem; color: #a92020; font-size: .9em; overflow-wrap: anywhere; }
.pdf-scan .pdf-scan__filename { overflow-wrap: anywhere; font-size: .9em; margin-bottom: 0; }
.pdf-scan .pdf-scan__filename:empty { display: none; }
.pdf-scan .pdf-scan__details { border: 1px solid var(--scan-line); border-radius: 6px; padding: .7rem; margin-bottom: .75rem; }
.pdf-scan .pdf-scan__details summary { font-weight: 600; cursor: pointer; }
.pdf-scan .pdf-scan__details[open] summary { margin-bottom: .6rem; }
.pdf-scan .pdf-scan__range { display: flex; justify-content: space-between; gap: .5rem; margin-top: .55rem; font-size: .9em; }
.pdf-scan .pdf-scan__range output { white-space: nowrap; color: var(--scan-muted); font-variant-numeric: tabular-nums; }
.pdf-scan input[type="range"] { display: block; width: 100%; height: 28px; accent-color: var(--scan-brand); }
.pdf-scan .pdf-scan__adjustment { display: grid; grid-template-columns: 78px minmax(0, 1fr) 41px; align-items: center; gap: 6px; min-height: 32px; font-size: 12px; }
.pdf-scan .pdf-scan__adjustment label { margin: 0; line-height: 1.2; }
.pdf-scan .pdf-scan__adjustment output { text-align: right; white-space: nowrap; color: var(--scan-muted); font-variant-numeric: tabular-nums; font-size: 11px; }
.pdf-scan .pdf-scan__adjustment input[type="range"] { min-width: 0; margin: 0; height: 26px; }
.pdf-scan .pdf-scan__settings { font-size: 13px; }
.pdf-scan .pdf-scan__settings .pdf-scan__controls > div, .pdf-scan .pdf-scan__color-row { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: .5rem; align-items: center; }
.pdf-scan .pdf-scan__settings .pdf-scan__label { margin: 0; }
.pdf-scan .pdf-scan__settings .zpole select { min-height: 32px; height: 32px; padding: .25rem .4rem; font-size: 12px; }
.pdf-scan .pdf-scan__settings .pdf-scan__controls { margin-bottom: .5rem; }
.pdf-scan .pdf-scan__settings .pdf-scan__details { padding: .55rem .65rem; margin-bottom: .5rem; }
.pdf-scan .pdf-scan__settings .pdf-scan__details[open] summary { margin-bottom: .35rem; }
.pdf-scan .pdf-scan__settings .pdf-scan__hint { margin: .35rem 0; font-size: 11px; line-height: 1.35; }
.pdf-scan .pdf-scan__settings .pdf-scan__text-button { font-size: 11px; padding: .25rem 0; }
.pdf-scan .pdf-scan__settings .zknopka { min-height: 34px; padding: .4rem .6rem; font-size: 12px; }
.pdf-scan .pdf-scan__settings .pdf-scan__actions { gap: .4rem; }
.pdf-scan .pdf-scan__settings [data-scan-status] { font-size: 11px; line-height: 1.4; margin: .5rem 0 0; }
.pdf-scan .pdf-scan__text-button { padding: .35rem 0; border: 0; background: none; color: var(--scan-brand); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pdf-scan .zpole { display: block; }
.pdf-scan .zpole select, .pdf-scan .zpole input[type="file"] { width: 100%; max-width: 100%; min-height: 44px; }
.pdf-scan .zpole select { width: 100%; font: inherit; padding: .6rem; border: 1px solid var(--scan-line); border-radius: 4px; background: #fff; color: var(--scan-ink); }
.pdf-scan .pdf-scan__actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.pdf-scan .zknopka { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .65rem 1rem; border: 1px solid var(--scan-brand); border-radius: 6px; background: var(--knopka-fon, var(--scan-brand)); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.pdf-scan .zknopka--tihaya { background: #fff; color: var(--scan-brand); border-color: var(--scan-line); }
.pdf-scan .zknopka:hover:not(:disabled) { filter: brightness(.95); }
.pdf-scan button:focus-visible, .pdf-scan a:focus-visible, .pdf-scan input:focus-visible, .pdf-scan select:focus-visible, .pdf-scan summary:focus-visible { outline: 3px solid var(--scan-brand); outline-offset: 3px; }
.pdf-scan input[type="file"]::file-selector-button { padding: .5rem .65rem; margin-right: .5rem; border: 1px solid var(--scan-line); border-radius: 4px; background: #fff; color: var(--scan-ink); cursor: pointer; }
.pdf-scan progress { display: block; width: 100%; height: 1rem; margin-block: .75rem; accent-color: var(--scan-brand); }
.pdf-scan .pdf-scan__comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.pdf-scan figure { margin: 0; min-width: 0; }
.pdf-scan figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem; font-size: .9em; font-weight: 600; margin-bottom: .6rem; }
.pdf-scan figcaption span { color: var(--scan-muted); font-size: .85em; font-weight: 400; }
.pdf-scan .pdf-scan__sheet { display: flex; align-items: flex-start; justify-content: center; padding: .65rem; background: var(--scan-soft); border: 1px solid var(--scan-line); border-radius: 6px; min-height: 160px; }
.pdf-scan canvas, .pdf-scan .pdf-scan__sheet img { display: block; width: auto; height: auto; max-width: 100%; max-height: 72vh; margin-inline: auto; box-shadow: 0 2px 9px #0002; }
.pdf-scan .pdf-scan__page-nav { display: flex; align-items: center; gap: 1rem; margin-block: 1rem; }
.pdf-scan .pdf-scan__page-nav > div { flex: 1 1 220px; min-width: 0; }
.pdf-scan .pdf-scan__page-nav > p { flex: 1 1 220px; }
.pdf-scan .pdf-scan__page-nav label { font-size: .85em; }
.pdf-scan .pdf-scan__limits { margin-top: 1.5rem; }
.pdf-scan .pdf-scan__result { padding: 1rem; border: 1px solid var(--scan-line); border-radius: 4px; }
.pdf-scan .pdf-scan__lead { margin-top: 1.5rem; border-top: 1px solid var(--scan-line); padding-top: .75rem; }
.pdf-scan [data-scan-status][data-error="true"] { color: #a92020; }
.pdf-scan .pdf-scan__assembly { margin-block: 1.25rem; border: 1px solid var(--scan-line); border-radius: 8px; padding: 1rem; }
.pdf-scan .pdf-scan__assembly h3 { margin: 0 0 .6rem; font-size: 1.15em; }
.pdf-scan .pdf-scan__assembly-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .85rem; }
.pdf-scan .pdf-scan__assembly-tools .zpole { flex: 1 1 160px; min-width: 0; }
.pdf-scan .pdf-scan__assembly-tools .pdf-scan__text-button { min-height: 44px; }
.pdf-scan .pdf-scan__pages { max-height: 26rem; overflow: auto; list-style: none; margin: 1rem 0; padding: 3px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.pdf-scan .pdf-scan__page-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: .6rem; align-items: center; border: 1px solid var(--scan-line); border-radius: 6px; background: #fff; padding: .45rem .65rem; margin-bottom: .45rem; }
.pdf-scan .pdf-scan__page-row[data-current="true"] { background: var(--scan-brand-soft); border-color: var(--scan-brand); }
.pdf-scan .pdf-scan__page-row > input { width: 20px; height: 20px; margin: 0; accent-color: var(--scan-brand); cursor: pointer; }
.pdf-scan .pdf-scan__page-title { border: 0; padding: .45rem 0; min-height: 44px; min-width: 0; background: none; color: var(--scan-ink); text-align: left; overflow-wrap: anywhere; font: inherit; font-size: .9em; cursor: pointer; }
.pdf-scan .pdf-scan__page-title:hover { color: var(--scan-brand); text-decoration: underline; }
.pdf-scan .pdf-scan__page-actions { display: flex; gap: .3rem; }
.pdf-scan .pdf-scan__page-actions button { display: inline-flex; justify-content: center; align-items: center; width: 40px; min-height: 44px; border: 1px solid var(--scan-line); border-radius: 4px; background: #fff; color: var(--scan-ink); font: inherit; font-size: 1.15em; cursor: pointer; }
.pdf-scan .pdf-scan__page-actions button:hover:not(:disabled) { background: var(--scan-brand-soft); }
.pdf-scan .pdf-scan__limit { padding: .75rem; border: 1px solid #e4b986; border-radius: 6px; background: #fff7eb; color: #724511; }
.pdf-scan button:disabled { opacity: .55; cursor: not-allowed; }
@media (min-width: 851px) { .pdf-scan .pdf-scan__settings { padding: 0; } }
@media (max-width: 850px) { .pdf-scan .pdf-scan__workspace { grid-template-columns: 1fr; } .pdf-scan .pdf-scan__upload { grid-template-columns: 1fr; gap: .75rem; } }
@media (max-width: 560px) { .pdf-scan .pdf-scan__comparison { grid-template-columns: 1fr; } .pdf-scan .pdf-scan__actions .zknopka { width: 100%; } .pdf-scan .pdf-scan__page-nav { flex-direction: column; align-items: stretch; } .pdf-scan .pdf-scan__page-nav > div { flex-basis: auto; } }
@media (max-width: 560px) { .pdf-scan .pdf-scan__page-nav > p { flex-basis: auto; } .pdf-scan .pdf-scan__page-row { grid-template-columns: 22px minmax(0, 1fr); } .pdf-scan .pdf-scan__page-actions { grid-column: 2; justify-content: flex-end; } .pdf-scan .pdf-scan__assembly { padding: .75rem; } }
@media (max-width: 850px) { .pdf-scan .pdf-scan__adjustment { min-height: 38px; font-size: 13px; } .pdf-scan .pdf-scan__adjustment input[type="range"] { height: 34px; } .pdf-scan .pdf-scan__settings .zpole select { min-height: 38px; height: 38px; } .pdf-scan .pdf-scan__upload-info .pdf-scan__text-button { float: none; display: block; margin: 0 0 .4rem; } }

/* Shared disclosure markup keeps the desktop composition and all field values. */
.pdf-scan .pdf-scan__mobile-copy, .pdf-scan .pdf-scan__panel-resume, .pdf-scan .pdf-scan__preview-switch { display: none; }
.pdf-scan .pdf-scan__mobile-panel > summary { list-style: none; cursor: default; }
.pdf-scan .pdf-scan__mobile-panel > summary::-webkit-details-marker { display: none; }
.pdf-scan .pdf-scan__intro > summary h2 { display: inline; }
.pdf-scan .pdf-scan__intro > summary { margin-block: .65rem; }
.pdf-scan .pdf-scan__preview-panel > summary, .pdf-scan .pdf-scan__limitations > summary { display: none; }
.pdf-scan .pdf-scan__drop-box { border: 2px dashed #a7adb3; border-radius: 10px; background: #eff0f1; }
.pdf-scan .pdf-scan__drop-target { border: 0; background: transparent; padding-bottom: .25rem; }
.pdf-scan .pdf-scan__drop-limits { padding: .1rem 1rem .65rem; margin: 0; text-align: center; }
.pdf-scan .pdf-scan__drop-limits > summary { display: block; }
.pdf-scan .pdf-scan__drop-limits p { margin: .1rem 0 0; }
.pdf-scan .pdf-scan__drop-formats, .pdf-scan .pdf-scan__choose, .pdf-scan .pdf-scan__drop-limits, .pdf-scan .pdf-scan__drop-limits > summary, .pdf-scan .pdf-scan__drop-limits p { font-family: inherit; font-size: 14px; line-height: 1.4; font-weight: 400; }
.pdf-scan .pdf-scan__assembly > summary { margin-bottom: .75rem; }
.pdf-scan .pdf-scan__panel-title { display: block; margin-bottom: .6rem; font-size: 1.15em; font-weight: 600; }
.pdf-scan .pdf-scan__assembly-summary { display: block; font-weight: 400; }
.pdf-scan .pdf-scan__page-check { display: flex; align-items: center; justify-content: center; width: 22px; min-height: 44px; margin: 0; cursor: pointer; }
.pdf-scan .pdf-scan__page-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--scan-brand); cursor: pointer; }
.pdf-scan .pdf-scan__result-slot:empty { display: none; }

@media (max-width: 850px) {
  .pdf-scan { margin-block: .75rem; font-size: 16px; line-height: 1.45; }
  .pdf-scan .pdf-scan__desktop-copy { display: none; }
  .pdf-scan .pdf-scan__mobile-copy { display: inline; }
  .pdf-scan .pdf-scan__hint, .pdf-scan .pdf-scan__drop-formats,
  .pdf-scan .pdf-scan__drop-limits, .pdf-scan .pdf-scan__filename,
  .pdf-scan .pdf-scan__errors, .pdf-scan .pdf-scan__assembly-summary,
  .pdf-scan .pdf-scan__settings .pdf-scan__hint,
  .pdf-scan .pdf-scan__settings [data-scan-status] { font-size: 14px; line-height: 1.45; }
  .pdf-scan .pdf-scan__intro { margin: 0 0 .5rem; }
  .pdf-scan .pdf-scan__intro > summary { margin: 0; }
  .pdf-scan .pdf-scan__intro > summary h2 { margin: 0; font-size: 18px; line-height: 1.35; }
  .pdf-scan .pdf-scan__intro p { margin: .5rem 0; font-size: 14px; }
  .pdf-scan .pdf-scan__upload { margin-bottom: .65rem; }
  .pdf-scan .pdf-scan__upload-icon { display: none; }
  .pdf-scan .pdf-scan__drop-target { padding: .65rem .75rem .1rem; gap: .2rem; }
  .pdf-scan .pdf-scan__drop-target strong { font-size: 18px; line-height: 1.35; }
  .pdf-scan .pdf-scan__choose { margin: 0; font-size: 14px; }
  .pdf-scan .pdf-scan__drop-limits { padding: 0 .3rem .2rem; }
  .pdf-scan .pdf-scan__drop-limits p { padding: 0 .5rem .5rem; }
  .pdf-scan .pdf-scan__filename { margin: .4rem 0 0; }
  .pdf-scan .pdf-scan__errors { margin-block: .4rem; }
  .pdf-scan .pdf-scan__workspace { gap: .5rem; }
  .pdf-scan .pdf-scan__settings { font-size: 16px; }
  .pdf-scan .pdf-scan__settings .pdf-scan__controls > div,
  .pdf-scan .pdf-scan__color-row { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .pdf-scan .pdf-scan__settings .zpole select, .pdf-scan .zpole select {
    min-height: 44px; height: auto; padding: .55rem .6rem; font-size: 16px; line-height: 1.35;
  }
  .pdf-scan .pdf-scan__controls { gap: .5rem; }
  .pdf-scan .pdf-scan__settings .pdf-scan__details { padding: 0; margin: 0 0 .5rem; }
  .pdf-scan [data-scan-mobile-panel] > summary {
    display: block; position: relative; min-height: 44px; margin: 0; padding: .55rem 2rem .55rem .65rem;
    list-style: none; cursor: pointer; font-size: 16px; line-height: 1.35; font-weight: 600;
    overflow-wrap: anywhere;
  }
  .pdf-scan [data-scan-mobile-panel] > summary::-webkit-details-marker { display: none; }
  .pdf-scan [data-scan-mobile-panel] > summary::after {
    content: ''; position: absolute; width: 8px; height: 8px; top: 17px; right: 13px;
    border-right: 2px solid var(--scan-muted); border-bottom: 2px solid var(--scan-muted); transform: rotate(45deg);
  }
  .pdf-scan [data-scan-mobile-panel][open] > summary::after { top: 21px; transform: rotate(225deg); }
  .pdf-scan .pdf-scan__intro > summary { padding-left: 0; }
  .pdf-scan .pdf-scan__drop-limits > summary { font-size: 14px; line-height: 1.4; font-weight: 400; }
  .pdf-scan .pdf-scan__panel-resume { display: block; margin-top: .15rem; color: var(--scan-muted); font-size: 14px; line-height: 1.4; font-weight: 400; }
  .pdf-scan .pdf-scan__settings .pdf-scan__details[open] > summary { margin-bottom: .25rem; }
  .pdf-scan .pdf-scan__details > :not(summary) { margin-left: .65rem; margin-right: .65rem; }
  .pdf-scan .pdf-scan__adjustment { grid-template-columns: minmax(0, 1fr) auto; min-height: 44px; font-size: 16px; gap: 0 .5rem; }
  .pdf-scan .pdf-scan__adjustment label { grid-column: 1; grid-row: 1; overflow-wrap: anywhere; }
  .pdf-scan .pdf-scan__adjustment output { grid-column: 2; grid-row: 1; font-size: 16px; }
  .pdf-scan .pdf-scan__adjustment input[type="range"] { grid-column: 1 / -1; grid-row: 2; min-height: 44px; height: 44px; }
  .pdf-scan .pdf-scan__settings .pdf-scan__text-button { min-height: 44px; font-size: 14px; line-height: 1.4; padding: .5rem 0; }
  .pdf-scan .pdf-scan__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
  .pdf-scan .pdf-scan__settings .pdf-scan__actions .zknopka { flex: 1 1 100px; width: auto; min-height: 48px; }
  .pdf-scan .zknopka, .pdf-scan .pdf-scan__settings .zknopka { min-height: 48px; font-size: 16px; line-height: 1.4; padding: .65rem .6rem; }
  .pdf-scan .pdf-scan__actions [data-scan-clear]:disabled { display: none; }
  .pdf-scan[aria-busy="true"] .pdf-scan__actions [data-scan-create],
  .pdf-scan[aria-busy="true"] .pdf-scan__actions [data-scan-clear] { display: none; }
  .pdf-scan .pdf-scan__settings [data-scan-status] { margin: .4rem 0 0; }
  .pdf-scan .pdf-scan__result-slot .pdf-scan__result { margin-top: .5rem; padding: .65rem; }
  .pdf-scan .pdf-scan__result p { margin: 0 0 .5rem; font-size: 14px; overflow-wrap: anywhere; }
  .pdf-scan .pdf-scan__result .zknopka { width: 100%; }
  .pdf-scan .pdf-scan__preview-panel, .pdf-scan .pdf-scan__assembly,
  .pdf-scan .pdf-scan__limitations { border: 1px solid var(--scan-line); border-radius: 6px; margin: 0 0 .5rem; padding: 0; }
  .pdf-scan .pdf-scan__preview-panel > :not(summary) { margin-left: .65rem; margin-right: .65rem; }
  .pdf-scan .pdf-scan__preview-switch { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
  .pdf-scan .pdf-scan__preview-switch button { flex: 1 1 10em; min-width: 0; max-width: 100%; min-height: 44px; padding: .5rem; border: 1px solid var(--scan-line); border-radius: 4px; background: #fff; color: var(--scan-ink); font: inherit; font-size: 16px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
  .pdf-scan .pdf-scan__preview-switch button[aria-pressed="true"] { background: var(--scan-brand-soft); border-color: var(--scan-brand); font-weight: 600; }
  .pdf-scan .pdf-scan__comparison { grid-template-columns: minmax(0, 1fr); }
  .pdf-scan[data-scan-view="effect"] .pdf-scan__comparison figure:first-child,
  .pdf-scan[data-scan-view="original"] .pdf-scan__comparison figure:last-child { display: none; }
  .pdf-scan .pdf-scan__sheet { min-height: 0; }
  .pdf-scan .pdf-scan__page-nav { margin-block: .65rem; gap: .5rem; }
  .pdf-scan .pdf-scan__page-nav label { font-size: 14px; }
  .pdf-scan .pdf-scan__page-nav > p { margin: 0; }
  .pdf-scan .pdf-scan__assembly > summary { margin: 0; }
  .pdf-scan .pdf-scan__panel-title { font-size: 16px; margin: 0 0 .15rem; }
  .pdf-scan .pdf-scan__assembly > :not(summary), .pdf-scan .pdf-scan__limitations > :not(summary) { margin-left: .65rem; margin-right: .65rem; }
  .pdf-scan .pdf-scan__assembly-tools { gap: .5rem; }
  .pdf-scan .pdf-scan__assembly-tools .pdf-scan__text-button { flex: 1 1 100px; min-height: 44px; font-size: 14px; }
  .pdf-scan .pdf-scan__pages { max-height: none; overflow: visible; margin-block: .65rem; padding: 0; overscroll-behavior: auto; }
  .pdf-scan .pdf-scan__page-row { grid-template-columns: 44px minmax(0, 1fr); gap: .25rem .5rem; padding: .4rem; }
  .pdf-scan .pdf-scan__page-check { width: 44px; height: 44px; }
  .pdf-scan .pdf-scan__page-title { font-size: 16px; line-height: 1.4; }
  .pdf-scan .pdf-scan__page-actions { grid-column: 2; justify-content: flex-end; gap: .35rem; }
  .pdf-scan .pdf-scan__page-actions button { width: 44px; min-height: 44px; }
  .pdf-scan .pdf-scan__limit { margin: .5rem 0; padding: .65rem; font-size: 14px; }
  .pdf-scan .pdf-scan__limits { margin-top: 0; }
  .pdf-scan .pdf-scan__lead { margin-top: .75rem; padding-top: .5rem; }
  .pdf-scan .pdf-scan__lead p { font-size: 14px; line-height: 1.45; margin: .4rem 0; }
  .pdf-scan .pdf-scan__lead .zknopka { width: 100%; }
  .pdf-scan [data-scan-mobile-panel], .pdf-scan .pdf-scan__actions, .pdf-scan .pdf-scan__result {
    scroll-margin-top: var(--tools-top-space, 80px);
    scroll-margin-bottom: var(--tools-bottom-space, calc(160px + env(safe-area-inset-bottom)));
  }
}

/* The next step follows the working tool without changing its layout. */
.pdf-scan .pdf-scan__lead-heading { margin: 0 0 .5rem; font-size: 1.25rem; line-height: 1.3; color: var(--scan-ink); }
.pdf-scan .pdf-scan__services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-block: 1.25rem; }
.pdf-scan .pdf-scan__services > a { display: flex; flex-direction: column; gap: .45rem; min-width: 0; padding: 1rem; border: 1px solid var(--scan-line); border-radius: 6px; background: #fff; color: var(--scan-ink); text-decoration: none; overflow-wrap: anywhere; }
.pdf-scan .pdf-scan__services > a:hover { border-color: var(--scan-brand); background: var(--scan-brand-soft); }
.pdf-scan .pdf-scan__services strong { font-size: 16px; line-height: 1.4; color: var(--scan-brand); }
.pdf-scan .pdf-scan__services span { font-size: 14px; line-height: 1.5; color: var(--scan-muted); }
.pdf-scan .pdf-scan__trust { min-width: 0; max-width: 100%; margin-top: 1.5rem; }
.pdf-scan .pdf-scan__trust .blk { max-width: 100%; margin: 0; padding: 0; }
.pdf-scan .pdf-scan__trust #otzyvy h2 { font-size: 1.25rem; line-height: 1.3; text-align: left; }
/* Local foundations from glavnaya.css: the shared carousel JS keeps its
   original wrappers, controls and mobile review disclosure behavior. */
.pdf-scan .pdf-scan__trust #otzyvy .lenta { position: relative; min-width: 0; max-width: 100%; }
.pdf-scan .pdf-scan__trust #otzyvy .strip { display: flex; gap: 12px; min-width: 0; max-width: 100%; margin-inline: 0; padding-inline: 12px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.pdf-scan .pdf-scan__trust #otzyvy .strip::-webkit-scrollbar { display: none; width: 0; height: 0; }
.pdf-scan .pdf-scan__trust #otzyvy .rev { flex: 0 0 auto; min-width: 0; width: min(320px, calc(100vw - 48px)); max-width: 100%; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.pdf-scan .pdf-scan__trust #otzyvy .rev .rtop { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 4px; }
.pdf-scan .pdf-scan__trust #otzyvy .rev .rname { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.pdf-scan .pdf-scan__trust #otzyvy .rev .rplat { color: var(--scan-brand); }
.pdf-scan .pdf-scan__trust #otzyvy .rev p { margin: 4px 0 0; }
.pdf-scan .pdf-scan__trust #otzyvy .plat { display: flex; flex-direction: column; flex: 0 0 200px; gap: 4px; min-width: 0; width: 200px; max-width: 100%; padding: 10px 12px; border-radius: 6px; text-decoration: none; }
.pdf-scan .pdf-scan__trust #otzyvy .platrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 32px; }
.pdf-scan .pdf-scan__trust #otzyvy .plat .platlogo { display: block; max-width: 100%; max-height: 32px; width: auto; height: auto; object-fit: contain; }
.pdf-scan .pdf-scan__trust #otzyvy .plat .pname { min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pdf-scan .pdf-scan__trust #otzyvy .plat .prat { font-size: 16px; line-height: 1.4; font-weight: 700; white-space: nowrap; color: var(--scan-ink); }
.pdf-scan .pdf-scan__trust #otzyvy .plat .pcnt { display: block; color: var(--scan-muted); }
.pdf-scan .pdf-scan__trust #otzyvy :is(.pcnt, .rname, .rplat, .rev p, .rev-tog) { font-size: 14px; line-height: 1.45; }
.pdf-scan .pdf-scan__trust #otzyvy .lentabtn { position: absolute; top: 50%; z-index: 5; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; transform: translateY(-50%); background: rgba(27, 27, 27, .28); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.pdf-scan .pdf-scan__trust #otzyvy .lentabtn.prev { left: 6px; }
.pdf-scan .pdf-scan__trust #otzyvy .lentabtn.next { right: 6px; }
.pdf-scan .pdf-scan__trust #otzyvy .lentabtn[hidden] { display: none; }
.pdf-scan .pdf-scan__trust #otzyvy .lentabtn:focus-visible { background: rgba(27, 27, 27, .5); outline: 3px solid var(--scan-brand); outline-offset: 3px; }
.pdf-scan .pdf-scan__trust #otzyvy .rev .rev-tog { display: none; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--scan-brand); font: inherit; font-size: 14px; line-height: 1.45; cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .pdf-scan .pdf-scan__trust #otzyvy .lentabtn:hover { background: rgba(27, 27, 27, .5); }
}
@media (max-width: 760px) {
  .pdf-scan .pdf-scan__trust #otzyvy .rev p { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .pdf-scan .pdf-scan__trust #otzyvy .rev.raskryt p { display: block; overflow: visible; }
  .pdf-scan .pdf-scan__trust #otzyvy .rev .rev-tog { display: inline-block; min-height: 44px; }
}
.pdf-scan .pdf-scan__result-order { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--scan-line); }
.pdf-scan .pdf-scan__result-order p { margin: 0 0 .5rem; font-size: 14px; line-height: 1.4; }
@media (max-width: 850px) {
  .pdf-scan .pdf-scan__drop-formats, .pdf-scan .pdf-scan__choose, .pdf-scan .pdf-scan__drop-limits, .pdf-scan .pdf-scan__drop-limits > summary, .pdf-scan .pdf-scan__drop-limits p { font-size: 14px; line-height: 1.4; font-weight: 400; }
  .pdf-scan .pdf-scan__lead-heading { font-size: 20px; }
  .pdf-scan .pdf-scan__services { grid-template-columns: 1fr; gap: .65rem; margin-block: 1rem; }
  .pdf-scan .pdf-scan__services > a { padding: .8rem; }
}

/* The explicitly requested PDF-scan-1 page shares the engine, with a visual board. */
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__board-slot:empty { display: none; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__board-slot .pdf-scan__assembly { margin: 0 0 1.25rem; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-height: none; overflow: visible; margin: 1rem 0; padding: 4px; scrollbar-gutter: auto; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; margin: 0; border: 1px solid var(--scan-line); border-radius: 8px; background: #fff; transition: border-color .12s, box-shadow .12s; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-current="true"] { border-color: var(--scan-brand); background: var(--scan-brand-soft); }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-dragging="true"] { opacity: .55; box-shadow: 0 0 0 2px var(--scan-brand); }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-drop="before"]::before,
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-drop="after"]::after { content: ''; position: absolute; top: 0; bottom: 0; width: 4px; background: var(--scan-brand); border-radius: 3px; pointer-events: none; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-drop="before"]::before { left: -10px; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-drop="after"]::after { right: -10px; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-check { width: 44px; height: 44px; flex: 0 0 44px; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-number { font-size: 14px; font-weight: 600; line-height: 1.4; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__drag-handle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--scan-line); border-radius: 5px; background: #fff; color: var(--scan-brand); font: inherit; font-size: 22px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__drag-handle:active { cursor: grabbing; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__thumbnail { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 100%; aspect-ratio: 1; min-height: 0; padding: 12px; overflow: hidden; border: 1px solid var(--scan-line); border-radius: 5px; background: var(--scan-soft); color: var(--scan-muted); cursor: pointer; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__thumbnail img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; pointer-events: none; user-select: none; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__thumbnail-status { max-width: 100%; font: inherit; font-size: 14px; line-height: 1.4; text-align: center; overflow-wrap: anywhere; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-title { width: 100%; padding: 2px 0; min-height: 44px; font-size: 14px; line-height: 1.4; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-actions { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; margin-top: auto; width: 100%; }
.pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-actions button { width: 100%; min-width: 44px; min-height: 44px; }
@media (max-width: 900px) {
  .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__pages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 520px) {
  .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__pages { grid-template-columns: minmax(0, 1fr); }
  .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-drop="before"]::before,
  .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-drop="after"]::after { left: 0; right: 0; width: auto; height: 4px; }
  .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-drop="before"]::before { top: -8px; bottom: auto; }
  .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-drop="after"]::after { top: auto; bottom: -8px; }
}

/* === Сайт academperevod.ru, 18.11.2026, внедрение «PDF как скан» (сессия «Инструмент 5»). ===
   Кнопки - по канону (C:\Users\Павел\Claude\Projects\Вебсайт\КАНОН_ОФОРМЛЕНИЯ.md, раздел 3): градиент --knopka-fon,
   постамент, овал; рабочие кнопки окна компактные 40/14, как у OCR после правки Павла 17.11.2026. Ошибки - фирменный
   красный. Карточки «Нужен перевод документа?» - копия вида OCR и калькулятора. Откат: удалить этот подраздел. */
body.template-instrumentpage .pdf-scan .zknopka{
  background-color:#8c1821;background-image:var(--knopka-fon);border:0;color:#fff;
  box-shadow:inset 0 4px 8px 4px rgba(255,255,255,.12);
  min-height:40px;height:auto;padding:0 18px;border-radius:999px;font-size:14px;font-weight:600;line-height:20px;
  display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;box-sizing:border-box;filter:none;
  transition:background-image .25s,box-shadow .25s,transform .25s}
body.template-instrumentpage .pdf-scan .zknopka:active:not(:disabled){
  background-image:var(--knopka-fon-nazhatie);box-shadow:inset 0 4px 8px 4px rgba(255,255,255,.22);transform:translateY(2px)}
body.template-instrumentpage .pdf-scan .zknopka.zknopka--tihaya{background:#fff;color:#1b1b1b;border:1px solid #d9dbde;box-shadow:none}
body.template-instrumentpage .pdf-scan .zknopka:disabled{opacity:.5;cursor:default}
body.template-instrumentpage .pdf-scan [data-scan-order].pdf-scan__text-button{color:#8c1821}
@media (hover:hover) and (pointer:fine){
  body.template-instrumentpage .pdf-scan .zknopka:hover:not(:disabled){background-color:#9a1a23;background-image:var(--knopka-fon-navedenie);filter:none}
  body.template-instrumentpage .pdf-scan .zknopka.zknopka--tihaya:hover:not(:disabled){background:#f5f6f7;border-color:#d9dbde}
}
@media (prefers-reduced-motion:reduce){
  body.template-instrumentpage .pdf-scan .zknopka{transition:none}
  body.template-instrumentpage .pdf-scan .zknopka:active:not(:disabled){transform:none}
}
@media (max-width:700px),(max-width:980px) and (max-height:500px){
  body.template-instrumentpage .pdf-scan .zknopka{min-height:44px;padding:0 12px;font-size:15px}
}
body.template-instrumentpage .pdf-scan .pdf-scan__errors,
body.template-instrumentpage .pdf-scan [data-scan-status][data-error="true"]{color:#8c1821}
/* Карточка страницы (Павел 19.11.2026): сверху отметка, «Страница N» и файл - в одном месте; снизу кнопки словами
   «Перетащить», «Повернуть на 90°», «Удалить» одним рядом; панель ручных настроек на компьютере не сворачивается. */
/* Павел 19.11 (второй круг): отметка по левому краю, «Страница N» рядом с ней; имя файла ниже - две строки закреплены,
   длиннее - многоточие; рамки карточек, миниатюр и кнопок темнее, чтобы было видно, где кончается одна страница. */
body.template-instrumentpage .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-top{
  display:grid;grid-template-columns:44px minmax(0,1fr);align-items:start;justify-items:start;gap:0 6px;text-align:left;
  width:100%;align-self:stretch;justify-content:start;margin:0}
body.template-instrumentpage .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-check{justify-content:flex-start;margin:0}
body.template-instrumentpage .pdf-scan .pdf-scan__page-nadpis{display:flex;flex-direction:column;width:100%;min-width:0;padding-top:10px;line-height:1.35;text-align:left}
body.template-instrumentpage .pdf-scan .pdf-scan__page-nadpis .pdf-scan__page-number{font-size:15px;font-weight:700;color:#1b1b1b}
body.template-instrumentpage .pdf-scan .pdf-scan__page-file{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;text-overflow:ellipsis;
  height:2.7em;font-size:13px;line-height:1.35;color:#63676c;overflow-wrap:anywhere}
body.template-instrumentpage .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row{border-color:#a7adb3}
body.template-instrumentpage .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-row[data-current="true"]{border-color:#8c1821}
body.template-instrumentpage .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__thumbnail{border-color:#a7adb3}
body.template-instrumentpage .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-actions{display:flex;flex-wrap:wrap;gap:6px}
body.template-instrumentpage .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-actions button{
  flex:1 1 auto;width:auto;min-width:0;min-height:40px;height:auto;padding:6px 10px;border:1px solid #a7adb3;border-radius:999px;
  background:#fff;color:#1b1b1b;font:inherit;font-size:13px;font-weight:600;line-height:1.2;white-space:nowrap}
body.template-instrumentpage .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-actions .pdf-scan__drag-handle{color:#8c1821;cursor:grab}
body.template-instrumentpage .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-actions button[data-action="remove"]{color:#8c1821}
@media (hover:hover) and (pointer:fine){
  body.template-instrumentpage .pdf-scan[data-scan-variant="visual-assembly"] .pdf-scan__page-actions button:hover:not(:disabled){background:#f5f6f7}
}
body.template-instrumentpage .pdf-scan:not([data-scan-compact="true"]) .pdf-scan__details > summary{cursor:default;list-style:none}
body.template-instrumentpage .pdf-scan:not([data-scan-compact="true"]) .pdf-scan__details > summary::-webkit-details-marker{display:none}
body.template-instrumentpage .pdf-uslugi{margin-top:70px}
body.template-instrumentpage .pdf-uslugi > h2{font-size:28px;line-height:33.6px;font-weight:700;text-align:center;color:#1b1b1b;margin:0 0 24px}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid[data-h]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:30px;padding-top:0;border-top:0}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]{
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;margin:0;padding:20px 24px;
  border:0;border-radius:16px;background:#fff;box-shadow:0 10px 20px rgba(21,72,137,.08);text-align:center;cursor:pointer;text-decoration:none}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]::before{
  content:"";position:static;display:block;flex:none;width:70px;height:70px;border:0;background:center/contain no-repeat;pointer-events:none}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[href*="perevod-lichnyh-dokumentov"]::before{background-image:url("../shared/img/uslugi/pasport.7f4948911ead.webp")}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[href*="tehnicheskij-perevod"]::before{background-image:url("../shared/img/uslugi/tehnicheskij.06147fac4e19.webp")}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[href*="perevod-dogovorov"]::before{background-image:url("../shared/img/uslugi/juridicheskij.0fd1a583d75f.webp")}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[href*="perevod-vypisok-i-epikrizov"]::before{background-image:url("../shared/img/uslugi/meditsinskij.28be8e9f2a47.webp")}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]::after{content:"Подробнее \203A";margin-top:auto;font-size:13px;line-height:17px;font-style:italic;color:#8c1821}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]:is(:hover,:focus-visible)::after{color:#fff}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid .bn[data-h]{font-size:16px;line-height:20.8px;font-weight:650;color:#1b1b1b}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid .bt[data-h]{font-size:15px;line-height:21.75px;font-weight:400;color:#3d4247}
@media (max-width:900px){
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid[data-h]{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}
@media (max-width:700px),(max-width:980px) and (max-height:500px){
  body.template-instrumentpage .pdf-uslugi{margin-top:35px}
  body.template-instrumentpage .pdf-uslugi > h2{font-size:20px;line-height:24px;margin-bottom:16px}
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]{padding:14px 10px;gap:8px;width:auto}
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]::before{width:56px;height:56px}
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid .bn[data-h]{font-size:15px;line-height:19px}
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid .bt[data-h]{font-size:13px;line-height:17.55px}
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]::after{font-size:12px;line-height:16px}
}
