:root {
    color-scheme: light;
    --ink: #222134;
    --muted: #5d606f;
    --accent: #d83a32;
    --accent-hover: #bc2e27;
    --accent-soft: #fff0ee;
    --surface: #fff;
    --canvas: #f5f5f8;
    --main-bg: wheat; /* page body under the header, owner 05.12.2026 */
    --line: #e4e4eb;
    --radius: 18px;
    --font: Inter, 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 300px; min-height: 100vh; margin: 0; display: flex; flex-direction: column; font: 15px/1.5 var(--font); background: var(--canvas); color: var(--ink); }
body > main { flex: 1; background: var(--main-bg); }
a { color: inherit; text-decoration: none; }
a, button, label { -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .43; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #4175c9; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.12; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-header { position: relative; z-index: 30; background: var(--header-bg, #fff); border-bottom: 1px solid var(--line); }
.site-header-inner { min-height: 70px; max-width: 1490px; margin: auto; padding: 0 clamp(16px, 4.2vw, 60px); display: flex; align-items: center; gap: min(5vw, 68px); }
.brand { flex: none; display: flex; gap: 9px; align-items: center; font-size: 22px; font-weight: 850; letter-spacing: -.065em; }
.brand-light { font-weight: 650; }
.brand-icon { flex: none; display: block; width: 38px; height: 38px; }
.quick-nav { display: flex; align-items: center; gap: clamp(15px, 2.5vw, 34px); font-size: 14px; font-weight: 650; }
.quick-nav a:hover, .quick-nav a[aria-current] { color: var(--accent-hover); }
.workspace-active .quick-nav { display: none; }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tool-menu { position: relative; }
.header-lang { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 700; }
.header-lang a, .header-lang span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; color: var(--muted); }
.header-lang a:hover { color: var(--ink); background: var(--accent-soft); }
.header-lang [aria-current] { color: var(--ink); background: #f1f1f5; }
.header-lang .flag { width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px #0000001f; flex: none; }
.header-lang b { font-weight: inherit; }
.tool-menu summary { list-style: none; cursor: pointer; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.tool-menu summary::-webkit-details-marker { display: none; }
.tool-menu summary::after { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 10px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.tool-menu[open] summary::after { transform: rotate(225deg); margin-bottom: 0; }
.tool-menu nav { position: absolute; top: calc(100% + 9px); right: 0; min-width: 205px; max-height: min(70vh, 620px); overflow: auto; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 12px 30px #25254222; }
.tool-menu nav a { display: block; border-radius: 8px; padding: 8px 10px; }
.tool-menu nav a:hover, .tool-menu nav a[aria-current] { background: var(--accent-soft); color: var(--accent-hover); }
@media (max-width: 480px) {
    .header-end { gap: 8px; }
    .header-lang a, .header-lang span { padding: 6px; }
    .header-lang b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    /* "All tools" becomes a hamburger: the label is long in some languages and pushed the header off-screen */
    .tool-menu summary { font-size: 0; padding: 9px 10px; }
    .tool-menu summary::before { content: ''; display: block; width: 18px; height: 2px; margin: 6px 0; border-radius: 1px; background: currentColor; box-shadow: 0 -6px currentColor, 0 6px currentColor; }
    .tool-menu summary::after { display: none; }
}
.site-footer { min-height: 67px; padding: 18px clamp(16px, 4.2vw, 60px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px; align-items: center; color: var(--muted); background: #fff; font-size: 13px; }
.site-footer a { font-weight: 750; color: var(--ink); }
.lang-switch { display: flex; gap: 14px; margin-left: auto; }
.lang-switch a { font-weight: 600; color: var(--muted); }
.lang-switch a:hover { color: var(--ink); }
.lang-switch [aria-current] { color: var(--ink); font-weight: 650; }
.ad-slot { margin: 0 auto; max-width: 1200px; }

.home { background: radial-gradient(ellipse at 50% 2%, #fff5f3 0, transparent 52%), var(--main-bg); padding: 58px 22px 34px; }
.hero { text-align: center; max-width: 920px; margin: 0 auto 27px; }
.hero h1 { font-size: clamp(2.35rem, 5vw, 4rem); font-weight: 800; letter-spacing: -.064em; text-wrap: balance; }
.hero h1 em { color: var(--accent-hover); font-style: normal; }
.hero p, .tool-intro p { margin: 15px auto 0; max-width: 620px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.17rem); text-wrap: pretty; }
.catalog-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 auto 14px; }
.catalog-filters a { padding: 6px 12px; border-radius: 8px; border: 1px solid transparent; color: #515366; font-size: 13px; font-weight: 680; }
.catalog-filters a:hover { background: #fff; }
.catalog-filters a[aria-current] { border-color: #ecd4d1; background: #fff; color: var(--accent-hover); }
.catalog { width: min(1136px, 100%); margin: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.tool-card { position: relative; display: block; min-width: 0; min-height: 173px; padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 16px; transition: border-color .16s, box-shadow .16s, transform .16s; }
.tool-card:hover { border-color: var(--icon-color); transform: translateY(-3px); box-shadow: 0 8px 22px #2023350c; }
.tool-card h2 { margin: 13px 0 5px; font-size: 1.05rem; letter-spacing: -.02em; }
.tool-card p { color: var(--muted); font-size: .91rem; line-height: 1.42; }
.tool-icon { position: relative; display: block; width: 45px; height: 45px; border-radius: 12px; background: var(--icon-bg); color: var(--icon-color); }
.tone-merge { --icon-color: #b83129; --icon-bg: #ffe8e5; }
.tone-organize { --icon-color: #245999; --icon-bg: #e8f1ff; }
.tone-sign { --icon-color: #784aa0; --icon-bg: #f4eafb; }
.tone-split { --icon-color: #ad4a20; --icon-bg: #ffefe4; }
.tone-extract { --icon-color: #246c66; --icon-bg: #e3f5f0; }
.tone-remove { --icon-color: #a73b5a; --icon-bg: #faeaf0; }
.tone-rotate { --icon-color: #6351a5; --icon-bg: #eeeafe; }
.tone-image { --icon-color: #35683d; --icon-bg: #e9f5e9; }
.tool-icon i, .tool-icon b { position: absolute; display: block; }
.tool-icon i { inset: 10px 13px; border: 1.7px solid currentColor; border-radius: 3px; }
.tool-icon i::before, .tool-icon i::after { content: ''; position: absolute; height: 1.5px; background: currentColor; left: 3px; right: 3px; top: 7px; }
.tool-icon i::after { top: 12px; right: 5px; }
.icon-merge i { transform: translate(-4px, -2px); background: var(--icon-bg); z-index: 1; }
.icon-merge b { inset: 13px 8px 7px 18px; border: 1.7px solid; border-radius: 3px; }
.icon-organize i { inset: 10px 23px 23px 10px; box-shadow: 12px 0, 0 12px, 12px 12px; }
.icon-organize i::before, .icon-organize i::after, .icon-image i::before, .icon-sign i::before, .icon-sign i::after, .icon-split i::before, .icon-split i::after { display: none; }
.icon-sign b { width: 5px; height: 19px; right: 12px; top: 12px; border: 1.5px solid; border-radius: 2px 2px 50% 50%; transform: rotate(40deg); background: var(--icon-bg); }
.icon-split i { inset-inline: 10px 24px; }
.icon-split b { inset: 10px 10px 10px 24px; border: 1.7px solid; border-radius: 3px; }
.icon-extract b, .icon-remove b, .icon-rotate b { inset: 17px 5px 6px 21px; background: var(--icon-bg); text-align: center; line-height: 22px; }
.icon-extract b::before { content: '↗'; }
.icon-remove b::before { content: '−'; }
.icon-rotate b::before { content: '↷'; }
.icon-image i { inset: 12px 10px; }
.icon-image i::after { left: 4px; top: 6px; width: 11px; height: 8px; background: none; border: solid; border-width: 1.6px 0 0 1.6px; transform: rotate(36deg); }
.card-arrow { position: absolute; top: 20px; right: 19px; color: #696978; font-size: 17px; }
.privacy-note { display: flex; justify-content: center; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.privacy-dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #3a8c65; }
.home-privacy { margin-top: 29px; }
.missing { text-align: center; padding: 70px 20px; }
.missing a { color: var(--accent-hover); text-decoration: underline; }

.button { min-height: 38px; padding: 7px 12px; display: inline-flex; justify-content: center; align-items: center; gap: 6px; border: 1px solid #dedee7; border-radius: 9px; background: #fff; color: var(--ink); font-weight: 690; line-height: 1.25; text-align: center; }
.button:hover:not(:disabled) { background: #f4f4f8; border-color: #c9c9d6; }
.button.primary { border-color: transparent; background: var(--accent); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); }
.button.danger { color: var(--accent-hover); }
.button.icon-button { width: 39px; padding-inline: 0; font-size: 19px; }
.text-button { border: 0; border-radius: 5px; background: transparent; color: var(--accent-hover); font-size: 13px; font-weight: 700; padding: 4px 1px; }
.text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }

.tool-start { text-align: center; padding: clamp(47px, 7.1vw, 97px) 20px 45px; background: radial-gradient(ellipse at 50% 10%, #fff4f1, transparent 52%); }
.tool-intro h1 { font-size: clamp(2rem, 5.3vw, 3.45rem); font-weight: 800; letter-spacing: -.055em; text-wrap: balance; }
.tool-intro p { max-width: 640px; }
.drop-zone { min-height: 288px; width: min(634px, 100%); padding: 33px 20px 24px; display: grid; justify-items: center; align-content: center; margin: 31px auto 18px; background: #ffffffd9; border: 1.5px dashed #d5d3df; border-radius: 21px; }
.drop-zone.is-dragged { background: var(--accent-soft); border-color: var(--accent); }
.file-stack { width: 88px; height: 79px; position: relative; margin-bottom: 9px; color: #ac362f; }
.file-stack > i, .file-stack > span { position: absolute; left: 21px; top: 6px; width: 47px; height: 60px; border: 1.5px solid #e8a8a2; border-radius: 8px; background: #fde6e2; }
.file-stack > i:first-child { transform: translateX(-15px) rotate(-15deg); }
.file-stack > i:nth-child(2) { transform: translateX(16px) rotate(15deg); }
.file-stack > span { display: grid; place-items: center; font-weight: 830; font-size: 15px; background: #fff6f4; border-color: #d9766d; box-shadow: 0 4px 9px #ab403225; }
.picker { min-height: 56px; min-width: min(265px, 100%); border-radius: 12px; font-size: 1.1rem; padding: 13px 24px; }
.drop-zone p { margin: 13px 0 5px; color: var(--muted); }
.format-note { color: #686a79; font-size: 12px; letter-spacing: .03em; }
.feedback { max-width: 1320px; margin: 13px auto 0; padding: 9px 13px; border: 1px solid #bbd9c8; border-radius: 10px; color: #295a46; background: #eef8f1; white-space: pre-line; }
.feedback.is-error { color: #8d211d; background: #fff1ef; border-color: #efc2bd; }
.tool-start:not([hidden]) ~ .feedback { max-width: min(634px, calc(100% - 40px)); margin: -27px auto 28px; }

.editor { max-width: 1400px; margin: 0 auto; padding: 23px clamp(14px, 3vw, 40px) 38px; }
.editor-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 0 16px; }
.session-count { color: var(--muted); font-size: 13px; font-weight: 620; margin-bottom: 3px; }
.editor-heading h1 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); letter-spacing: -.048em; }
.editor-top-actions { display: flex; gap: 6px; align-items: center; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 305px); gap: 14px; align-items: start; }
.editor-main, .options { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.editor-main { overflow: hidden; background: #edeef3; }
.workspace-bar { min-height: 55px; display: flex; align-items: center; gap: 9px; justify-content: space-between; padding: 7px 13px; border-bottom: 1px solid var(--line); background: #fff; }
.view-switch { display: flex; align-items: center; max-width: 100%; gap: 2px; background: #eeeef3; border-radius: 9px; padding: 3px; }
.view-switch button { border: 0; background: transparent; color: #444657; padding: 5px 9px; min-height: 31px; border-radius: 7px; font-size: 13px; font-weight: 670; }
.view-switch button[aria-pressed="true"] { color: var(--ink); background: #fff; box-shadow: 0 1px 3px #2222381b; }
.bar-actions { display: flex; align-items: center; gap: 9px; }
.selection-count { font-size: 12px; font-weight: 650; color: var(--muted); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); align-content: start; gap: 12px; min-height: 350px; max-height: min(65vh, 790px); padding: 15px; overflow: auto; }
.item-card { min-width: 0; background: #fff; border: 1px solid #dedee7; border-radius: 12px; padding: 8px; box-shadow: 0 2px 4px #2525420b; }
.item-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.item-card[draggable="true"] .thumb { cursor: grab; }
.item-card.drag-target { outline: 2px solid #4779c8; outline-offset: 2px; }
.thumb { min-width: 0; height: 151px; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; position: relative; border-radius: 7px; overflow: hidden; background: #f4f4f8; }
.thumb > img { max-width: 90%; max-height: 90%; object-fit: contain; background: #fff; box-shadow: 0 2px 6px #11162c26; }
.thumb > .preview-button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.thumb > .placeholder { color: #646579; font-size: 12px; }
.thumb > label { position: absolute; top: 5px; right: 5px; z-index: 1; padding: 5px; display: grid; place-items: center; background: #ffffffec; border-radius: 6px; cursor: pointer; }
.thumb input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.item-label { margin: 7px 2px 2px; font-size: 13px; font-weight: 730; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.item-description { margin: 0 2px 7px; font-size: 12px; color: var(--muted); text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.item-controls { display: flex; gap: 5px; }
.item-controls .button { flex: 1; min-height: 28px; padding: 3px; font-weight: 670; }
.items-empty { grid-column: 1 / -1; min-height: 245px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.options { padding: 16px; background: #fff; }
.options h2 { margin-bottom: 9px; font-size: 15px; letter-spacing: -.01em; }
.options p.hint { margin: 7px 0; font-size: 13px; color: var(--muted); }
.action-group { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 13px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.action-grid .button { padding-inline: 4px; font-size: 13px; }
.action-group > .text-button { margin-top: 7px; }
.option-stack { display: grid; gap: 7px; }
.option-stack .button { justify-content: flex-start; text-align: left; }
.option-stack label { font-size: 13px; font-weight: 690; }
.option-stack input:not([type="checkbox"]), .option-stack select, .signature-form input:not([type="file"]), .viewer-navigation input { min-height: 37px; width: 100%; padding: 6px 8px; background: #fff; color: var(--ink); border: 1px solid #d7d7e1; border-radius: 8px; }
.option-stack input[type="range"] { padding: 0; min-height: 25px; accent-color: var(--accent); }
.checkbox-line { display: flex; align-items: center; gap: 7px; }
.checkbox-line input { accent-color: var(--accent); }
.export-actions { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; display: grid; gap: 8px; }
.export-actions > .primary { min-height: 49px; font-size: 15px; }
.export-actions .privacy-note { font-size: 12px; }
.viewer-navigation { display: flex; align-items: center; gap: 7px; }
.viewer-navigation input { width: 52px; text-align: center; appearance: textfield; }
.viewer-navigation input::-webkit-inner-spin-button { appearance: none; }
.viewer-navigation span { font-size: 13px; color: var(--muted); }
.viewer-scroll { display: flex; justify-content: center; align-items: flex-start; min-height: 385px; height: min(68vh, 850px); overflow: auto; padding: 16px; }
.sheet { width: min(100%, 690px); position: relative; line-height: 0; background: #fff; box-shadow: 0 3px 15px #23243a2e; }
.viewer-scroll.zoomed { justify-content: flex-start; }
.viewer-scroll.zoomed .sheet { width: min(calc(100% * var(--zoom)), calc(690px * var(--zoom))); flex: 0 0 auto; }
.sheet > canvas { display: block; width: 100%; height: auto; }
.signature-layer { position: absolute; inset: 0; line-height: normal; }
.signature-layer.is-placing { cursor: crosshair; }
.signature-layer.is-drawing { touch-action: none; }
.signature-layer.is-placing .placed-signature { pointer-events: none; }
.placed-signature { position: absolute; display: block; width: 1px; height: 1px; padding: 0; border-width: 0; background: transparent; transform-origin: 0 0; font: inherit; }
.placed-signature canvas { display: block; height: 100%; width: 100%; }
.placed-signature.is-selected { outline: 1px dashed #215cb3; outline-offset: 2px; cursor: move; touch-action: none; }
.placed-signature:focus-visible { outline: 2px solid #215cb3; }
.dialog { width: min(486px, calc(100vw - 28px)); max-height: 90vh; padding: 19px; border: 1px solid var(--line); border-radius: 17px; background: #fff; color: var(--ink); box-shadow: 0 15px 55px #22233335; }
.dialog::backdrop { background: #20233665; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.dialog-heading h2 { font-size: 1.29rem; }
.signature-tabs { width: fit-content; margin-bottom: 13px; }
.signature-form { display: grid; gap: 8px; }
.signature-form canvas { width: 100%; border: 1px solid #d9dae5; border-radius: 10px; touch-action: none; background: #fbfbfd; cursor: crosshair; }
.signature-form label { font-size: 13px; font-weight: 680; }
.signature-form input[type="file"] { max-width: 100%; }
.dialog-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 15px; }
.dialog-error { color: #962b25; font-size: 13px; margin-top: 5px; }
.result-files { display: grid; gap: 8px; }
.result-row { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 8px 0; }
.result-row > span { overflow-wrap: anywhere; font-size: 13px; }
.result-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.result-zip { width: 100%; margin-top: 12px; }
.mobile-toolbar, .mobile-options-heading { display: none; }

@media (max-width: 900px) {
    .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .editor-grid { grid-template-columns: minmax(0, 1fr) 240px; }
}
@media (max-width: 700px) {
    .quick-nav { display: none; }
    .site-header-inner { min-height: 59px; }
    .home { padding: 38px 14px 28px; }
    .hero { margin-bottom: 22px; }
    .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .tool-card { min-height: 155px; padding: 13px; }
    .card-arrow { right: 12px; top: 13px; }
    .editor { padding-bottom: 110px; }
    .editor-grid { grid-template-columns: minmax(0, 1fr); }
    .items { min-height: 230px; max-height: 47vh; }
    .viewer-scroll { min-height: 285px; height: 44vh; padding: 9px; }
    .editor-heading { align-items: start; display: grid; }
    .editor-top-actions { justify-content: start; }
    .options { display: none; }
    .options.is-open { display: block; position: fixed; z-index: 6; left: 8px; right: 8px; bottom: calc(75px + env(safe-area-inset-bottom)); max-height: min(53vh, 420px); padding: 13px; overflow: auto; box-shadow: 0 8px 34px #25254238; }
    body:not(.first-signature-action) .options .export-actions { display: none; }
    .options .privacy-note { display: none; }
    .mobile-options-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 13px; }
    .mobile-toolbar { position: fixed; z-index: 7; bottom: 0; left: 0; right: 0; display: block; padding: 9px 14px calc(9px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 18px #20233a13; }
    .mobile-toolbar > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
    .mobile-toolbar .button { min-height: 44px; }
    .mobile-toolbar p { margin-bottom: 5px; text-align: center; color: var(--muted); font-size: 12px; }
}
@media (max-width: 400px) {
    .catalog-filters { gap: 4px; }
    .catalog-filters a { padding-inline: 5px; font-size: 12px; }
    .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 9px; }
    .thumb { height: 124px; }
    .workspace-bar { padding-inline: 8px; }
    .view-switch button { padding-inline: 6px; }
    .selection-count { display: none; }
}
@font-face { font-family: 'Toolkit PDF Sans'; src: url('/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf') format('truetype'); font-display: swap; }
.viewer-commands { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.viewer-commands select { color: var(--ink); padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.viewer-note { margin: 0; padding: 8px 12px; background: var(--accent-soft); color: var(--accent-hover); font-size: 13px; }
.camera-pick { display: flex; margin: 8px auto 0; }
#camera-video { width: 100%; max-height: min(55vh, 520px); border-radius: 9px; background: #1e2130; }
#result-summary { font-size: 14px; margin: 5px 0 12px; color: var(--muted); }
#page-text-content { display: block; resize: vertical; width: 100%; min-height: 165px; max-height: 50vh; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.option-stack input[type="color"] { width: 54px; padding: 4px; cursor: pointer; }
.placed-signature.placed-text { font-family: 'Toolkit PDF Sans', sans-serif; font-weight: normal; text-align: left; line-height: 1.25; white-space: nowrap; }
.placed-signature.placed-note { display: grid; place-items: center; min-width: 12px; min-height: 12px; background: #ffdf71; border-color: #c48c16; color: #473705; line-height: 1; border-radius: 3px; }
.placed-signature.gesture-preview { pointer-events: none; }
.crop-preview { position: absolute; border: 2px dashed var(--accent); box-shadow: 0 0 0 9000px #27304a26; pointer-events: none; }
#signature-layer:has(.crop-preview) { overflow: hidden; }
.tone-edit, .tone-ocr { --icon-color: #982b63; --icon-bg: #fcecf3; }
.tone-compress { --icon-color: #975021; --icon-bg: #fff1e5; }
.tone-color, .tone-view, .tone-scan { --icon-color: #216985; --icon-bg: #e7f4f8; }
.tool-icon:is(.icon-edit, .icon-compress, .icon-color, .icon-view, .icon-ocr, .icon-scan) { display: grid; place-items: center; }
.tool-icon:is(.icon-edit, .icon-compress, .icon-color, .icon-view, .icon-ocr, .icon-scan) i { display: none; }
.icon-edit::before { content: '✎'; font-size: 29px; }
.icon-compress::before { content: '⇥⇤'; font-size: 19px; }
.icon-color::before { content: '◐'; font-size: 24px; }
.icon-view::before { content: '◉'; font-size: 23px; }
.icon-ocr::before { content: 'Aa'; font-size: 21px; font-weight: 720; }
.icon-scan::before { content: '▤'; font-size: 25px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
.conversion-start { max-width: 760px; margin: 24px auto; text-align: left; }
.conversion-inputs { display: grid; gap: 12px; padding: 24px; border: 1px solid var(--line, #dbe2ed); border-radius: 16px; background: #fff; }
.conversion-inputs h2 { margin: 0; font-size: 1.15rem; }
.conversion-inputs input, .conversion-inputs select { width: 100%; padding: 12px; border: 1px solid #ced5df; border-radius: 8px; font: inherit; }
.conversion-file { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e4e8ef; padding: 8px 0; }
.conversion-file span { min-width: 0; overflow-wrap: anywhere; }
.analysis-report { width: 100%; height: min(60vh, 560px); border: 1px solid #dbe2ed; border-radius: 8px; background: white; }
.analysis-report.compact-report { height: min(40vh, 285px); }
.result-dialog.has-report { width: min(1050px, calc(100vw - 32px)); max-width: 1050px; }
.has-conversion-files .drop-zone { padding: 20px; min-height: 0; }
.has-conversion-files .drop-zone .file-stack, .has-conversion-files .drop-zone > p { display: none; }
.has-conversion-files .drop-zone .format-note { margin-top: 10px; }
#result-summary { white-space: pre-line; }
@media(max-width:600px) { .conversion-inputs { padding: 16px; } .conversion-start { margin: 16px 0; } }
.advanced-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.advanced-grid label { grid-column: 1; align-self: center; font-size: 13px; }
.advanced-grid input { grid-column: 2; min-width: 0; width: 100%; }
.option-stack textarea, .conversion-inputs textarea { width: 100%; resize: vertical; padding: 10px; border: 1px solid var(--line, #dbe2ed); border-radius: 7px; font: inherit; font-size: 14px; min-width: 0; }
.advanced-details { border-top: 1px solid #e1e5ec; padding-top: 14px; display: grid; gap: 9px; }
.advanced-details summary { cursor: pointer; font-weight: 650; margin-bottom: 12px; }
.advanced-details[open] > :not(summary) { margin-top: 9px; }
.advanced-fields, .advanced-candidates { max-height: 290px; overflow: auto; display: grid; gap: 12px; padding: 2px; }
.advanced-fields label { display: grid; gap: 5px; font-size: 14px; }
.advanced-fields label small { font-weight: 400; color: #627088; }
.advanced-fields label.advanced-checkbox-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.advanced-fields .advanced-checkbox-field input { width: 18px; height: 18px; }
.advanced-pending { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid #e7eaf0; }
.advanced-file { overflow-wrap: anywhere; }
.advanced-password { display: block; overflow-wrap: anywhere; font: 20px/1.6 monospace; padding: 14px; min-height: 62px; border: 1px solid #dbe2ed; border-radius: 8px; background: #f5f7fb; user-select: all; }
.advanced-selection { position: absolute; pointer-events: none; background: #263b6b22; border: 2px solid #e84d4d; z-index: 15; }
.sheet { isolation: isolate; }
.advanced-preview { color: #fff; font: 600 12px/20px system-ui; text-shadow: 0 1px 2px #000; background: #263b6b33; }
.advanced-start.has-conversion-files { padding-top: 28px; }
.advanced-start.has-conversion-files .tool-intro h1 { font-size: clamp(27px, 3vw, 40px); }
.advanced-start.has-conversion-files .drop-zone { margin-top: 20px; padding: 12px; }
.advanced-start.has-conversion-files .drop-zone .picker { font-size: 16px; min-height: 42px; padding: 10px 22px; }
.advanced-start.has-conversion-files .drop-zone .format-note { display: none; }
.studio-start { max-width: 1060px; margin-inline: auto; }
.studio-start .tool-intro { max-width: 790px; margin-inline: auto; }
.studio-panel { margin: 26px auto 0; max-width: 820px; text-align: left; border: 1px solid var(--line, #dce4e9); background: var(--paper, #fff); border-radius: 18px; overflow: hidden; }
.studio-fields { padding: 28px; display: grid; gap: 18px; }
.studio-field { display: grid; gap: 7px; min-width: 0; font-size: 14px; font-weight: 550; }
.studio-field input, .studio-field textarea, .studio-field select { width: 100%; min-width: 0; border: 1px solid #bdcbd4; border-radius: 8px; padding: 11px 12px; background: #fff; color: #203849; font: inherit; font-weight: 400; }
.studio-field textarea { resize: vertical; line-height: 1.65; }
.studio-field :focus-visible { outline: 3px solid #92c6d0; outline-offset: 2px; }
.studio-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.studio-source, .studio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.studio-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid #dce4e9; }
.studio-file-name { overflow-wrap: anywhere; color: #536c7d; }
.studio-submit { padding: 22px 28px; border-top: 1px solid #dce4e9; background: #f4f8fa; }
.studio-submit .hint { margin: 12px 0 0; }
.studio-submit #studio-progress:empty { display: none; }
.studio-submit #studio-progress { color: #245a62; }
.studio-templates, .studio-party, .studio-extract { border: 1px solid #dce4e9; border-radius: 10px; padding: 14px 16px; }
.studio-panel summary { cursor: pointer; font-weight: 650; color: #285863; }
.studio-panel details[open] > summary { margin-bottom: 16px; }
.studio-additional { margin-top: 14px; padding-top: 12px; border-top: 1px solid #dce4e9; }
.studio-panel .hint { line-height: 1.6; margin: 0; }
.studio-extract > * + * { margin-top: 14px; }
.studio-subtitle { font-size: 19px; margin: 4px 0 -2px; }
.studio-lines { display: grid; gap: 12px; }
.studio-line { display: grid; gap: 14px; padding: 16px; background: #f4f8fa; border-radius: 10px; }
.studio-line .studio-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.studio-line .text-button { justify-self: start; }
.studio-paper { padding: 28px; border: 1px solid #d5dfe7; background: #fff; color: #213547; border-radius: 5px; box-shadow: 0 4px 20px #253e4c09; }
.studio-eyebrow { font-size: 12px; color: #587485; text-transform: uppercase; letter-spacing: .07em; }
.studio-paper h3 { font-size: 24px; margin: 12px 0; }
.studio-paper table { width: 100%; border-collapse: collapse; font-size: 13px; }
.studio-paper td, .studio-paper th { text-align: left; padding: 10px 5px; border-bottom: 1px solid #dce4e9; overflow-wrap: anywhere; }
.studio-paper td:first-child { width: 60%; }
.studio-paper p { font-size: 14px; }
.studio-confirm { align-items: start; line-height: 1.6; }
.studio-confirm input { margin-top: 5px; flex-shrink: 0; }
.studio-source-text { white-space: pre-wrap; max-height: 300px; overflow: auto; background: #f4f8fa; padding: 14px; font: 13px/1.6 system-ui; }
.studio-images { padding-left: 24px; margin: 0; }
.studio-images li { padding: 5px; }
.studio-images li span { overflow-wrap: anywhere; }
.studio-chat article { padding: 16px; border-left: 3px solid #60a4ad; background: #f2f7f8; margin-top: 12px; }
.studio-chat p { white-space: pre-wrap; line-height: 1.7; }
@media (max-width: 600px) { .has-invoice-report .analysis-report { height: min(58vh,490px); } }
@media (max-width: 600px) {
    .studio-panel { border-radius: 12px; margin-top: 20px; }
    .studio-fields { padding: 18px 14px; gap: 16px; }
    .studio-grid { grid-template-columns: 1fr; gap: 13px; }
    .studio-line .studio-grid { grid-template-columns: 1fr; }
    .studio-submit { padding: 18px 14px; }
    .studio-submit .primary { width: 100%; justify-content: center; }
    .studio-paper { padding: 18px 12px; }
    .studio-paper .studio-grid { gap: 0; }
    .studio-party, .studio-extract, .studio-templates { padding: 12px; }
    .studio-source { align-items: flex-start; flex-direction: column; }
}
/* Reusable workflows, saved versions and controlled exchange. */
.exchange-workspace { max-width:1200px; margin:auto; padding:32px 24px 64px; }
.exchange-intro { max-width:850px; margin:0 0 24px; }
.exchange-intro h1 { font-size:clamp(1.9rem,4vw,2.6rem); line-height:1.15; margin:0 0 12px; }
.exchange-intro>p { color:#586274; font-size:1.05rem; line-height:1.6; }
.exchange-tabs,.exchange-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:16px 0; }
.exchange-tabs a { padding:8px 12px; border-radius:8px; color:#475268; text-decoration:none; background:#fff; border:1px solid #dce2ec; }
.exchange-tabs a[aria-current] { background:var(--accent-soft); color:var(--accent); border-color:#eab8b5; }
.exchange-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:24px; }
.exchange-card { min-width:0; padding:24px; background:#fff; border:1px solid #dfe4ee; border-radius:14px; }
.exchange-card h2 { font-size:1.3rem; margin:0 0 16px; }
.exchange-card h3 { font-size:1.05rem; margin:16px 0 10px; }
.exchange-card p,.exchange-public p { line-height:1.6; overflow-wrap:anywhere; }
.exchange-workspace label,.exchange-public label { display:grid; gap:7px; font-size:.9rem; font-weight:550; margin:14px 0; }
.exchange-workspace input:not([type=checkbox]),.exchange-workspace select,.exchange-workspace textarea,.exchange-public input:not([type=checkbox]),.exchange-public select { width:100%; min-width:0; border:1px solid #cbd3e0; border-radius:7px; background:#fff; color:#27334b; padding:10px; font:inherit; min-height:42px; }
.exchange-workspace textarea { min-height:125px; resize:vertical; }
.exchange-workspace input[type=file] { white-space:normal; font-size:.9rem; }
.exchange-workspace .checkbox-line,.exchange-public .checkbox-line { display:flex; align-items:flex-start; gap:10px; line-height:1.5; font-weight:400; }
.exchange-workspace .checkbox-line input,.exchange-public .checkbox-line input { flex:0 0 auto; margin:3px 0 0; width:18px; height:18px; }
.exchange-account,.exchange-section-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
.exchange-section-heading h2 { margin:0; }
.account-card { max-width:540px; }
.exchange-list-row { padding:16px 0; border-bottom:1px solid #e4e8ef; overflow-wrap:anywhere; }
.exchange-list-row p { margin:6px 0; color:#596579; font-size:.9rem; }
.exchange-list-row .exchange-actions { margin:12px 0 0; }
#cloud-providers .exchange-list-row>span { display:block; margin-top:6px; color:#596579; }
.exchange-output { overflow-wrap:anywhere; }
.exchange-output:empty { display:none; }
.workflow-steps { margin:0 0 20px; padding-left:24px; }
.workflow-steps li { padding:0 0 14px 5px; margin-top:14px; border-bottom:1px solid #e4e8ef; }
.workflow-steps li::marker { font-weight:650; color:#4a5c84; }
.workflow-step label { margin:8px 0; }
.exchange-workspace .is-error { color:#a42239; }
.recipient-row { min-width:0; border:1px solid #dfe4ee; border-radius:8px; margin:18px 0; padding:16px; }
.recipient-geometry { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.recipient-geometry label { font-size:.875rem; }
.request-status { border-top:1px solid #dfe4ee; padding:8px 0 20px; }
.request-person { margin:12px 0; padding:12px; background:#f5f7fc; border-radius:8px; overflow-wrap:anywhere; }
.request-person p { margin:5px 0; }
.request-person input { font-size:.875rem !important; margin-top:10px; }
.request-status details { font-size:.9rem; line-height:1.6; margin-top:16px; }
.request-status summary { cursor:pointer; color:#334d80; }
.request-preview-sheet,#public-sheet { position:relative; width:fit-content; max-width:100%; margin:16px auto; }
.request-preview-sheet canvas,#public-sheet canvas { display:block; width:100%; height:auto; }
.signature-target { position:absolute; border:2px dashed #245aca; background:#e9f0ffb0; color:#163c88; display:flex; align-items:center; justify-content:center; overflow:hidden; font-size:14px; white-space:nowrap; }
.exchange-public { max-width:1050px; margin:auto; padding:24px; }
.exchange-public>.brand { display:block; font-size:1.05rem; margin-bottom:24px; }
.exchange-public h1 { font-size:clamp(1.5rem,4vw,2rem); overflow-wrap:anywhere; }
.exchange-public .exchange-actions input { max-width:80px; }
.public-preview { padding:12px; background:#e6eaf2; border-radius:10px; margin:20px 0; }
#recipient-canvas { width:100%; height:auto; background:#f5f7fc; border:1px solid #cdd7e9; border-radius:8px; touch-action:none; }
@media(max-width:760px) { .exchange-grid { grid-template-columns:minmax(0,1fr); gap:18px; } .exchange-workspace { padding:24px 16px 48px; } .exchange-card { padding:20px; } .exchange-tabs { gap:7px; } .exchange-tabs a { padding:8px 10px; font-size:.9rem; } .exchange-public { padding:16px; } .public-preview { padding:4px; } }

/* Tool description under the tool (app/describe.php, rules .planning/describe/RULES.md) */
.tool-about { max-width: 960px; margin: 0 auto; padding: 56px 20px 64px; line-height: 1.6; }
.tool-about h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -.03em; margin: 52px 0 18px; }
.tool-about h2:first-child { margin-top: 0; }
.tool-about h3 { font-size: 1.05rem; font-weight: 750; margin: 0 0 6px; line-height: 1.3; }
.about-why { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.about-why li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.about-why li:first-child { border-color: #f3c9c6; background: linear-gradient(180deg, var(--accent-soft), #fff 70%); }
.about-why p { color: var(--muted); }
.about-cases { display: grid; gap: 40px; }
.about-case h3 { font-size: 1.2rem; margin-bottom: 8px; }
.about-case__task { color: var(--muted); margin: 0 0 10px; }
.about-case__steps { margin: 0 0 16px; padding-left: 1.4em; }
.about-case__steps li { padding: 2px 0; }
.about-case img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 30px rgba(34, 33, 52, .07); }
.about-features { margin: 0; padding: 0; list-style: none; columns: 2 300px; column-gap: 34px; }
.about-features li { break-inside: avoid; padding: 0 0 9px 26px; position: relative; }
.about-features li::before { content: ""; position: absolute; left: 3px; top: .5em; width: 11px; height: 6px; border: solid var(--accent); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
.about-how { margin: 0; padding: 0; list-style: none; counter-reset: how; display: grid; gap: 12px; }
.about-how li { counter-increment: how; position: relative; padding: 2px 0 0 46px; min-height: 32px; }
.about-how li::before { content: counter(how); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; }
.about-faq { display: grid; gap: 10px; }
.about-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.about-faq summary { cursor: pointer; list-style: none; padding: 15px 28px 15px 0; position: relative; }
.about-faq summary::-webkit-details-marker { display: none; }
.about-faq summary::after { content: "+"; position: absolute; right: 0; top: 11px; font-size: 22px; color: var(--accent); }
.about-faq details[open] summary::after { content: "−"; }
.about-faq summary h3 { display: inline; margin: 0; }
.about-faq details p { padding: 0 0 16px; color: var(--muted); }
.about-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.about-related a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; color: var(--ink); text-decoration: none; }
.about-related a:hover { border-color: var(--accent); }
.about-related b { display: block; margin-bottom: 3px; }
.about-related span { font-size: 14px; color: var(--muted); }
@media (max-width: 760px) {
    .tool-about { padding: 40px 16px 48px; }
}
