.compress-pdf-product {
  --cp-ink:var(--ink); --cp-blue:var(--blue); --cp-blue-deep:var(--ink-700);
  --cp-paper:var(--page); --cp-surface:var(--surface); --cp-surface-strong:var(--surface-strong);
  --cp-sunken:var(--surface-sunken); --cp-line:var(--line); --cp-accent:var(--coral);
  width:100%; color:var(--cp-ink); background:transparent;
  font:var(--weight-regular) var(--text-base)/1.45 var(--font-ui);
}
body.p-compress-pdf-product .wrap { width:min(1520px,calc(100% - 96px)); max-width:1520px; }
.compress-pdf-product *,.compress-pdf-product *::before,.compress-pdf-product *::after { box-sizing:border-box; }
.compress-pdf-product button,.compress-pdf-product input { font:inherit; }
.compress-pdf-product button,.compress-pdf-product a { -webkit-tap-highlight-color:transparent; }
.compress-pdf-product button:focus-visible,.compress-pdf-product a:focus-visible,.compress-pdf-product input:focus-visible { outline:3px solid var(--cp-accent); outline-offset:3px; }
.compress-pdf-product [hidden] { display:none!important; }
.cp-visually-hidden { width:1px!important; height:1px!important; position:absolute!important; overflow:hidden!important; clip:rect(0 0 0 0)!important; white-space:nowrap!important; }

.cp-intro { padding:clamp(24px,4vh,44px) 0 22px; }
.cp-intro>div { max-width:820px; }
.cp-help { min-height:44px; display:inline-flex; align-items:center; border:0; border-bottom:1px solid var(--cp-blue); padding:0; color:var(--cp-blue); background:transparent; cursor:pointer; font-size:13px; font-weight:750; }
.cp-intro h1 { max-width:14ch; margin:8px 0; font:var(--weight-semibold) clamp(34px,5vw,64px)/.98 var(--font-display); letter-spacing:var(--track-display); }
.cp-intro p { max-width:710px; margin:0; color:var(--muted); font-size:clamp(15px,1.45vw,19px); }

.cp-workbench { min-height:640px; display:grid; grid-template-columns:minmax(0,1fr) clamp(400px,29vw,440px); align-items:stretch; overflow:hidden; border:1px solid var(--cp-line); background:var(--cp-surface); clip-path:polygon(0 0,100% 0,100% calc(100% - 18px),calc(100% - 18px) 100%,0 100%); }
.compress-pdf-product .cp-stage { min-width:0; min-height:640px; position:relative; display:grid; grid-template-rows:minmax(430px,1fr) auto; margin-top:0; overflow:hidden; border-right:1px solid var(--cp-line); background:var(--cp-surface-strong); }
.cp-stage__core { min-width:0; min-height:430px; position:relative; }
.cp-empty { height:100%; min-height:430px; display:grid; grid-template-columns:minmax(320px,.72fr) minmax(390px,1.28fr); align-items:center; gap:24px; padding:28px; transition:background-color .16s ease,box-shadow .16s ease; }
.cp-drop-copy { min-height:320px; display:grid; place-items:center; align-content:center; gap:9px; border:2px dashed var(--cp-blue); padding:28px; text-align:center; background:var(--cp-surface); box-shadow:0 12px 30px rgba(37,49,59,.07); clip-path:polygon(0 0,calc(100% - 18px) 0,100% 18px,100% 100%,18px 100%,0 calc(100% - 18px)); }
.cp-process-sketch { min-width:0; display:grid; grid-template-rows:minmax(0,1fr) auto; margin:0; overflow:hidden; border:1px solid var(--cp-line); background:var(--cp-surface); }
.cp-sketch-steps { min-height:250px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:center; gap:14px; margin:0; padding:24px; list-style:none; }
.cp-sketch-steps li { min-width:0; position:relative; display:grid; place-items:center; align-content:center; gap:10px; text-align:center; }
.cp-sketch-steps li:not(:last-child)::after { content:"→"; position:absolute; top:25px; right:-12px; color:var(--cp-accent); font-weight:850; }
.cp-sketch-steps .cp-process__visual { width:64px; height:64px; }
.cp-sketch-steps b { max-width:12ch; color:var(--cp-blue-deep); font-size:12px; line-height:1.2; }
.cp-sketch-file { aspect-ratio:3/4; position:relative; display:grid; align-content:center; gap:12px; border:1px solid var(--cp-blue-deep); padding:17%; background:var(--cp-surface-strong); clip-path:polygon(0 0,78% 0,100% 16%,100% 100%,0 100%); }
.cp-sketch-file::after { content:""; position:absolute; top:0; right:0; width:22%; height:16%; border-left:1px solid var(--cp-blue-deep); border-bottom:1px solid var(--cp-blue-deep); }
.cp-sketch-file i { height:1px; display:block; background:var(--cp-blue); box-shadow:0 7px var(--cp-blue),0 14px var(--cp-blue); }
.cp-sketch-file--source::before,.cp-sketch-file--result::before { content:""; height:34%; border:1px dotted var(--cp-blue); background:radial-gradient(circle,var(--cp-blue) 1px,transparent 1.4px) 0 0/6px 6px; }
.cp-sketch-file--result { transform:scale(.72); }
.cp-sketch-samples { display:grid; grid-template-columns:repeat(3,1fr); align-items:center; gap:13px; }
.cp-sketch-samples i { aspect-ratio:1; background:radial-gradient(circle,var(--cp-blue) 2px,transparent 2.4px) 0 0/9px 9px; }
.cp-sketch-samples i:nth-child(2) { background-size:14px 14px; }
.cp-sketch-samples i:nth-child(3) { background-size:22px 22px; }
.cp-sketch-samples i+ i { position:relative; }
.cp-sketch-samples i+ i::before { content:"→"; position:absolute; left:-18px; top:50%; color:var(--cp-accent); transform:translateY(-50%); font-weight:800; }
.cp-process-sketch figcaption { display:grid; gap:4px; padding:11px 13px; border-top:1px solid var(--cp-line); background:var(--blue-soft); }
.cp-process-sketch figcaption b { font:var(--weight-semibold) 14px/1.2 var(--font-display); }
.cp-process-sketch figcaption span { color:var(--muted); font-size:12px; line-height:1.35; }
.cp-process-sketch figcaption button { min-height:44px; justify-self:start; border:0; border-bottom:1px solid var(--cp-blue); padding:0; color:var(--cp-blue); background:transparent; cursor:pointer; font-weight:800; }
.cp-drop-copy__eyebrow { color:var(--cp-accent); font-size:11px; font-weight:850; letter-spacing:.13em; }
.cp-drop-copy h2 { max-width:16ch; margin:0; font:var(--weight-semibold) clamp(25px,2.5vw,36px)/1.08 var(--font-display); }
.cp-drop-copy p { margin:0; color:var(--muted); font-size:14px; }
.cp-drop-copy small { color:var(--muted); font-size:12px; }
.cp-primary { min-height:50px; display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid var(--cp-blue); padding:10px 19px; color:var(--text-on-brand); background:var(--cp-blue); box-shadow:5px 5px 0 rgba(37,49,59,.14); cursor:pointer; font-weight:800; clip-path:polygon(0 0,calc(100% - 11px) 0,100% 11px,100% 100%,0 100%); }
.cp-primary:hover { background:var(--cp-blue-deep); }
.cp-primary:disabled { opacity:.48; cursor:not-allowed; box-shadow:none; }
.cp-pick { min-width:230px; }
.cp-stage[data-drag-active="true"] .cp-empty { background:var(--blue-soft); box-shadow:inset 0 0 0 4px var(--cp-blue); }
.cp-stage[data-drag-active="true"] .cp-drop-copy { border-style:solid; box-shadow:0 0 0 7px var(--cp-surface-strong),0 0 0 10px var(--cp-blue); }
.compress-pdf-product[data-state="reading"] .cp-pick { pointer-events:none; opacity:.55; }

.cp-process { min-width:0; border-top:1px solid var(--cp-line); padding:15px 20px 16px; background:var(--cp-surface); }
.cp-process__heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.cp-process__heading button { min-height:44px; border:0; padding:0 2px; color:var(--cp-blue); background:transparent; cursor:pointer; font-size:12px; font-weight:800; text-decoration:underline; text-underline-offset:3px; }
.cp-process h3 { margin:0; font:var(--weight-semibold) 16px/1.2 var(--font-display); }
.cp-process ol { position:relative; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; margin:0; padding:0; list-style:none; }
.cp-process ol::before { content:""; position:absolute; top:31px; left:31px; right:31px; height:1px; background:var(--cp-blue); opacity:.4; }
.cp-process li { min-width:0; position:relative; display:grid; grid-template-columns:64px minmax(0,1fr); grid-template-rows:64px; align-content:start; gap:10px; padding-right:14px; }
.cp-process__number { min-width:23px; min-height:16px; position:absolute; z-index:2; left:4px; bottom:4px; display:grid; place-items:center; padding:1px 3px; color:var(--cp-accent); background:var(--cp-surface-strong); font-size:9px; font-weight:850; letter-spacing:.06em; }
.cp-process li[aria-current="step"] .cp-process__visual { border-color:var(--cp-blue); box-shadow:0 0 0 3px var(--blue-soft); }
.cp-process li[aria-current="step"] .cp-process__number { color:var(--cp-blue); }
.compress-pdf-product[data-has-source="false"] .cp-process { display:none; }
.cp-process li p { min-width:0; display:grid; grid-column:2; grid-row:1; align-content:center; gap:2px; margin:0; }
.cp-process li b { font-size:14px; }
.cp-process li small { color:var(--muted); font-size:12px; line-height:1.3; }
.cp-process__visual { width:64px; height:64px; position:relative; z-index:1; display:block; border:1px solid var(--cp-line); background:var(--cp-surface-strong); color:var(--cp-blue); }
.cp-process__visual i,.cp-process__visual em { position:absolute; display:block; border:1px solid currentColor; background:var(--cp-surface-strong); }
.cp-process__visual--file i:first-child { width:26px; height:36px; left:14px; top:14px; }
.cp-process__visual--file i:first-child::after { content:""; width:13px; position:absolute; left:6px; top:12px; border-top:1px solid currentColor; box-shadow:0 5px currentColor,0 10px currentColor; }
.cp-process__visual--file i:last-child { width:17px; height:24px; right:10px; top:21px; background:var(--blue-soft); }
.cp-process__visual--level { display:flex; align-items:flex-end; justify-content:center; gap:4px; padding:13px; }
.cp-process__visual--level i { width:6px; position:static; border:0; background:currentColor; }
.cp-process__visual--level i:nth-child(1) { height:10px; opacity:.45; }
.cp-process__visual--level i:nth-child(2) { height:17px; opacity:.6; }
.cp-process__visual--level i:nth-child(3) { height:25px; opacity:.78; }
.cp-process__visual--level i:nth-child(4) { height:35px; }
.cp-process__visual--process i { width:24px; height:32px; top:15px; border-color:var(--cp-line); }
.cp-process__visual--process i:nth-child(1) { left:8px; }
.cp-process__visual--process i:nth-child(2) { left:20px; background:var(--blue-soft); }
.cp-process__visual--process i:nth-child(3) { left:32px; }
.cp-process__visual--process::after { content:""; width:30px; height:1px; position:absolute; left:17px; top:31px; background:var(--cp-accent); transform:rotate(-28deg); }
.cp-process__visual--compare i:first-child { width:15px; height:35px; left:12px; bottom:12px; }
.cp-process__visual--compare i:nth-child(2) { width:15px; height:22px; right:12px; bottom:12px; background:var(--blue-soft); }
.cp-process__visual--compare em { width:17px; height:8px; left:24px; top:15px; border-width:1px 1px 0 0; transform:rotate(45deg); background:transparent; }
.compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process { grid-row:1; border-top:0; border-bottom:1px solid var(--cp-line); padding:8px 13px; }
.compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-stage__core { grid-row:2; }
.compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process__heading { display:none; }
.compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process ol::before { top:17px; left:17px; right:17px; }
.compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process li { grid-template-columns:34px minmax(0,1fr); grid-template-rows:34px; gap:7px; padding-right:8px; }
.compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process__visual { width:34px; height:34px; }
.compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process__visual>* { display:none; }
.compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process__number { min-width:0; min-height:0; position:absolute; left:0; top:0; bottom:auto; width:34px; height:34px; display:grid; place-items:center; padding:0; color:var(--muted); background:transparent; }
.compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process li p { grid-column:2; grid-row:1; }
.compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process li:not([aria-current="step"]) small { display:none; }

.cp-controls { min-width:0; min-height:640px; display:flex; flex-direction:column; padding:24px 26px 26px; background:var(--cp-surface); }
.cp-controls__title { margin:0 0 14px; font:var(--weight-semibold) 22px/1.1 var(--font-display); }
.cp-modes { margin:0; padding:0; border:0; }
.cp-modes legend { padding:0; font:var(--weight-semibold) 17px/1.2 var(--font-display); }
.cp-modes>p { margin:7px 0 13px; color:var(--muted); font-size:12px; }
.cp-modes>div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.cp-mode { min-height:72px; position:relative; display:flex; align-items:center; padding:9px 12px; border:1px solid var(--cp-line); background:var(--cp-surface-strong); cursor:pointer; }
.cp-mode:has(input:checked) { border-color:var(--cp-accent); box-shadow:inset 5px 0 var(--cp-accent); background:var(--coral-soft); }
.cp-mode input { position:absolute; inline-size:1px; block-size:1px; opacity:0; }
.cp-mode:has(input:focus-visible) { outline:3px solid var(--cp-accent); outline-offset:2px; }
.cp-mode>span { min-width:0; display:grid; }
.cp-mode strong { font-size:14px; }
.cp-mode small { color:var(--muted); font-size:12px; }
.cp-target { display:grid; grid-template-columns:minmax(0,1fr) 105px; align-items:center; gap:7px 12px; margin-top:16px; padding:12px; border-top:2px solid var(--cp-blue); background:var(--blue-soft); }
.cp-target>span:first-child { display:grid; }
.cp-target small { color:var(--muted); font-size:12px; }
.cp-target>small { grid-column:1/-1; }
.cp-target__input { min-width:0; display:flex; align-items:center; border-bottom:2px solid var(--cp-blue-deep); }
.cp-target__input input { width:100%; min-width:0; min-height:44px; border:0; background:transparent; text-align:right; font:var(--weight-semibold) 21px/1 var(--font-display); }
.cp-target__input b { margin-left:5px; }
.cp-target-presets { margin:8px 0 0; border:0; padding:0; }
.cp-target-presets legend { padding:0; color:var(--muted); font-size:12px; font-weight:800; }
.cp-target-presets>div { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.cp-target-presets button { min-height:44px; border:1px solid var(--cp-line); padding:6px 10px; color:var(--cp-blue); background:var(--cp-surface-strong); cursor:pointer; font-size:12px; font-weight:800; }
.cp-target-presets button:hover { border-color:var(--cp-blue); background:var(--blue-soft); }
.cp-run-block { margin-top:12px; padding-top:0; }
.cp-run-block>p:first-child { margin:0 0 9px; color:var(--muted); font-size:13px; }
.cp-run { width:100%; }
.cp-honesty { margin:9px 0 0; color:var(--muted); font-size:12px; }
.cp-help-links { display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:10px; font-size:12px; }
.cp-help-links a,.cp-help-links button { min-height:44px; display:inline-flex; align-items:center; border:0; padding:0; color:var(--cp-blue); background:transparent; cursor:pointer; font-weight:800; text-decoration:underline; text-underline-offset:3px; }
.cp-secondary { min-height:44px; width:100%; display:flex; align-items:center; border:1px solid var(--cp-line); padding:8px 10px; color:var(--cp-blue-deep); background:transparent; cursor:pointer; font-weight:700; text-align:left; text-decoration:none; }

.cp-preview { height:100%; min-height:430px; display:grid; grid-template-columns:88px minmax(0,1fr); grid-template-rows:auto auto minmax(0,1fr) auto; }
.cp-preview__bar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 13px; border-bottom:1px solid var(--cp-line); }
.cp-preview__bar,.cp-view-switch,.cp-preview__controls { grid-column:1/-1; }
.cp-file-name { min-width:0; display:flex; align-items:center; gap:8px; }
.cp-file-name>span { min-width:0; display:grid; }
.cp-file-name strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cp-file-name small { color:var(--muted); }
.cp-link-button { min-height:44px; border:0; padding:6px 10px; color:var(--cp-blue); background:transparent; cursor:pointer; font-weight:800; text-decoration:underline; text-underline-offset:3px; }
.cp-view-switch { display:none; }
.cp-thumbs { min-height:0; display:flex; flex-direction:column; gap:7px; padding:8px; overflow:auto; border-right:1px solid var(--cp-line); background:var(--blue-soft); }
.cp-thumbs button { min-width:70px; min-height:96px; position:relative; display:grid; place-items:center; border:1px solid var(--cp-line); padding:3px; color:var(--cp-blue-deep); background:var(--cp-surface); cursor:pointer; }
.cp-thumbs button[aria-current="true"] { border-color:var(--cp-blue); box-shadow:inset 3px 0 var(--cp-blue); }
.cp-thumbs canvas { max-width:60px; max-height:82px; display:block; background:#fff; }
.cp-thumbs span { position:absolute; right:3px; bottom:2px; min-width:20px; padding:1px 3px; background:var(--cp-surface); font-size:12px; font-weight:800; }
.cp-canvases { min-height:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); background:var(--cp-blue-deep); }
.cp-canvas-panel { min-width:0; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); margin:0; border-right:1px solid rgba(255,255,255,.18); }
.cp-canvas-panel:last-child { border-right:0; }
.cp-canvas-panel figcaption { display:flex; align-items:baseline; gap:8px; padding:7px 11px; color:#fff; font-size:12px; }
.cp-canvas-panel figcaption span { color:#f0c0b6; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.cp-canvas-wrap { min-height:0; position:relative; overflow:auto; display:grid; place-items:center; padding:12px; scrollbar-color:var(--cp-accent) transparent; }
.cp-canvas-wrap canvas { max-width:none; display:block; background:#fff; box-shadow:0 8px 25px rgba(0,0,0,.28); }
.cp-canvas-wait,.cp-result-placeholder { position:absolute; max-width:230px; padding:12px; color:#fff; text-align:center; }
.cp-preview__controls { min-height:56px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 10px; border-top:1px solid var(--cp-line); }
.cp-pages,.cp-zoom { display:flex; align-items:center; gap:7px; }
.cp-pages button,.cp-zoom button,.cp-view-switch button { min-width:44px; min-height:44px; border:1px solid var(--cp-line); color:var(--cp-blue-deep); background:transparent; cursor:pointer; font-weight:800; }
.cp-pages button:disabled { opacity:.35; }
.cp-zoom output { min-width:74px; text-align:center; font-size:12px; }

.cp-result { margin-top:14px; padding:12px; border:1px solid color-mix(in srgb,var(--success) 42%,transparent); background:color-mix(in srgb,var(--success) 7%,transparent); }
.cp-result__heading p { display:grid; margin:0; }
.cp-result__heading strong { font:var(--weight-semibold) 18px/1.2 var(--font-display); }
.cp-result__heading span { margin-top:4px; color:var(--muted); font-weight:800; }
.cp-result dl { display:grid; grid-template-columns:repeat(2,1fr); gap:1px; margin:10px 0; border:1px solid var(--cp-line); background:var(--cp-line); }
.cp-result dl div { min-width:0; display:grid; padding:7px; background:var(--cp-surface); }
.cp-result dt { color:var(--muted); font-size:12px; text-transform:uppercase; }
.cp-result dd { margin:0; overflow-wrap:anywhere; font-weight:800; }
.cp-receipt,.cp-advice { margin:0 0 10px; color:var(--muted); font-size:12px; }
.cp-advice { padding:8px; border-left:3px solid var(--cp-blue); background:var(--blue-soft); }
.cp-result__actions { display:grid; gap:6px; }
.cp-result__actions .cp-primary { width:100%; }
.cp-result__recovery { display:grid; gap:5px; margin-top:10px; padding:10px; border-left:3px solid var(--cp-accent); background:var(--coral-soft); }
.cp-result__recovery p { margin:0; color:var(--muted); font-size:12px; }
.cp-result__recovery>div { display:grid; gap:5px; }
.cp-result__recovery a { min-height:44px; display:flex; align-items:center; color:var(--cp-blue); font-weight:800; }
.cp-toolkit { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); gap:32px; margin-top:22px; padding:22px; border:1px solid var(--cp-line); background:var(--cp-surface-strong); clip-path:polygon(0 0,calc(100% - 16px) 0,100% 16px,100% 100%,16px 100%,0 calc(100% - 16px)); }
.cp-toolkit>div>span { color:var(--cp-accent); font-size:11px; font-weight:850; letter-spacing:.12em; }
.cp-toolkit h2 { margin:5px 0 8px; font:var(--weight-semibold) clamp(20px,2.2vw,28px)/1.08 var(--font-display); }
.cp-toolkit p { margin:0; color:var(--muted); }
.cp-toolkit nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.cp-toolkit a { min-height:112px; display:grid; align-content:center; gap:6px; border:1px solid var(--cp-line); padding:15px; color:var(--cp-ink); background:var(--cp-surface); text-decoration:none; }
.cp-toolkit a:hover { border-color:var(--cp-blue); }
.cp-toolkit a b { color:var(--cp-blue); font:var(--weight-semibold) 15px/1.2 var(--font-display); }
.cp-toolkit a span { color:var(--muted); font-size:13px; }
.compress-pdf-product[data-outcome="original-preserved"] .cp-result { border-color:color-mix(in srgb,var(--cp-accent) 42%,transparent); background:var(--coral-soft); }
.cp-error { margin-top:12px; padding:12px; border:1px solid var(--danger-ink); background:var(--red-100); }
.cp-error p { margin:3px 0 9px; }
.cp-error div div { display:flex; flex-wrap:wrap; gap:8px; }
.cp-error button,.cp-error a { min-height:44px; display:inline-flex; align-items:center; padding:6px 9px; border:1px solid var(--danger-ink); color:var(--danger-ink); background:transparent; font-weight:800; cursor:pointer; }
.compress-pdf-product[aria-busy] .cp-run { animation:cp-pulse 1.2s ease-in-out infinite alternate; }
@keyframes cp-pulse { to { filter:saturate(.65); } }
.cp-noscript a { color:var(--cp-blue); font-weight:800; }
.cp-noscript { padding:20px 0; border-block:1px solid var(--cp-blue); }

.cp-guide-dialog { width:min(820px,calc(100% - 40px)); max-height:min(820px,calc(100dvh - 40px)); grid-template-rows:auto minmax(0,1fr) auto; margin:auto; overflow:hidden; border:1px solid var(--cp-blue); padding:0; color:var(--cp-ink); background:var(--cp-surface-strong); box-shadow:0 26px 90px rgba(23,23,23,.28); clip-path:polygon(0 0,calc(100% - 18px) 0,100% 18px,100% 100%,18px 100%,0 calc(100% - 18px)); }
.cp-guide-dialog[open] { display:grid; }
.cp-guide-dialog::backdrop { background:var(--scrim); }
.cp-guide-dialog__head { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:20px 22px; border-bottom:1px solid var(--cp-line); background:var(--blue-soft); }
.cp-guide-dialog__head small { color:var(--cp-accent); font-size:11px; font-weight:850; letter-spacing:.12em; text-transform:uppercase; }
.cp-guide-dialog__head h2 { margin:3px 0 0; font:var(--weight-semibold) clamp(24px,4vw,38px)/1 var(--font-display); }
.cp-guide-dialog__head button { min-width:72px; min-height:44px; border:1px solid var(--cp-blue); color:var(--cp-blue); background:var(--cp-surface-strong); cursor:pointer; font-weight:800; }
.cp-guide-dialog__body { min-height:0; overflow:auto; padding:22px; }
.cp-guide-dialog__body>p { max-width:62ch; margin:0 0 18px; color:var(--muted); }
.cp-guide-visual { display:grid; margin:0 0 18px; border:1px solid var(--cp-line); background:var(--cp-surface); }
.cp-guide-visual picture { min-height:160px; display:grid; place-items:center; }
.cp-guide-visual img { width:100%; height:auto; max-height:300px; display:block; object-fit:contain; }
.cp-guide-visual figcaption { padding:10px 13px; border-top:1px solid var(--cp-line); color:var(--muted); font-size:12px; }
.cp-guide-dialog__body ol { display:grid; gap:0; margin:0; padding:0; list-style:none; }
.cp-guide-dialog__body li { display:grid; grid-template-columns:42px minmax(0,1fr); gap:12px; padding:14px 0; border-top:1px solid var(--cp-line); }
.cp-guide-dialog__body li>span { color:var(--cp-accent); font-weight:850; }
.cp-guide-dialog__body li b { font:var(--weight-semibold) 16px/1.2 var(--font-display); }
.cp-guide-dialog__body li p { margin:4px 0 0; color:var(--muted); font-size:14px; }
.cp-guide-dialog__body aside { display:grid; grid-template-columns:auto 1fr; gap:7px 18px; margin-top:16px; border-left:4px solid var(--cp-blue); padding:13px 15px; background:var(--blue-soft); }
.cp-guide-dialog__body aside b { grid-row:1/3; }
.cp-guide-dialog__body aside a { color:var(--cp-blue); font-weight:750; }
.cp-guide-dialog__foot { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 22px 18px; border-top:1px solid var(--cp-line); }
.cp-guide-dialog__foot>a { min-height:44px; display:inline-flex; align-items:center; color:var(--cp-blue); font-weight:800; }

@media (max-width:900px) {
  body.p-compress-pdf-product .wrap { width:calc(100% - 32px); }
  .compress-pdf-product { overflow:visible; }
  .cp-intro { padding:12px 0 14px; }
  .cp-intro h1 { margin:3px 0 6px; font-size:31px; }
  .cp-intro p { font-size:14px; }
  .cp-help { min-height:44px; font-size:12px; }
  .cp-workbench { min-height:0; grid-template-columns:minmax(0,1fr); clip-path:polygon(0 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%); }
  .compress-pdf-product .cp-stage { min-height:0; grid-template-rows:auto auto; border-right:0; border-bottom:1px solid var(--cp-line); }
  .cp-stage__core,.cp-empty { min-height:300px; }
  .cp-empty { grid-template-columns:minmax(0,1fr); gap:10px; padding:14px; }
  .cp-drop-copy { width:100%; min-height:272px; gap:6px; padding:20px 14px; }
  .cp-process-sketch { grid-template-rows:auto auto; }
  .cp-sketch-steps { min-height:160px; gap:6px; padding:14px 8px; }
  .cp-sketch-steps .cp-process__visual { width:50px; height:50px; transform:scale(.78); transform-origin:center; }
  .cp-sketch-steps li:not(:last-child)::after { top:19px; right:-6px; }
  .cp-sketch-steps b { font-size:10px; }
  .cp-process-sketch figcaption { padding:9px 11px; }
  .cp-drop-copy h2 { font-size:24px; }
  .cp-pick { width:min(100%,300px); min-width:0; }
  .cp-process { padding:13px 14px; }
  .cp-process__heading { margin-bottom:11px; }
  .cp-process h3 { font-size:15px; }
  .cp-process ol { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .cp-process ol::before { display:none; }
  .cp-process li { grid-template-columns:50px minmax(0,1fr); grid-template-rows:50px; min-height:66px; gap:8px; padding:7px; border:1px solid var(--cp-line); background:var(--cp-surface-strong); }
  .cp-process__visual { width:50px; height:50px; transform:scale(.78); transform-origin:top left; }
  .cp-process__number { right:auto; bottom:5px; left:3px; }
  .cp-process li p { grid-column:2; grid-row:1; }
  .cp-process li small { font-size:12px; }
  .compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process ol { grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; }
  .compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process li { min-height:52px; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:28px auto; place-items:center; gap:2px; padding:4px; border:0; }
  .compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process__visual { width:28px; height:28px; transform:none; }
  .compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process__number { width:28px; height:28px; position:absolute; top:4px; bottom:auto; left:50%; transform:translateX(-50%); }
  .compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process li p { grid-column:1; grid-row:2; text-align:center; }
  .compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process li b { font-size:12px; line-height:1.15; }
  .compress-pdf-product:not([data-state="empty"]):not([data-state="reading"]) .cp-process li small { display:none; }
  .cp-controls { min-height:0; padding:18px 16px 20px; }
  .cp-controls__title { margin-bottom:14px; font-size:20px; }
  .cp-modes>div { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .cp-mode { min-height:58px; padding:7px 9px; }
  .cp-target { margin-top:12px; }
  .cp-run-block { padding-top:12px; }
  .cp-preview { min-height:470px; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto minmax(0,1fr) auto; }
  .cp-thumbs { display:none; }
  .cp-view-switch { display:grid; grid-template-columns:repeat(2,1fr); gap:5px; padding:5px; }
  .cp-view-switch button { display:flex; align-items:center; justify-content:center; }
  .cp-view-switch button[aria-pressed="true"] { border-color:var(--cp-blue); background:var(--blue-soft); }
  .cp-canvases { grid-template-columns:minmax(0,1fr); }
  .cp-canvases[data-mobile-view="original"] .cp-canvas-panel--result,.cp-canvases[data-mobile-view="result"] .cp-canvas-panel--original { display:none; }
  .cp-canvas-panel { border-right:0; }
  .cp-canvas-panel figcaption { display:none; }
  .cp-preview__controls { padding:5px; }
  .cp-zoom [data-cp-fit] { display:none; }
  .cp-guide-dialog { width:calc(100% - 24px); max-height:calc(100dvh - 24px); }
  .cp-guide-dialog__head { padding:16px; }
  .cp-guide-dialog__body { padding:16px; }
  .cp-guide-dialog__body aside { grid-template-columns:minmax(0,1fr); }
  .cp-guide-dialog__body aside b { grid-row:auto; }
  .cp-guide-dialog__foot { align-items:stretch; flex-direction:column; padding:12px 16px 16px; }
  .cp-guide-dialog__foot .cp-primary { width:100%; }
  .cp-toolkit { grid-template-columns:minmax(0,1fr); gap:16px; padding:16px; }
}

@media (min-width:901px) and (max-width:1280px) {
  body.p-compress-pdf-product .wrap { width:calc(100% - 48px); }
  .cp-workbench { min-height:0; grid-template-columns:minmax(0,1fr); }
  .compress-pdf-product .cp-stage { min-height:480px; grid-template-rows:minmax(480px,auto) auto; border-right:0; border-bottom:1px solid var(--cp-line); }
  .compress-pdf-product[data-has-source="true"] .cp-stage { grid-template-rows:auto minmax(480px,1fr); }
  .cp-stage__core,.cp-empty { min-height:480px; }
  .cp-empty { grid-template-columns:minmax(280px,.82fr) minmax(340px,1.18fr); gap:14px; padding:20px; }
  .cp-drop-copy { min-height:340px; padding:22px 18px; }
  .cp-process-sketch { grid-template-rows:auto auto; }
  .cp-sketch-steps { min-height:220px; gap:10px; padding:16px; }
  .cp-process-sketch figcaption { padding:10px 12px; }
  .cp-controls { min-height:0; display:grid; grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr); grid-template-rows:auto auto auto auto; align-items:start; gap:0 20px; padding:20px; }
  .cp-controls__title { grid-column:1/-1; margin-bottom:14px; }
  .cp-modes { grid-column:1; grid-row:2/4; }
  .cp-modes>div { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cp-mode { min-height:68px; }
  .cp-target { grid-column:2; grid-row:2; margin-top:0; }
  .cp-target-presets { grid-column:2; grid-row:3; }
  .cp-run-block { grid-column:2; grid-row:5; margin-top:10px; }
  .cp-result,.cp-error { grid-column:1/-1; grid-row:4; }
  .cp-result { margin-top:18px; }
}

@media (max-width:430px) {
  .cp-intro h1 { font-size:27px; }
  .cp-stage__core,.cp-empty { min-height:280px; }
  .cp-drop-copy { min-height:252px; }
  .cp-drop-copy h2 { font-size:22px; }
  .cp-process__heading { align-items:center; gap:8px; }
  .cp-process li { grid-template-columns:42px minmax(0,1fr); min-height:70px; padding:6px; }
  .cp-process__visual { transform:scale(.66); }
  .cp-process li b { font-size:12px; }
  .cp-process li small { font-size:10px; }
  .cp-modes>p { margin-bottom:9px; }
  .cp-mode { min-height:56px; }
  .cp-modes>div { grid-template-columns:minmax(0,1fr); }
  .cp-target { grid-template-columns:minmax(0,1fr) 92px; }
  .cp-target>span:first-child strong { font-size:12px; }
  .cp-run-block>p:first-child { font-size:12px; }
  .cp-preview__controls { display:grid; grid-template-columns:minmax(0,1fr); }
  .cp-pages,.cp-zoom { width:100%; justify-content:space-between; }
  .cp-zoom output { min-width:55px; }
  .cp-process-sketch figcaption span { font-size:11px; }
  .cp-toolkit nav { grid-template-columns:minmax(0,1fr); }
  .cp-toolkit a { min-height:88px; }
}

@media (min-width:1281px) {
  .compress-pdf-product .cp-stage,.cp-controls { min-height:620px; }
  .cp-stage__core,.cp-empty { min-height:620px; }
  .compress-pdf-product[data-has-source="true"] .cp-stage { grid-template-rows:auto minmax(620px,1fr); }
}

@media (prefers-reduced-motion:reduce) { .compress-pdf-product *,.compress-pdf-product *::before,.compress-pdf-product *::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }
@media (forced-colors:active) { .cp-primary,.cp-mode:has(input:checked),.cp-result,.cp-error,.cp-process li[aria-current="step"] .cp-process__number { forced-color-adjust:none; } .cp-primary,.cp-process li[aria-current="step"] .cp-process__number { color:Canvas; background:CanvasText; } }

/* Owner-approved expressive light Canvas palette: graphite-blue carries the
   primary action and pale blue surfaces restore hierarchy without dark or red fills. */
.compress-pdf-product .cp-primary{color:var(--text-on-brand);background:var(--cp-blue);box-shadow:5px 5px 0 color-mix(in srgb,var(--cp-blue) 18%,transparent)}
.compress-pdf-product .cp-primary:hover{color:var(--text-on-brand);background:var(--cp-blue-deep)}
.compress-pdf-product .cp-mode:has(input:checked),
.compress-pdf-product .cp-target,
.compress-pdf-product .cp-target-presets button:hover,
.compress-pdf-product .cp-advice,
.compress-pdf-product .cp-result__recovery,
.compress-pdf-product .cp-guide-dialog__head,
.compress-pdf-product .cp-guide-dialog__body aside,
.compress-pdf-product .cp-view-switch button[aria-pressed="true"]{background:var(--blue-soft)}
.compress-pdf-product .cp-result{background:color-mix(in srgb,var(--success) 7%,var(--cp-surface))}
.compress-pdf-product[data-outcome="original-preserved"] .cp-result{background:var(--blue-soft)}
.compress-pdf-product .cp-canvases{background:#e7eaee}
.compress-pdf-product .cp-workspace-status{border:1px solid var(--cp-blue);color:var(--cp-ink);background:var(--blue-soft)}
.compress-pdf-product .cp-error{background:#fffdf8}
@media (forced-colors:active){.compress-pdf-product .cp-primary{color:Canvas;background:CanvasText}}
