/*! PDFwise · site.css */
@font-face { font-family: "Inter"; src: url("../../vendor/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("../../vendor/fonts/great-vibes.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Dancing Script"; src: url("../../vendor/fonts/dancing-script.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Allura"; src: url("../../vendor/fonts/allura.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../../vendor/fonts/caveat.woff2") format("woff2"); font-display: swap; }

:root {
  --accent: #e5322d;
  --accent-ink: #fff;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 35%, transparent);
  --bg: #f6f6f9;
  --bg-2: #ececf2;
  --surface: #ffffff;
  --surface-2: #fafafc;
  --border: #e4e4ec;
  --border-2: #d2d3de;
  --text: #15161f;
  --text-2: #3b3d4d;
  --muted: #6b6e80;
  --faint: #9c9fb0;
  --ok: #12a26b; --ok-soft: color-mix(in srgb, var(--ok) 13%, transparent);
  --warn: #d98a00; --warn-soft: color-mix(in srgb, var(--warn) 14%, transparent);
  --bad: #e5484d; --bad-soft: color-mix(in srgb, var(--bad) 12%, transparent);
  --viewer: #e9e9f0;
  --shadow-sm: 0 1px 2px rgba(20, 20, 40, .06);
  --shadow: 0 1px 2px rgba(20, 20, 40, .05), 0 8px 24px -8px rgba(20, 20, 40, .14);
  --shadow-lg: 0 24px 60px -12px rgba(20, 20, 40, .3);
  --page-shadow: 0 1px 3px rgba(20, 20, 40, .14), 0 8px 24px -10px rgba(20, 20, 40, .3);
  --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0c0c12; --bg-2: #15161e; --surface: #15161f; --surface-2: #1a1b25; --border: #262836; --border-2: #343747;
  --text: #ededf4; --text-2: #c6c8d6; --muted: #9093a6; --faint: #646779; --viewer: #101118;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -8px rgba(0,0,0,.6); --shadow-lg: 0 30px 70px -10px rgba(0,0,0,.75);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.i { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; overflow: hidden; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 12px; }
.nav > a, .nav > button { height: 38px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 560; font-size: 14px; color: var(--text-2); }
.nav > a:hover, .nav > button:hover, .nav > button[aria-expanded="true"] { background: var(--bg-2); color: var(--text); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.mega { position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 22px 0 26px; animation: drop .18s var(--ease); }
.mega .container { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; height: auto; align-items: start; }
.mega h4 { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px 8px; }
.mega a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: 14px; font-weight: 520; color: var(--text-2); }
.mega a:hover { background: var(--bg-2); color: var(--text); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.ti { --c: var(--accent); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c); flex: none; }
.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn { --b: var(--surface); --c: var(--text); --bd: var(--border-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--bd); background: var(--b); color: var(--c); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; box-shadow: var(--shadow-sm); user-select: none; }
.btn:hover { background: var(--surface-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { --b: var(--accent); --c: var(--accent-ink); --bd: transparent; box-shadow: 0 1px 2px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); border-color: transparent; }
.btn-ghost { --b: transparent; --bd: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-2); border-color: transparent; }
.btn-dark { --b: var(--text); --c: var(--bg); --bd: transparent; }
.btn-dark:hover { background: color-mix(in srgb, var(--text) 85%, var(--bg)); }
.btn-ok { --b: var(--ok); --c: #fff; --bd: transparent; }
.btn-danger { --c: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16.5px; border-radius: 14px; }
.btn-xl { height: 60px; padding: 0 34px; font-size: 18px; border-radius: 16px; }
.btn-icon { width: 40px; padding: 0; } .btn-icon.btn-sm { width: 32px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.select { appearance: none; padding-right: 32px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23868ca0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.is-invalid { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.input-sm { height: 34px; font-size: 13.5px; border-radius: 9px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="color"] { width: 40px; height: 40px; padding: 3px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); cursor: pointer; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.seg { display: flex; padding: 3px; gap: 2px; background: var(--bg-2); border-radius: 11px; border: 1px solid var(--border); }
.seg button { flex: 1; height: 32px; padding: 0 10px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.choice { display: flex; flex-direction: column; gap: 8px; }
.choice label { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.choice label:hover { border-color: var(--border-2); }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { accent-color: var(--accent); margin-top: 3px; }
.choice b { display: block; font-size: 14px; }
.choice span { font-size: 12.5px; color: var(--muted); }
.posgrid { display: grid; grid-template-columns: repeat(3, 34px); gap: 4px; }
.posgrid button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.posgrid button::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.posgrid button.on { border-color: var(--accent); background: var(--accent-soft); }
.posgrid button.on::after { background: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 520px; background: radial-gradient(600px 260px at 50% 30%, var(--accent-soft), transparent 70%); pointer-events: none; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 800; letter-spacing: -.035em; position: relative; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 660px; margin: 16px auto 0; position: relative; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 22px; font-size: 13.5px; color: var(--text-2); font-weight: 560; position: relative; }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust .i { color: var(--ok); }
.tool-hero { padding: 44px 0 24px; }
.tool-hero h1 { font-size: clamp(30px, 4.4vw, 44px); }
.tool-hero .badge { --c: var(--accent); width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 16px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c); box-shadow: var(--shadow-sm); position: relative; }

/* ---------- Home tool grid ---------- */
.search-wrap { position: relative; max-width: 520px; margin: 28px auto 0; }
.search-wrap .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search-wrap input { height: 52px; border-radius: 14px; padding-left: 46px; font-size: 16px; box-shadow: var(--shadow); }
.cat-tabs { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 30px 0 22px; }
.cat-tabs button { height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.cat-tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tool-card { --c: var(--accent); position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .18s var(--ease), box-shadow .18s, border-color .18s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 40%, var(--border)); }
.tool-card .ti { width: 44px; height: 44px; border-radius: 12px; }
.tool-card h3 { font-size: 17px; }
.tool-card p { font-size: 13.5px; color: var(--muted); }
.tool-card .new { position: absolute; top: 16px; right: 16px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { color: var(--muted); margin-top: 10px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.feature .ti { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); position: relative; }
.step::before { counter-increment: s; content: counter(s); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 12px; }
.step p { color: var(--text-2); font-size: 14.5px; }
.faq { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 650; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 16px; color: var(--muted); }

/* ---------- Ads ---------- */
.ad-slot { display: flex; justify-content: center; margin: 18px auto; max-width: 970px; }
.ad-slot:empty { display: none; }
.ad-slot.demo { min-height: 90px; border: 1px dashed var(--border-2); border-radius: 12px; align-items: center; color: var(--faint); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: repeating-linear-gradient(45deg, transparent 0 10px, var(--bg-2) 10px 20px); }

/* ---------- Tool app ---------- */
.tool-app { margin: 10px auto 0; max-width: 1200px; }
.drop {
  position: relative; max-width: 860px; margin: 0 auto; border-radius: var(--r-xl); border: 2px dashed var(--border-2); background: var(--surface);
  min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 44px 24px; text-align: center; transition: border-color .15s, background .15s, transform .15s;
  box-shadow: var(--shadow);
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.drop .big-ico { width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.drop h2 { font-size: 22px; }
.drop input[type=file] { display: none; }
.drop .sample { font-size: 13.5px; color: var(--muted); }
.drop .sample button { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; }
.drop .badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 560; color: var(--text-2); }
.chip .i { color: var(--ok); }

.work { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.work-main { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); min-height: 460px; position: relative; overflow: hidden; }
.work-main.flush { background: var(--viewer); }
.work-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.work-bar .sep { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }
.work-side { position: sticky; top: 80px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); max-height: calc(100vh - 96px); }
.side-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.side-head h2 { font-size: 18px; }
.side-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; overflow: auto; }
.side-foot { padding: 16px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); display: flex; flex-direction: column; gap: 10px; }
.side-foot .btn-primary { height: 52px; font-size: 16px; border-radius: 14px; }
.opt-title { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.note { padding: 11px 13px; border-radius: 11px; font-size: 13px; background: var(--bg-2); color: var(--text-2); display: flex; gap: 10px; }
.note .i { margin-top: 2px; color: var(--muted); }
.note.warn { background: var(--warn-soft); } .note.warn .i { color: var(--warn); }
.note.ok { background: var(--ok-soft); } .note.ok .i { color: var(--ok); }

/* File cards (merge, images) */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 20px; }
.fcard { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); cursor: grab; transition: box-shadow .15s, transform .15s, opacity .15s; user-select: none; touch-action: none; }
.fcard:hover { box-shadow: var(--shadow); }
.fcard.dragging { opacity: .35; }
.fcard .thumb { aspect-ratio: 3 / 4; border-radius: 8px; background: var(--viewer); display: grid; place-items: center; overflow: hidden; position: relative; }
.fcard .thumb img, .fcard .thumb canvas { max-width: 100%; max-height: 100%; box-shadow: var(--page-shadow); background: #fff; transition: transform .2s; }
.fcard .name { font-size: 12.5px; font-weight: 600; }
.fcard .meta { font-size: 11.5px; color: var(--muted); }
.fcard .x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 2; }
.fcard .tools { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; z-index: 2; }
.fcard .tools button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; }
.fcard:hover .x, .fcard:hover .tools, .fcard:focus-within .x { opacity: 1; }
.fcard .order { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.add-card { border: 2px dashed var(--border-2); background: transparent; cursor: pointer; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; font-size: 13px; min-height: 200px; }
.add-card:hover { border-color: var(--accent); color: var(--accent); }
.drop-marker { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Page grid */
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--pw, 138px), 1fr)); gap: 18px 16px; padding: 22px; }
.pg { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; user-select: none; touch-action: none; }
.pg .pv { position: relative; width: 100%; aspect-ratio: 3 / 4; display: grid; place-items: center; border-radius: 10px; padding: 8px; transition: background .15s; }
.pg:hover .pv { background: var(--bg-2); }
.pg .pv canvas, .pg .pv .ph { max-width: 100%; max-height: 100%; background: #fff; box-shadow: var(--page-shadow); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.pg .pv .ph { width: 75%; aspect-ratio: 1 / 1.414; }
.pg .lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.pg.sel .pv { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent) inset; }
.pg.sel .lbl { color: var(--accent); }
.pg.del .pv canvas { opacity: .3; }
.pg.del .pv::after { content: ""; position: absolute; inset: 8px; background: linear-gradient(to top right, transparent calc(50% - 1.5px), var(--bad) calc(50% - 1.5px), var(--bad) calc(50% + 1.5px), transparent calc(50% + 1.5px)); opacity: .8; border-radius: 4px; }
.pg.del .lbl { color: var(--bad); text-decoration: line-through; }
.pg .tick { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: none; place-items: center; z-index: 2; }
.pg.sel .tick { display: grid; }
.pg .acts { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); opacity: 0; transition: opacity .15s; z-index: 3; }
.pg:hover .acts, .pg:focus-within .acts { opacity: 1; }
.pg .acts button { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.pg .acts button:hover { background: var(--bg-2); }
.pg .acts button.danger:hover { background: var(--bad-soft); color: var(--bad); }
.pg .grp { position: absolute; left: 8px; right: 8px; bottom: 28px; height: 4px; border-radius: 99px; background: var(--c); }
.pg.dragging { opacity: .3; }
.pg .badge-file { position: absolute; bottom: 30px; right: 10px; font-size: 10px; font-weight: 700; color: #fff; background: var(--c, var(--accent)); padding: 1px 6px; border-radius: 99px; }
.pg-insert { position: absolute; width: 3px; border-radius: 3px; background: var(--accent); pointer-events: none; z-index: 5; }

/* Page viewer / editor */
.ed { display: flex; flex-direction: column; height: min(78vh, 900px); }
.ed-tools { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.ed-tools .tool { height: 36px; padding: 0 11px; border-radius: 9px; border: 1px solid transparent; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; color: var(--text-2); }
.ed-tools .tool:hover { background: var(--bg-2); }
.ed-tools .tool.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.ed-tools .sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.ed-view { flex: 1; overflow: auto; background: var(--viewer); position: relative; }
.ed-pages { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 24px 16px 60px; min-width: min-content; }
.ed-page { position: relative; background: #fff; box-shadow: var(--page-shadow); }
.ed-page canvas { display: block; width: 100%; height: 100%; }
.ed-page .ov { position: absolute; inset: 0; }
.ed-page .ov.adding { cursor: crosshair; }
.ed-page .num { position: absolute; left: 0; top: -18px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ob { position: absolute; user-select: none; touch-action: none; cursor: move; }
.ob.sel { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 5; }
.ob .h { position: absolute; width: 12px; height: 12px; border-radius: 3px; background: #fff; border: 2px solid var(--accent); display: none; }
.ob.sel .h { display: block; }
.ob .h.se { right: -7px; bottom: -7px; cursor: nwse-resize; } .ob .h.nw { left: -7px; top: -7px; cursor: nwse-resize; }
.ob .h.ne { right: -7px; top: -7px; cursor: nesw-resize; } .ob .h.sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.ob img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; display: block; }
.ob .txt { width: 100%; height: 100%; white-space: pre; overflow: visible; line-height: 1.2; outline: none; cursor: text; font-family: Helvetica, Arial, sans-serif; }
.ob svg { width: 100%; height: 100%; overflow: visible; display: block; pointer-events: none; }
.ob .ob-act { position: absolute; top: -40px; left: 0; display: none; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); white-space: nowrap; z-index: 6; }
.ob.sel .ob-act { display: flex; }
.ob .ob-act button { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.ob .ob-act button:hover { background: var(--bg-2); }
.crop-box { position: absolute; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(10, 10, 20, .45); cursor: move; touch-action: none; }
.crop-box .h { display: block; }
.preview-page { position: relative; margin: 0 auto; background: #fff; box-shadow: var(--page-shadow); }
.preview-page canvas { display: block; width: 100%; }
.preview-wrap { padding: 28px; display: flex; justify-content: center; background: var(--viewer); min-height: 460px; align-items: flex-start; }

/* Busy / progress */
.busy-card { max-width: 560px; margin: 30px auto; padding: 40px 28px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.loader { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { width: 100%; max-width: 380px; height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .25s; }

/* Result */
.result { max-width: 760px; margin: 10px auto 0; text-align: center; padding: 40px 28px 30px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow); }
.result .ok-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; animation: popin .5s var(--ease); }
@keyframes popin { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } }
.result h2 { font-size: 26px; }
.result .sub { color: var(--muted); margin-top: 6px; }
.result .dl { margin: 22px 0 10px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.saving { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 14px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 14px; }
.out-list { margin: 18px auto 0; max-width: 520px; text-align: left; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.out-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); font-size: 13.5px; }
.continue { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.continue h4 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.continue .row { justify-content: center; flex-wrap: wrap; gap: 8px; }
.textout { width: 100%; min-height: 360px; font: 13px/1.6 var(--mono); padding: 18px; border: 0; resize: vertical; background: var(--surface); color: var(--text); outline: none; }

/* Modal & toast */
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(10, 10, 20, .5); backdrop-filter: blur(3px); animation: fade .18s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: rise .22s var(--ease); overflow: hidden; }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 12px; }
.modal-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.modal-body { padding: 4px 22px 18px; overflow: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.toasts { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 400px; padding: 12px 14px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 520; font-size: 14px; animation: rise .25s var(--ease); }
.toast .i { color: var(--ok); } .toast.error .i { color: #ff8b8e; } .toast.info .i { color: #7cc5ff; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .25s; }

/* Signature pad */
.pad-wrap { position: relative; border-radius: 14px; border: 1px solid var(--border-2); background: #fff; overflow: hidden; touch-action: none; }
.pad-wrap canvas { display: block; width: 100%; height: 210px; cursor: crosshair; touch-action: none; }
.pad-wrap .baseline { position: absolute; left: 24px; right: 24px; bottom: 50px; border-bottom: 1.5px dashed #c9cdd9; pointer-events: none; }
.pad-wrap .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #b4b8c6; pointer-events: none; }
.pad-tools { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; }
.pad-tools .btn { background: rgba(255,255,255,.92); color: #333; border-color: #dde0e8; }
.swatches { display: flex; gap: 8px; align-items: center; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-2); cursor: pointer; background: var(--c); padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--accent); }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-opt { height: 78px; border-radius: 12px; border: 1px solid var(--border-2); background: #fff; color: #1b1f3b; cursor: pointer; display: grid; place-items: center; font-size: 30px; padding: 0 10px; overflow: hidden; white-space: nowrap; }
.type-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.upload-area { min-height: 180px; border-radius: 14px; border: 2px dashed var(--border-2); background: var(--surface-2); display: grid; place-items: center; text-align: center; position: relative; padding: 18px; }
.upload-area img { max-height: 150px; background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 0 / 14px 14px; }
.upload-area input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sig-list { display: flex; gap: 8px; flex-wrap: wrap; }
.sig-item { height: 56px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: #fff; cursor: pointer; display: grid; place-items: center; position: relative; }
.sig-item img { height: 40px; }
.sig-item:hover { border-color: var(--accent); }

/* Form fields list */
.form-list { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.form-list .field { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.form-list .fname { font-size: 11.5px; color: var(--faint); font-family: var(--mono); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--surface); padding: 48px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 24px; }
.foot-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 12px; }
.foot-grid a { display: block; font-size: 13.5px; color: var(--text-2); padding: 3px 0; }
.foot-grid a:hover { color: var(--accent); }
.foot-bottom { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.foot-bottom a:hover { color: var(--text); }

/* Prose (privacy etc.) */
.prose { max-width: 760px; margin: 0 auto; padding: 48px 20px; }
.prose h1 { font-size: 36px; margin-bottom: 12px; }
.prose h2 { font-size: 21px; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--text-2); }
.prose p + p { margin-top: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .work { grid-template-columns: 1fr; }
  .work-side { position: static; max-height: none; }
  .mega .container { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header.open .nav { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px; margin: 0; box-shadow: var(--shadow-lg); }
  .mega { position: static; box-shadow: none; border: 0; padding: 6px 0; }
  .mega .container { grid-template-columns: 1fr 1fr; padding: 0; }
  .features, .steps { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 28px; }
  .drop { min-height: 250px; padding: 32px 18px; }
  .files { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); padding: 14px; gap: 12px; }
  .pages { --pw: 108px; padding: 14px; gap: 12px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .pg .acts, .fcard .x, .fcard .tools { opacity: 1; }
  .ed { height: 70vh; }
  .modal-back { padding: 0; align-items: end; }
  .modal { border-radius: 20px 20px 0 0; max-height: 94vh; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } html { scroll-behavior: auto; } }
.header-actions .menu-toggle { display: none; }
@media (max-width: 760px) { .header-actions .menu-toggle { display: inline-flex; } }
@media (max-width: 760px) { .site-header.open .nav { max-height: calc(100vh - 64px); overflow-y: auto; } }
