/* iLoveDocuments — shared stylesheet for every page */
:root{
  --ink:#0B2F6B; --text:#1D2840; --muted:#55607A; --soft:#6B7590;
  --paper:#F4F6FA; --sheet:#FFFFFF; --sunk:#EDF1F8; --line:#DCE2EE; --line-strong:#C3CCDD;
  --brand:#076BDE; --brand-ink:#0559BD; --brand-wash:#E7F0FE; --heart:#F81A27; --btn:#076BDE; --btn-ink:#0559BD;
  --ok:#14805A; --ok-wash:#E3F5EC; --warn:#A35A00; --warn-wash:#FFF3DF; --bad:#C4161F; --bad-wash:#FDECEC;
  --c-organize:#7C3FD1; --c-optimize:#B15318; --c-convert:#2B6BD9; --c-from:#0A7C7C; --c-secure:#147F57; --c-edit:#C2367A; --c-image:#5B5BD6;
  --cat:var(--brand);
  --radius-sheet:20px; --radius:12px; --radius-sm:8px;
  --shadow-sheet:0 1px 0 var(--line), 0 22px 48px -30px rgba(11,47,107,.45);
  --font-body:"Atkinson Hyperlegible Next","Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",sans-serif;
  --font-head:"Sora",var(--font-body);
  --maxw:1160px; --gutter:20px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --ink:#E6ECFA; --text:#D6DDEE; --muted:#A3ADC6; --soft:#7E89A6;
    --paper:#0D121E; --sheet:#151C2C; --sunk:#1B2336; --line:#28324A; --line-strong:#38445F;
    --brand:#4C9BFF; --brand-ink:#7DB6FF; --brand-wash:#16284A; --btn:#2563EB; --btn-ink:#1D4FD0;
    --ok:#4CC593; --ok-wash:#123326; --warn:#F2B35A; --warn-wash:#3A2A10; --bad:#FF6B72; --bad-wash:#3A1518;
    --shadow-sheet:0 1px 0 var(--line), 0 22px 48px -30px rgba(0,0,0,.8);
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --ink:#E6ECFA; --text:#D6DDEE; --muted:#A3ADC6; --soft:#7E89A6;
  --paper:#0D121E; --sheet:#151C2C; --sunk:#1B2336; --line:#28324A; --line-strong:#38445F;
  --brand:#4C9BFF; --brand-ink:#7DB6FF; --brand-wash:#16284A; --btn:#2563EB; --btn-ink:#1D4FD0;
  --ok:#4CC593; --ok-wash:#123326; --warn:#F2B35A; --warn-wash:#3A2A10; --bad:#FF6B72; --bad-wash:#3A1518;
  --shadow-sheet:0 1px 0 var(--line), 0 22px 48px -30px rgba(0,0,0,.8);
  color-scheme:dark;
}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;scroll-padding-top:80px}
body{margin:0;background:var(--paper);color:var(--text);font:17px/1.6 var(--font-body);overflow-x:hidden}
img,svg,canvas{max-width:100%}
a{color:var(--brand)}
a:hover{color:var(--brand-ink)}
h1,h2,h3{font-family:var(--font-head);color:var(--ink);line-height:1.18;margin:0 0 .45em;letter-spacing:-.01em}
h1{font-size:clamp(1.85rem,4.2vw,2.75rem);font-weight:700}
h2{font-size:clamp(1.3rem,2.6vw,1.65rem);font-weight:700;margin-top:0}
h3{font-size:1.08rem;font-weight:600}
p{margin:0 0 1em}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter)}
.narrow{max-width:780px}
.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:3px solid var(--brand);outline-offset:2px;border-radius:4px}
.skip{position:absolute;left:-999px;top:8px;background:var(--sheet);padding:8px 14px;border-radius:8px;z-index:200}
.skip:focus{left:8px}

/* ---------- header ---------- */
.site-head{position:sticky;top:0;z-index:60;background:color-mix(in srgb,var(--sheet) 92%,transparent);backdrop-filter:saturate(1.4) blur(8px);border-bottom:1px solid var(--line)}
.head-in{display:flex;align-items:center;gap:14px;height:62px}
.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font:700 1.18rem/1 var(--font-head);white-space:nowrap;margin-right:auto}
.brand img{width:32px;height:32px;display:block;border-radius:7px}
.brand b{color:var(--heart);font-weight:700}
.head-nav{display:flex;align-items:center;gap:4px}
.head-nav a,.head-nav button{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 12px;border-radius:10px;border:0;background:none;color:var(--ink);font:600 .95rem/1 var(--font-body);text-decoration:none;cursor:pointer}
.head-nav a:hover,.head-nav button:hover,.head-nav button[aria-expanded="true"]{background:var(--sunk);color:var(--ink)}
.head-nav .chev{transition:transform .15s}
.head-nav button[aria-expanded="true"] .chev{transform:rotate(180deg)}
.icon-btn{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:10px;border:1px solid var(--line);background:var(--sheet);color:var(--ink);cursor:pointer}
.icon-btn:hover{border-color:var(--line-strong)}
.menu-btn{display:none}
.mega{position:absolute;left:0;right:0;top:62px;background:var(--sheet);border-bottom:1px solid var(--line);box-shadow:0 24px 40px -28px rgba(11,47,107,.5);max-height:calc(100vh - 62px);overflow:auto}
.mega[hidden]{display:none}
.mega-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px 28px;padding:22px var(--gutter) 26px;max-width:var(--maxw);margin:0 auto}
.mega h3{font-size:.86rem;margin:10px 0 6px;color:var(--muted);font-family:var(--font-body);font-weight:700;display:flex;align-items:center;gap:8px}
.mega h3::before{content:"";width:10px;height:10px;border-radius:3px;background:var(--cat)}
.mega a{display:block;padding:5px 0;color:var(--text);text-decoration:none;font-size:.95rem}
.mega a:hover{color:var(--brand)}
.searchbox{position:relative}
.searchbox input{width:100%;height:52px;border-radius:14px;border:1.5px solid var(--line-strong);background:var(--sheet);color:var(--text);font:500 1.02rem var(--font-body);padding:0 16px 0 46px}
.searchbox input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-wash)}
.searchbox svg{position:absolute;left:15px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.search-results{position:absolute;left:0;right:0;top:calc(100% + 6px);background:var(--sheet);border:1px solid var(--line);border-radius:14px;box-shadow:0 20px 40px -24px rgba(11,47,107,.5);padding:6px;z-index:70;max-height:60vh;overflow:auto}
.search-results[hidden]{display:none}
.search-results a{display:flex;gap:12px;align-items:center;padding:9px 10px;border-radius:10px;text-decoration:none;color:var(--text)}
.search-results a[aria-selected="true"],.search-results a:hover{background:var(--sunk)}
.search-results small{display:block;color:var(--muted);font-size:.82rem}
.search-results .empty{padding:12px;color:var(--muted)}
.head-search{display:none;padding:10px var(--gutter) 14px;border-top:1px solid var(--line);background:var(--sheet)}
.head-search.open{display:block}

/* ---------- icons ---------- */
.ti{--c:var(--cat);flex:none;display:inline-grid;place-items:center;width:42px;height:42px;border-radius:11px;background:color-mix(in srgb,var(--c) 13%,transparent);color:var(--c)}
.ti svg{width:24px;height:24px}
.cat-organize{--cat:var(--c-organize)}.cat-optimize{--cat:var(--c-optimize)}.cat-convert{--cat:var(--c-convert)}.cat-from{--cat:var(--c-from)}.cat-secure{--cat:var(--c-secure)}.cat-edit{--cat:var(--c-edit)}.cat-image{--cat:var(--c-image)}

/* ---------- breadcrumbs ---------- */
.crumbs{font-size:.86rem;color:var(--muted);padding:16px 0 0}
.crumbs ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.crumbs li+li::before{content:"/";margin-right:6px;color:var(--soft)}
.crumbs a{color:var(--muted)}

/* ---------- ads ---------- */
.ad{display:flex;flex-direction:column;align-items:center;gap:4px;margin:18px auto;max-width:100%;overflow:hidden}
.ad[hidden]{display:none}
.ad-label{font-size:.72rem;color:var(--muted);letter-spacing:.02em}
.ad ins.adsbygoogle{width:100%;max-width:100%}
.ad-rail{position:fixed;right:12px;top:90px;z-index:5;margin:0}
.ad-in-result{margin:0}

/* ---------- tool page head ---------- */
.tool-head{padding:14px 0 6px;display:flex;gap:18px;align-items:flex-start}
.tool-head .ti{width:56px;height:56px;border-radius:15px;margin-top:4px}
.tool-head .ti svg{width:30px;height:30px}
.tool-head p.lead{font-size:1.1rem;color:var(--muted);max-width:62ch;margin:0}
.badges{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.badge{display:inline-flex;align-items:center;gap:6px;font-size:.84rem;font-weight:600;color:var(--muted);background:var(--sheet);border:1px solid var(--line);padding:4px 11px;border-radius:999px}
.badge svg{width:15px;height:15px;color:var(--ok)}

/* ---------- the sheet (drop zone / workspace) ---------- */
.tool{margin:18px 0 8px}
.sheet{position:relative;background:var(--sheet);border-radius:var(--radius-sheet);box-shadow:var(--shadow-sheet);border:1px solid var(--line);overflow:hidden}
.tool:not([data-view="drop"]) .sheet::after{display:none}
.sheet::after{content:"";position:absolute;top:0;right:0;width:46px;height:46px;background:linear-gradient(225deg,var(--paper) 0 50%,color-mix(in srgb,var(--cat) 75%,#000 0%) 50% 100%);border-bottom-left-radius:10px;transition:width .2s ease,height .2s ease;pointer-events:none}
.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px;min-height:300px;margin:14px;padding:34px 20px;border:2px dashed color-mix(in srgb,var(--cat) 45%,var(--line));border-radius:14px;cursor:pointer;transition:background .15s,border-color .15s}
.drop:hover{background:color-mix(in srgb,var(--cat) 5%,transparent)}
.drop.over{background:color-mix(in srgb,var(--cat) 10%,transparent);border-color:var(--cat)}
.sheet.over::after{width:64px;height:64px}
.drop .big-icon{width:64px;height:64px;color:var(--cat)}
.drop strong{font:700 1.2rem var(--font-head);color:var(--ink)}
.drop .hint{color:var(--muted);font-size:.93rem;max-width:46ch}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:0 24px;border-radius:12px;border:0;background:var(--btn);color:#fff;font:700 1.02rem var(--font-body);cursor:pointer;text-decoration:none;transition:background .15s,transform .05s}
.btn:hover{background:var(--btn-ink);color:#fff}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn.cat{background:var(--cat)}
.btn.cat:hover{background:color-mix(in srgb,var(--cat) 82%,#000)}
.btn.big{min-height:56px;font-size:1.1rem;padding:0 30px;border-radius:14px}
.btn.ghost{background:var(--sheet);color:var(--ink);border:1.5px solid var(--line-strong)}
.btn.ghost:hover{border-color:var(--ink);background:var(--sheet);color:var(--ink)}
.btn.small{min-height:38px;padding:0 14px;font-size:.92rem;border-radius:10px}
.btn svg{width:20px;height:20px}
.linkish{background:none;border:0;padding:0;color:var(--brand);font:inherit;cursor:pointer;text-decoration:underline}

.work{display:grid;grid-template-columns:minmax(0,1fr) 320px;min-height:420px}
.work-main{padding:18px;min-width:0;border-right:1px solid var(--line);background:color-mix(in srgb,var(--sunk) 45%,var(--sheet))}
.work-side{padding:20px;display:flex;flex-direction:column;gap:14px}
.work-side h2{font-size:1.2rem;margin:0}
.work-actions{margin-top:auto;display:flex;flex-direction:column;gap:10px;padding-top:6px}
.work-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.work-bar .grow{flex:1}
.note{font-size:.88rem;color:var(--muted)}
.msg{font-size:.92rem;border-radius:10px;padding:10px 12px}
.msg.err{background:var(--bad-wash);color:var(--bad)}
.msg.warn{background:var(--warn-wash);color:var(--warn)}
.msg.ok{background:var(--ok-wash);color:var(--ok)}
.msg:empty{display:none}

/* options */
.opt{display:flex;flex-direction:column;gap:6px}
.opt>label,.opt>.lbl{font-weight:700;font-size:.92rem;color:var(--ink)}
.opt small{color:var(--muted);font-size:.83rem}
.opt input[type=text],.opt input[type=number],.opt input[type=password],.opt input[type=email],.opt input[type=file],.opt select,.opt textarea,.field{width:100%;min-height:44px;padding:9px 12px;border:1.5px solid var(--line-strong);border-radius:10px;background:var(--sheet);color:var(--text);font:500 1rem var(--font-body)}
.opt textarea{min-height:90px;resize:vertical}
.opt input:focus,.opt select:focus,.opt textarea:focus,.field:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-wash)}
.opt input[type=range]{width:100%;accent-color:var(--cat)}
.opt input[type=color]{width:48px;height:38px;border:1px solid var(--line-strong);border-radius:8px;background:none;padding:2px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.check{display:flex;gap:10px;align-items:flex-start;font-size:.94rem;cursor:pointer}
.check input{width:20px;height:20px;margin:2px 0 0;accent-color:var(--cat);flex:none}
.seg{display:flex;flex-wrap:wrap;gap:6px}
.seg button{flex:1 1 auto;min-height:42px;padding:6px 10px;border-radius:10px;border:1.5px solid var(--line-strong);background:var(--sheet);color:var(--text);font:600 .92rem var(--font-body);cursor:pointer;text-align:center}
.seg button[aria-pressed="true"]{border-color:var(--cat);background:color-mix(in srgb,var(--cat) 12%,var(--sheet));color:var(--ink)}
.seg.col button{text-align:left;display:flex;flex-direction:column;gap:2px;flex-basis:100%}
.seg.col button small{font-weight:500;color:var(--muted)}
.pos-grid{display:grid;grid-template-columns:repeat(3,40px);gap:6px}
.pos-grid button{width:40px;height:40px;border-radius:8px;border:1.5px solid var(--line-strong);background:var(--sheet);cursor:pointer;display:grid;place-items:center}
.pos-grid button::after{content:"";width:10px;height:10px;border-radius:50%;background:var(--line-strong)}
.pos-grid button[aria-pressed="true"]{border-color:var(--cat)}
.pos-grid button[aria-pressed="true"]::after{background:var(--cat)}
.pos-grid button:disabled{visibility:hidden}

/* file list */
.files{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.file{display:flex;align-items:center;gap:12px;background:var(--sheet);border:1px solid var(--line);border-radius:12px;padding:8px 10px;touch-action:pan-y}
.file.dragging{opacity:.5}
.file.drop-before{box-shadow:0 -3px 0 var(--cat)}
.file.drop-after{box-shadow:0 3px 0 var(--cat)}
.file .grip{cursor:grab;color:var(--soft);padding:6px;touch-action:none;border:0;background:none;display:grid;place-items:center}
.file .thumb{width:46px;height:60px;border-radius:6px;background:var(--sunk);border:1px solid var(--line);object-fit:contain;flex:none}
.file .meta{flex:1;min-width:0}
.file .name{font-weight:600;font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)}
.file .sub{font-size:.82rem;color:var(--muted)}
.file .acts{display:flex;gap:2px}
.mini{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;border:0;background:none;color:var(--muted);cursor:pointer}
.mini:hover{background:var(--sunk);color:var(--ink)}
.mini:disabled{opacity:.3;cursor:default}
.mini svg{width:18px;height:18px}

/* page grid */
.pages{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:14px}
.pg{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 8px 8px;border-radius:12px;border:2px solid transparent;background:var(--sheet);cursor:pointer;user-select:none;touch-action:pan-y;box-shadow:0 1px 0 var(--line)}
.pg:hover{border-color:var(--line-strong)}
.pg.sel{border-color:var(--cat);background:color-mix(in srgb,var(--cat) 8%,var(--sheet))}
.pg.off{opacity:.38}
.pg.off .pg-img{filter:grayscale(1)}
.pg.dragging{opacity:.4}
.pg.drop-before{box-shadow:-4px 0 0 var(--cat)}
.pg.drop-after{box-shadow:4px 0 0 var(--cat)}
.pg-img{width:100%;aspect-ratio:3/4;display:grid;place-items:center;overflow:hidden}
.pg-img canvas,.pg-img img{max-width:100%;max-height:100%;box-shadow:0 0 0 1px var(--line-strong),0 2px 6px rgba(0,0,0,.12);background:#fff;transition:transform .2s}
.pg-num{font-size:.8rem;font-weight:700;color:var(--muted)}
.pg-tick{position:absolute;top:6px;left:6px;width:24px;height:24px;border-radius:50%;background:var(--sheet);border:2px solid var(--line-strong);display:grid;place-items:center}
.pg.sel .pg-tick{background:var(--cat);border-color:var(--cat)}
.pg.sel .pg-tick::after{content:"";width:6px;height:11px;border:solid #fff;border-width:0 2.5px 2.5px 0;transform:rotate(45deg) translate(-1px,-1px)}
.pg-tools{position:absolute;top:4px;right:4px;display:flex;gap:2px;opacity:0;transition:opacity .12s}
.pg:hover .pg-tools,.pg:focus-within .pg-tools{opacity:1}
@media (hover:none){.pg-tools{opacity:1}}
.pg-tools .mini{width:30px;height:30px;background:var(--sheet);border:1px solid var(--line);box-shadow:0 1px 3px rgba(0,0,0,.1)}
.pg-badge{position:absolute;bottom:34px;left:50%;transform:translateX(-50%);font-size:.72rem;font-weight:700;background:var(--cat);color:#fff;border-radius:999px;padding:1px 8px}
.pg-blank{width:72%;aspect-ratio:1/1.414;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.ph{display:grid;place-items:center;width:70%;aspect-ratio:3/4;background:var(--sunk);border-radius:4px;color:var(--soft);font-size:.8rem}

/* progress / result */
.busy{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;min-height:300px;padding:30px;text-align:center}
.bar{width:min(420px,90%);height:10px;border-radius:999px;background:var(--sunk);overflow:hidden}
.bar i{display:block;height:100%;width:0;background:var(--cat);border-radius:999px;transition:width .2s}
.bar.indet i{width:35%;animation:indet 1.1s ease-in-out infinite}
@keyframes indet{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}
.busy p{margin:0;color:var(--muted)}
.result{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;padding:26px;align-items:start}
.result h2{display:flex;align-items:center;gap:10px}
.result h2 svg{width:30px;height:30px;color:var(--ok);flex:none}
.out-list{list-style:none;padding:0;margin:14px 0;display:flex;flex-direction:column;gap:8px}
.out-list li{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--sheet)}
.out-list .name{flex:1;min-width:160px;font-weight:600;color:var(--ink);word-break:break-all}
.out-list .size{color:var(--muted);font-size:.9rem}
.saving{display:inline-block;font-weight:700;color:var(--ok);background:var(--ok-wash);border-radius:999px;padding:3px 12px;font-size:.9rem}
.saving.neutral{color:var(--muted);background:var(--sunk)}
.next{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.next a{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:var(--ink);font-weight:600;font-size:.92rem;border:1px solid var(--line);background:var(--sheet);padding:7px 12px 7px 8px;border-radius:999px}
.next a:hover{border-color:var(--cat)}
.next .ti{width:28px;height:28px;border-radius:8px}
.next .ti svg{width:17px;height:17px}
.result-actions{display:flex;flex-wrap:wrap;gap:10px;margin:6px 0 14px}

/* ---------- content sections ---------- */
.section{padding:34px 0}
.section+.section{border-top:1px solid var(--line)}
.steps{list-style:none;counter-reset:s;margin:18px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.steps li{counter-increment:s;position:relative;padding:0 0 0 52px}
.steps li::before{content:counter(s);position:absolute;left:0;top:0;width:38px;height:38px;border-radius:50%;background:var(--cat);color:#fff;font:700 1.05rem/38px var(--font-head);text-align:center}
.steps h3{margin:6px 0 4px}
.steps p{margin:0;color:var(--muted);font-size:.96rem}
.uses{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px 26px;margin:16px 0 0;padding:0;list-style:none}
.uses li{padding-left:28px;position:relative}
.uses li::before{content:"";position:absolute;left:2px;top:.45em;width:14px;height:14px;border-radius:4px;background:color-mix(in srgb,var(--cat) 22%,transparent);border:2px solid var(--cat)}
.uses strong{color:var(--ink)}
.prose{max-width:72ch}
.prose ul{padding-left:22px}
.prose li{margin:6px 0}
.faq details{border-bottom:1px solid var(--line);padding:4px 0}
.faq summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:12px;padding:12px 0;font:600 1.05rem var(--font-head);color:var(--ink)}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";font:400 1.5rem/1 var(--font-body);color:var(--muted)}
.faq details[open] summary::after{content:"–"}
.faq details p{margin:0 0 14px;color:var(--text);max-width:72ch}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0;padding:0;list-style:none}
.chips a{display:inline-block;padding:6px 13px;border-radius:999px;border:1px solid var(--line);background:var(--sheet);color:var(--text);text-decoration:none;font-size:.9rem}
.chips a:hover{border-color:var(--brand);color:var(--brand)}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;margin:0;padding:0;list-style:none}
.tile{display:flex;gap:13px;align-items:flex-start;padding:13px 14px;border-radius:14px;text-decoration:none;color:var(--text);background:var(--sheet);border:1px solid var(--line);height:100%;transition:border-color .12s}
.tile:hover{border-color:var(--cat);color:var(--text)}
.tile b{display:block;color:var(--ink);font-size:1rem;margin-bottom:2px}
.tile span{display:block;color:var(--muted);font-size:.88rem;line-height:1.45}
.tile .new{display:inline-block;margin-left:6px;font-size:.7rem;font-weight:700;color:var(--ink);border:1px solid var(--cat);border-radius:999px;padding:0 6px;vertical-align:2px}
.two{display:grid;grid-template-columns:1.2fr 1fr;gap:36px}
.privacy-note{display:flex;gap:14px;align-items:flex-start;background:var(--sheet);border:1px solid var(--line);border-radius:14px;padding:16px 18px}
.privacy-note svg{flex:none;width:28px;height:28px;color:var(--ok)}
.privacy-note p{margin:0;color:var(--muted);font-size:.95rem}

/* ---------- home ---------- */
.hero{padding:38px 0 18px}
.hero h1{max-width:20ch;font-size:clamp(2rem,5vw,3.25rem)}
.hero p.lead{font-size:1.15rem;color:var(--muted);max-width:56ch}
.hero .searchbox{max-width:640px;margin:22px 0 14px}
.hero .searchbox input{height:60px;font-size:1.08rem;border-radius:16px;box-shadow:var(--shadow-sheet)}
.popular{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.popular span{color:var(--muted);font-size:.9rem;margin-right:2px}
.cat-sec{padding:26px 0 8px}
.cat-sec header{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin-bottom:14px;padding-left:14px;border-left:5px solid var(--cat)}
.cat-sec header h2{margin:0}
.cat-sec header p{margin:0;color:var(--muted)}
.trust{background:var(--sheet);border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:38px 0;margin-top:28px}
.trust ul{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px;list-style:none;margin:18px 0 0;padding:0}
.trust li strong{display:block;color:var(--ink);font-family:var(--font-head);margin-bottom:4px}
.trust li span{color:var(--muted);font-size:.95rem}

/* ---------- article (guides / legal) ---------- */
.article{padding:10px 0 30px}
.article h1{margin-top:8px}
.article h2{margin-top:34px}
.article .meta{color:var(--muted);font-size:.9rem;margin-bottom:18px}
.article .lead{font-size:1.12rem;color:var(--muted)}
.article ol,.article ul{padding-left:22px}
.article .crumbs ol,.article .guide-list,.article .rel,.article .tiles,.article .steps{padding-left:0}
.article li{margin:7px 0}
.article table{width:100%;border-collapse:collapse;font-size:.94rem;margin:12px 0}
.article th,.article td{border:1px solid var(--line);padding:9px 11px;text-align:left;vertical-align:top}
.article th{background:var(--sunk)}
.article .tbl{overflow-x:auto}
.article details{border:1px solid var(--line);border-radius:12px;padding:12px 16px;margin:10px 0;background:var(--sheet)}
.article summary{cursor:pointer;font-weight:700;color:var(--ink)}
.article .cta{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap;background:var(--brand-wash);border:1px solid var(--line);border-radius:14px;padding:16px 20px;margin:24px 0}
.article .cta .btn{color:#fff}
.article .rel{list-style:none;padding:0;display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}
.article .disc{font-size:.88rem;color:var(--muted);border-top:1px solid var(--line);padding-top:14px;margin-top:28px}
.article .rel a{display:block;border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--sheet);text-decoration:none;font-weight:600;color:var(--ink)}
.help .limits{padding-left:20px}
.help .limits li{margin:6px 0}
.page-note{margin-top:18px;font-size:.88rem}
.seo-blocks{display:grid;grid-template-columns:repeat(3,1fr);gap:28px}
.seo-blocks h2{font-size:1.2rem;margin-bottom:8px}
.seo-blocks p{color:var(--text);line-height:1.65;margin:0}
@media (max-width:980px){.seo-blocks{grid-template-columns:1fr;gap:18px}}
.article .tool-defs{list-style:none;padding:0;margin:8px 0 6px;display:grid;gap:10px}
.tool-defs li{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--sheet);line-height:1.55}
.tool-defs b{color:var(--ink)}
.tool-defs .lim{display:block;font-size:.9rem;color:var(--muted);margin-top:4px}
.narrow-text{max-width:75ch}
.guide-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;list-style:none;margin:18px 0 0;padding:0}
.guide-list a{display:block;height:100%;background:var(--sheet);border:1px solid var(--line);border-radius:14px;padding:16px;text-decoration:none;color:var(--text)}
.guide-list a:hover{border-color:var(--brand)}
.guide-list b{display:block;color:var(--ink);margin-bottom:6px;font-family:var(--font-head);font-weight:600}
.guide-list span{font-size:.92rem;color:var(--muted)}

/* ---------- contact form ---------- */
.form-card{background:var(--sheet);border:1px solid var(--line);border-radius:16px;padding:24px}
.form-card .opt,.form-card .row2{margin-top:14px}
.form-card .opt:first-child,.form-card .row2 .opt{margin-top:0}
.form-card .extra.show{margin-top:14px}
.stars{display:flex;gap:6px}
.stars input{position:absolute;opacity:0;width:1px;height:1px}
.stars label{font-size:1.8rem;line-height:1;cursor:pointer;color:var(--line-strong)}
.stars label.on{color:#F5B301}
.stars input:focus-visible+label{outline:2px solid var(--brand);border-radius:4px}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.extra{display:none}.extra.show{display:block}

/* ---------- footer ---------- */
.site-foot{margin-top:40px;background:var(--sheet);border-top:1px solid var(--line);padding:36px 0 26px;font-size:.92rem}
.foot-grid{display:grid;grid-template-columns:1.3fr repeat(4,1fr);gap:24px}
.foot-grid h3{font-size:.9rem;margin:0 0 10px;color:var(--ink);font-family:var(--font-body);font-weight:700}
.foot-grid ul{list-style:none;margin:0;padding:0}
.foot-grid li{margin:5px 0}
.foot-grid a{color:var(--muted);text-decoration:none}
.foot-grid a:hover{color:var(--brand)}
.foot-about p{color:var(--muted);margin:10px 0 0;max-width:34ch}
.foot-base{display:flex;flex-wrap:wrap;gap:10px 20px;justify-content:space-between;border-top:1px solid var(--line);margin-top:26px;padding-top:18px;color:var(--muted)}
.foot-base a{color:var(--muted)}

/* ---------- consent ---------- */
.consent{position:fixed;left:12px;right:12px;bottom:12px;z-index:90;max-width:860px;margin:0 auto;background:var(--sheet);color:var(--text);border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 50px -12px rgba(0,0,0,.35);padding:14px 16px;display:none;align-items:center;gap:14px;font-size:.92rem;line-height:1.45}
.consent.show{display:flex}
.consent p{margin:0;flex:1}
.consent .b{display:flex;gap:8px;flex:none}
.consent .btn{min-height:42px;padding:0 18px;font-size:.95rem}

/* ---------- modal + toast ---------- */
.modal-back{position:fixed;inset:0;background:rgba(8,14,30,.55);z-index:120;display:grid;place-items:center;padding:16px}
.modal-box{background:var(--sheet);border-radius:18px;padding:24px;width:min(440px,100%);box-shadow:0 30px 60px -20px rgba(0,0,0,.5)}
.modal-box h2{font-size:1.25rem}
.modal-box .acts{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:130;background:var(--ink);color:var(--sheet);padding:11px 18px;border-radius:12px;font-weight:600;box-shadow:0 10px 30px rgba(0,0,0,.3);max-width:90vw}

/* ---------- page editor (sign / edit / redact / crop) ---------- */
.ed{display:grid;grid-template-columns:110px minmax(0,1fr);gap:0;min-height:520px}
.ed-thumbs{border-right:1px solid var(--line);overflow:auto;max-height:76vh;padding:10px 8px;display:flex;flex-direction:column;gap:10px;background:var(--sunk)}
.ed-thumbs button{border:2px solid transparent;border-radius:8px;background:none;padding:4px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:.75rem;color:var(--muted)}
.ed-thumbs button[aria-current="true"]{border-color:var(--cat);color:var(--ink);font-weight:700}
.ed-thumbs canvas{max-width:100%;box-shadow:0 1px 3px rgba(0,0,0,.2);background:#fff}
.ed-stage{position:relative;overflow:auto;max-height:76vh;padding:18px;display:flex;justify-content:center;align-items:flex-start;background:color-mix(in srgb,var(--sunk) 60%,var(--sheet))}
.ed-page{position:relative;box-shadow:0 2px 12px rgba(0,0,0,.18);background:#fff;flex:none;touch-action:none}
.ed-page canvas{display:block;max-width:none}
.ed-layer{position:absolute;inset:0}
.ed-obj{position:absolute;border:1.5px dashed transparent;touch-action:none;cursor:move}
.ed-obj.sel{border-color:var(--brand)}
.ed-obj img{width:100%;height:100%;display:block;pointer-events:none;user-select:none}
.ed-obj .txt{width:100%;height:100%;outline:none;white-space:pre;line-height:1.15;overflow:visible;cursor:text;color:#000}
.ed-obj .h{position:absolute;width:16px;height:16px;right:-9px;bottom:-9px;background:var(--brand);border:2px solid #fff;border-radius:50%;cursor:nwse-resize;display:none;touch-action:none}
.ed-obj.sel .h{display:block}
.ed-obj .x{position:absolute;top:-14px;right:-14px;width:26px;height:26px;border-radius:50%;border:0;background:var(--bad);color:#fff;font-size:15px;line-height:26px;text-align:center;cursor:pointer;display:none;padding:0}
.ed-obj.sel .x{display:block}
.ed-obj.box-redact{background:rgba(0,0,0,.82)}
.ed-obj.box-white{background:#fff;border:1px solid #bbb}
.ed-obj.box-shape{background:transparent}
.ed-obj.box-crop{border:2px solid var(--cat);box-shadow:0 0 0 9999px rgba(8,14,30,.45);cursor:move}
.ed-obj.box-hl{background:rgba(255,230,0,.4)}
.ed-tools{display:flex;flex-wrap:wrap;gap:6px}
.ed-tools button{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 12px;border-radius:10px;border:1.5px solid var(--line-strong);background:var(--sheet);color:var(--text);font:600 .9rem var(--font-body);cursor:pointer}
.ed-tools button[aria-pressed="true"]{border-color:var(--cat);background:color-mix(in srgb,var(--cat) 12%,var(--sheet))}
.ed-tools svg{width:18px;height:18px}
.ed-nav{display:flex;align-items:center;gap:8px}
.sig-pad{width:100%;height:170px;border:1.5px dashed var(--line-strong);border-radius:12px;background:#fff;touch-action:none;cursor:crosshair}
.sig-fonts{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.sig-fonts button{min-height:52px;border-radius:10px;border:1.5px solid var(--line-strong);background:#fff;color:#123;cursor:pointer;font-size:1.35rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 8px}
.sig-fonts button[aria-pressed="true"]{border-color:var(--cat)}
.swatches{display:flex;gap:8px}
.swatches button{width:32px;height:32px;border-radius:50%;border:2px solid var(--line);cursor:pointer}
.swatches button[aria-pressed="true"]{outline:3px solid var(--cat);outline-offset:2px}
.preview-img{max-width:100%;max-height:420px;display:block;margin:0 auto;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.15);background:repeating-conic-gradient(#eee 0 25%,#fff 0 50%) 0 0/16px 16px}
.img-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.img-card{position:relative;background:var(--sheet);border:1px solid var(--line);border-radius:12px;padding:8px;display:flex;flex-direction:column;gap:6px}
.img-card .im{aspect-ratio:1/1;display:grid;place-items:center;overflow:hidden;border-radius:8px;background:repeating-conic-gradient(var(--sunk) 0 25%,var(--sheet) 0 50%) 0 0/14px 14px}
.img-card img{max-width:100%;max-height:100%;transition:transform .2s}
.img-card .name{font-size:.8rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)}
.img-card .sub{font-size:.76rem;color:var(--muted)}
.crop-stage{position:relative;display:inline-block;max-width:100%;touch-action:none;user-select:none}
.crop-stage img{display:block;max-width:100%;max-height:62vh}
.crop-box{position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(8,14,30,.5),0 0 0 1px rgba(0,0,0,.4) inset;cursor:move;touch-action:none}
.crop-box.lit{box-shadow:0 0 0 1px rgba(0,0,0,.4) inset}
.crop-shade{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.crop-shade b{position:absolute;box-shadow:0 0 0 9999px rgba(8,14,30,.5)}
.crop-box i{position:absolute;width:18px;height:18px;background:#fff;border:2px solid var(--cat);border-radius:50%;touch-action:none}
.crop-box i[data-h=nw]{left:-10px;top:-10px;cursor:nwse-resize}.crop-box i[data-h=ne]{right:-10px;top:-10px;cursor:nesw-resize}
.crop-box i[data-h=sw]{left:-10px;bottom:-10px;cursor:nesw-resize}.crop-box i[data-h=se]{right:-10px;bottom:-10px;cursor:nwse-resize}
.center-stage{display:flex;justify-content:center;align-items:center;min-height:300px}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:10px}
.tabs button{border:0;background:none;padding:9px 12px;font:600 .92rem var(--font-body);color:var(--muted);border-bottom:3px solid transparent;cursor:pointer}
.tabs button[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--cat)}

/* ---------- responsive ---------- */
@media (max-width:980px){
  .head-nav .hide-md{display:none}
  .work{grid-template-columns:1fr}
  .work-main{border-right:0;border-bottom:1px solid var(--line)}
  .mega-grid{grid-template-columns:repeat(2,1fr)}
  .foot-grid{grid-template-columns:1fr 1fr}
  .foot-about{grid-column:1/-1}
  .two{grid-template-columns:1fr}
  .result{grid-template-columns:1fr}
}
@media (max-width:760px){
  body{font-size:16px}
  .head-nav .hide-sm{display:none}
  .menu-btn{display:inline-grid}
  .tool-head{gap:12px;padding-top:8px}
  .tool-head .ti{display:none}
  .tool-head h1{font-size:1.6rem}
  .tool-head p.lead{font-size:.98rem}
  .badges{flex-wrap:nowrap;overflow-x:auto;margin-top:10px;padding-bottom:2px;scrollbar-width:none}
  .badge{flex:none;font-size:.78rem}
  .pg-tools{position:static;opacity:1;justify-content:center;flex-wrap:wrap}
  .pg-tools .mini{width:32px;height:32px}
  .work-main{padding:12px}
  .work-side{padding:16px}
  .drop{min-height:240px;margin:10px;padding:26px 14px}
  .work-actions.sticky{position:sticky;bottom:0;background:var(--sheet);margin:0 -20px -20px;padding:12px 20px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);z-index:4}
  .ed{grid-template-columns:1fr}
  .ed-thumbs{flex-direction:row;max-height:none;border-right:0;border-bottom:1px solid var(--line);overflow-x:auto}
  .ed-thumbs button{flex:none;width:70px}
  .ed-stage{max-height:68vh;padding:10px}
  .consent{flex-direction:column;align-items:stretch;gap:8px;padding:10px 12px;font-size:.82rem;left:8px;right:8px;bottom:8px}
  .consent .b .btn{flex:1;min-height:38px;font-size:.9rem}
  .pages{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px}
  .mega-grid{grid-template-columns:1fr}
}
/* Target file-size presets (compress and resize pages). Server-rendered, fixed height: no layout shift. */
.size-presets{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.size-presets a{display:inline-flex;align-items:center;min-height:34px;padding:0 13px;border:1px solid var(--line-strong);border-radius:999px;background:var(--sheet);color:var(--ink);font-size:.86rem;font-weight:600;line-height:1.2;text-decoration:none;white-space:nowrap}
.size-presets a:hover{border-color:var(--cat);color:var(--ink)}
.size-presets a:focus-visible{outline:3px solid var(--cat);outline-offset:2px}
.size-presets a.active{background:var(--cat);border-color:var(--cat);color:#fff}
/* Blog: jump-to-tool card */
.article .tool-jump-card{border-left:5px solid var(--brand)}
.tool-jump-card .tj-actions{display:flex;flex-wrap:wrap;gap:10px}
.article .tool-jump-card .btn.ghost,.article .tool-jump-card .btn.ghost:hover{color:var(--ink)}
/* Requirement tables on tool pages */
.tbl-wrap{overflow-x:auto;margin:14px 0}
.req-table{width:100%;border-collapse:collapse;font-size:.94rem}
.req-table.req-3{min-width:560px}
.req-table th,.req-table td{border:1px solid var(--line);padding:9px 11px;text-align:left;vertical-align:top}
.req-table thead th{background:var(--sunk);color:var(--ink)}
.req-table tbody th{font-weight:700;color:var(--ink);background:var(--sheet)}
.prose ol{padding-left:22px}
@media (max-width:760px){
  .tool-head>div{min-width:0}
  .size-presets{flex-wrap:nowrap;overflow-x:auto;margin-top:10px;padding-bottom:4px;scrollbar-width:thin}
  .size-presets a{flex:none;min-height:36px;font-size:.82rem}
  .tool-jump-card .tj-actions,.tool-jump-card .tj-actions .btn{width:100%}
}
/* Photo tools: cut-out editor, passport frame, signature, ID print, join and quick edits */
.checker{background:repeating-conic-gradient(#e6e8ec 0 25%,#fff 0 50%) 0 0/18px 18px}
.cut-wrap{display:flex;gap:12px;align-items:flex-start}
.cut-strip{max-height:62vh;flex:none;width:92px}
.cut-strip img{width:64px;height:64px;object-fit:cover;border-radius:6px}
.cut-host{flex:1;min-width:0}
.cut-stage{position:relative;display:inline-block;max-width:100%;line-height:0;border-radius:8px;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,.15);touch-action:none}
.cut-stage.checker{background:repeating-conic-gradient(#e6e8ec 0 25%,#fff 0 50%) 0 0/18px 18px}
.cut-under,.cut-before{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}
.cut-fg{position:relative;display:block;max-width:100%;max-height:62vh;width:auto;height:auto;cursor:crosshair}
.cut-before{z-index:2}
.cut-ring{position:absolute;z-index:3;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.5);pointer-events:none}
.pp-wrap{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%}
.pp-frame{position:relative;width:min(100%,340px);max-height:62vh;border-radius:4px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,.2);touch-action:none;cursor:grab;background:#fff}
.pp-frame canvas{position:absolute;inset:0;width:100%;height:100%}
.pp-crown,.pp-chin{position:absolute;left:0;right:0;pointer-events:none}
.pp-crown{border-top:2px dashed rgba(220,38,38,.85)}
.pp-chin{background:rgba(22,163,74,.22);border-top:1px solid rgba(22,163,74,.9);border-bottom:1px solid rgba(22,163,74,.9)}
.pp-crown span,.pp-chin span{position:absolute;right:4px;font:600 11px/1.2 var(--font-body);color:#fff;background:rgba(0,0,0,.55);padding:1px 5px;border-radius:3px}
.pp-crown span{top:2px}.pp-chin span{bottom:2px}
.pp-mid{position:absolute;top:0;bottom:0;left:50%;border-left:1px dashed rgba(255,255,255,.75);pointer-events:none}
.sig-wrap{display:grid;grid-template-columns:1fr;gap:14px}
.sig-cap{margin:0 0 6px;font-weight:700;color:var(--ink);font-size:.92rem}
.sig-result{min-height:160px;border-radius:8px;padding:10px}
.sig-result.white{background:#fff}
.sig-result .preview-img{background:none;box-shadow:none;max-height:240px}
.id-wrap{display:flex;flex-direction:column;gap:10px}
.id-tabs{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.id-tabs select{max-width:260px}
.join-wrap{display:flex;flex-direction:column;gap:16px}
.join-prev,.ed-prev{flex-direction:column;gap:6px;min-height:200px}
.join-prev .preview-img{max-height:460px}
@media (max-width:760px){
  .cut-wrap{flex-direction:column}
  .cut-strip{width:100%;max-height:none;flex-direction:row;overflow-x:auto;border-right:0;border-bottom:1px solid var(--line)}
  .pp-frame{width:min(100%,280px)}
}
.cards-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:6px 34px;margin-top:10px}
.cards-2 h3{margin:14px 0 4px}
/* tabs above a tool that has two modes (ID Card Print) */
.mode-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.mode-tabs a{display:inline-flex;align-items:center;min-height:42px;padding:8px 16px;border:1.5px solid var(--line-strong);border-radius:999px;background:var(--sheet);color:var(--ink);font-weight:700;text-decoration:none}
.mode-tabs a:hover{border-color:var(--c-image)}
.mode-tabs a[aria-current="page"]{background:var(--c-image);border-color:var(--c-image);color:#fff}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
@media print{.site-head,.site-foot,.ad,.consent,ins.adsbygoogle{display:none!important}}
.foot-links{display:flex;flex-wrap:wrap;gap:6px 16px}
.file .grip svg,.grip svg{width:18px;height:18px}
.img-card .thumb-slot{display:grid;place-items:center;width:100%;height:100%}

.article .steps{grid-template-columns:1fr;gap:12px;margin-top:12px}
.article .steps li{padding:7px 0 0 50px;min-height:38px;display:block;line-height:1.55}
.crumbs li{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crumbs li:last-child{flex:1 1 0;min-width:0}
