/* PDF Toolkit — light premium design system */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --white: #FFFFFF;
  --ground: #FFFFFF;
  --ground-alt: #F7F8FA;
  --ground-alt2: #F9FAFB;
  --card: #FFFFFF;
  --ink: #111827;
  --ink2: #6B7280;
  --ink3: #9CA3AF;
  --accent: #E5322D;
  --accent-d: #C42824;
  --accent-l: #FEF2F2;
  --accent-glow: rgba(229, 50, 45, 0.08);
  --line: #E5E7EB;
  --line2: #D1D5DB;
  --ok: #059669;
  --ok-bg: #ECFDF5;
  --err: #DC2626;
  --err-bg: #FEF2F2;
  --warn: #D97706;
  --warn-bg: #FFFBEB;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.06), 0 8px 24px rgba(17, 24, 39, 0.05);
  --shadow-lg: 0 4px 16px rgba(17, 24, 39, 0.08), 0 20px 48px rgba(17, 24, 39, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --touch: 44px;
  --max: 1120px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--accent-l); color: var(--accent-d); }
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-d); }
button, input, select, textarea { font-family: inherit; }
img, svg { display: block; max-width: 100%; }
main { flex: 1; }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-alt { background: var(--ground-alt); }
.section-head { margin-bottom: 32px; }
.section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.section-head p {
  font-size: 16px;
  color: var(--ink2);
  margin-top: 8px;
  max-width: 560px;
  line-height: 1.6;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; color: inherit; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-t {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}
.brand-t small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink3);
  margin-top: 1px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--ground-alt); color: var(--ink); text-decoration: none; }
.nav-link.active { color: var(--accent); background: var(--accent-l); }

.nav-dd { position: relative; }
.nav-dd > button {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-dd > button:hover { background: var(--ground-alt); color: var(--ink); }
.nav-dd > button svg { width: 14px; height: 14px; transition: transform 0.2s; }
.nav-dd.open > button { color: var(--accent); background: var(--accent-l); }
.nav-dd.open > button svg { transform: rotate(180deg); }
.nav-dd-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.nav-dd.open .nav-dd-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dd-panel a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  border-radius: 8px;
  text-decoration: none;
}
.nav-dd-panel a:hover { background: var(--ground-alt); color: var(--accent); text-decoration: none; }
.nav-dd-panel a span { display: block; font-size: 12px; font-weight: 500; color: var(--ink3); margin-top: 2px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: var(--touch);
  height: var(--touch);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; color: var(--ink); }

/* Breadcrumb */
.breadcrumb {
  padding: 20px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.breadcrumb a { color: var(--ink2); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb .sep { color: var(--line2); user-select: none; }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* Hero */
.hero { padding: 48px 0 40px; }
.hero-compact { padding: 32px 0 24px; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-l);
  border: 1px solid rgba(229, 50, 45, 0.15);
  border-radius: 100px;
  padding: 6px 14px;
  margin-bottom: 20px;
}
h1.htitle {
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--ink);
  max-width: 720px;
}
h1.htitle em { font-style: normal; color: var(--accent); }
.lead {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--ink2);
  margin-top: 16px;
  max-width: 600px;
  line-height: 1.65;
  font-weight: 500;
}
.lead b { color: var(--ink); font-weight: 700; }
.badge-lite {
  display: inline-block;
  background: var(--warn-bg);
  border: 1px solid #FDE68A;
  color: var(--warn);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-left: 10px;
  vertical-align: middle;
}

/* Trust pills */
.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
}
.trust-pill svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Search */
.search-wrap { margin-top: 32px; max-width: 480px; position: relative; }
.search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--ink3);
  pointer-events: none;
}
.search-input {
  width: 100%;
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 14px 16px 14px 48px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--card);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-input::placeholder { color: var(--ink3); }
.search-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink2);
  font-size: 15px;
  font-weight: 500;
}

/* Tool cards (hub) */
.cat-section { margin-bottom: 48px; }
.cat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-l);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cat-icon svg { width: 22px; height: 22px; }
.cat-head h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cat-head p { font-size: 13px; color: var(--ink2); font-weight: 500; margin-top: 2px; }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.tool-card .tc-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--ground-alt);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--accent);
  transition: background 0.2s, border-color 0.2s;
}
.tool-card:hover .tc-icon { background: var(--accent-l); border-color: rgba(229, 50, 45, 0.2); }
.tool-card .tc-icon svg { width: 22px; height: 22px; }
.tool-card .tc-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.tool-card .tc-desc { font-size: 13px; color: var(--ink2); margin-top: 4px; line-height: 1.45; font-weight: 500; }

.featured-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.featured-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.featured-card:hover {
  border-color: var(--accent);
  background: var(--accent-l);
  text-decoration: none;
  color: inherit;
  transform: translateY(-1px);
}
.featured-card .fc-icon { color: var(--accent); flex-shrink: 0; }
.featured-card .fc-icon svg { width: 24px; height: 24px; }
.featured-card .fc-name { font-size: 14px; font-weight: 700; }
.featured-card .fc-desc { font-size: 12px; color: var(--ink2); margin-top: 1px; }

/* Tool page layout */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
  margin: 24px 0 48px;
}
.tool-head { margin-bottom: 20px; }
.tool-head h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}
.tool-head .tool-intro {
  font-size: 15px;
  color: var(--ink2);
  margin-top: 10px;
  line-height: 1.6;
  font-weight: 500;
}
.tool-head .tool-intro b { color: var(--ink); font-weight: 700; }

.tool-card-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tool-card-body { padding: 28px; }

.tool-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--nav-h) + 20px); }
.sidebar-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-block h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 12px;
}
.sidebar-links { display: flex; flex-direction: column; gap: 4px; }
.sidebar-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.sidebar-links a:hover { background: var(--ground-alt); color: var(--accent); text-decoration: none; }
.privacy-mini { font-size: 13px; color: var(--ink2); line-height: 1.55; font-weight: 500; }
.privacy-mini b { color: var(--ink); font-weight: 700; }
.privacy-mini .lock-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ok-bg);
  color: var(--ok);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}
.privacy-mini .lock-icon svg { width: 18px; height: 18px; }

/* Dropzone */
.drop {
  border: 2px dashed var(--line2);
  border-radius: var(--radius);
  background: var(--ground-alt2);
  padding: 56px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.drop:hover, .drop:focus-visible {
  border-color: var(--accent);
  background: var(--accent-l);
  outline: none;
}
.drop.over {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-l);
  transform: scale(1.01);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.drop.has-file {
  border-color: var(--ok);
  border-style: solid;
  background: var(--ok-bg);
}
.drop .dz-ic {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}
.drop.over .dz-ic { transform: scale(1.08) translateY(-4px); }
.drop .dz-ic svg { width: 32px; height: 32px; }
.drop .dz-t { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.drop .dz-t b { color: var(--accent); font-weight: 800; }
.drop .dz-s { font-size: 14px; color: var(--ink2); margin-top: 8px; font-weight: 500; max-width: 360px; }
.drop input[type=file] { display: none; }

/* Messages */
.msg {
  margin-top: 20px;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.msg .mi { flex: 0 0 auto; line-height: 1.2; }
.msg .mi svg { width: 20px; height: 20px; }
.msg.err { background: var(--err-bg); color: #991B1B; border: 1px solid #FECACA; }
.msg.err .mi { color: var(--err); }
.msg.ok, .msg.success-panel {
  background: var(--ok-bg);
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 22px 24px;
  flex-direction: column;
  align-items: stretch;
}
.msg.success-panel .success-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.msg.success-panel .success-check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.msg.success-panel .success-check svg { width: 24px; height: 24px; }
.msg.success-panel .success-title { font-size: 17px; font-weight: 800; display: block; letter-spacing: -0.02em; }
.msg.success-panel .success-sub { font-size: 14px; margin-top: 4px; font-weight: 500; opacity: 0.9; }
.msg.success-panel .success-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.msg.warn { background: var(--warn-bg); color: #92400E; border: 1px solid #FDE68A; }
.msg[hidden] { display: none !important; }

/* Forms */
.fld { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; margin-top: 18px; }
.fld label { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.txtin, select.txtin, textarea.txtin {
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  outline: 0;
  background: var(--card);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.txtin:focus, select.txtin:focus, textarea.txtin:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.txtin.mono { font-family: var(--mono); font-size: 14px; }
.hint { font-size: 13px; color: var(--ink2); font-weight: 500; line-height: 1.5; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.modes { display: flex; gap: 10px; flex-wrap: wrap; }
.mode {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--line2);
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: 0.15s var(--ease);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.mode:hover { border-color: var(--accent); }
.mode.on { border-color: var(--accent); border-width: 2px; background: var(--accent-l); }
.mode input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; }
.mode .mt { font-size: 14px; font-weight: 700; display: block; }
.mode .md { font-size: 13px; color: var(--ink2); margin-top: 3px; display: block; font-weight: 500; }

/* Buttons */
.actionrow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.summ { font-size: 14px; font-weight: 600; color: var(--ink2); }
.summ b { color: var(--ink); }
.actionrow .spacer { flex: 1; }
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  min-height: var(--touch);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(229, 50, 45, 0.2);
}
.btn:hover:not(:disabled) {
  background: var(--accent-d);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(229, 50, 45, 0.28);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line2);
  box-shadow: none;
}
.btn.ghost:hover:not(:disabled) { background: var(--ground-alt); border-color: var(--accent); color: var(--accent); box-shadow: none; }
.btn.sm { padding: 10px 16px; font-size: 14px; min-height: 40px; }
.btn.dl { background: var(--ok); box-shadow: 0 1px 2px rgba(5, 150, 105, 0.2); }
.btn.dl:hover:not(:disabled) { background: #047857; box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28); }
.btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* File list */
.filelist { list-style: none; margin: 20px 0 0; display: flex; flex-direction: column; gap: 8px; }
.frow {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ground-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.frow.bad { border-color: #FECACA; background: var(--err-bg); }
.frow .fico {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.frow.bad .fico { background: var(--err); }
.frow .fmeta { flex: 1; min-width: 0; }
.frow .fname {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.frow .fsub { font-size: 12px; color: var(--ink2); margin-top: 2px; font-weight: 500; }
.frow .fpages {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 10px;
  white-space: nowrap;
}
.facts { display: flex; gap: 4px; }
.icbtn {
  border: 1px solid var(--line2);
  background: var(--card);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--ink2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.icbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-l); }
.icbtn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Drag-to-reorder affordance on file rows */
.fgrip {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 18px; align-self: stretch;
  color: #b6bcc7; cursor: grab; touch-action: none;
}
.fgrip:hover { color: var(--ink2); }
.frow-drag { cursor: grab; }
.frow-drag:active { cursor: grabbing; }
.frow-drag .icbtn { cursor: pointer; }
.frow.dragging { opacity: 0.45; border-style: dashed; }
.frow.drag-over { box-shadow: inset 0 3px 0 var(--accent); border-color: var(--accent); }
.reorder-hint { display: flex; align-items: center; gap: 6px; margin: 10px 2px 4px; }
.reorder-hint .fgrip { cursor: default; width: 16px; color: var(--ink2); }

/* Working / progress */
.working {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  background: var(--ground-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.working[hidden] { display: none !important; }
.bar {
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
  flex: 1;
  min-width: 100px;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-d));
  width: 0%;
  transition: width 0.35s var(--ease);
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.step .sn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  background: var(--accent);
}
.step h3 { font-size: 16px; font-weight: 800; margin: 16px 0 8px; letter-spacing: -0.02em; }
.step p { font-size: 14px; color: var(--ink2); line-height: 1.6; font-weight: 500; }

/* Privacy block */
.privacy-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.privacy-block h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.privacy-block .priv-lead {
  font-size: 16px;
  color: var(--ink2);
  margin-bottom: 24px;
  line-height: 1.65;
  font-weight: 500;
  max-width: 640px;
}
.privacy-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.privacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: var(--ink2);
  line-height: 1.55;
  font-weight: 500;
}
.privacy-list li .check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  display: grid;
  place-items: center;
}
.privacy-list li .check svg { width: 14px; height: 14px; }
.privacy-list li b { color: var(--ink); font-weight: 700; }
.privacy-note {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--ground-alt);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink2);
  line-height: 1.55;
  font-weight: 500;
  border: 1px solid var(--line);
}

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.15s;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  transition: background 0.15s;
}
.faq summary:hover { background: var(--ground-alt); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-l);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq details[open] summary .faq-icon { transform: rotate(45deg); }
.faq .fa {
  padding: 0 20px 20px 62px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink2);
  font-weight: 500;
}

/* Related */
.related { display: flex; gap: 8px; flex-wrap: wrap; }
.related a {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink2);
  text-decoration: none;
  transition: all 0.15s;
}
.related a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-l); text-decoration: none; }

/* Compare */
.compare-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.compare-pane { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.compare-pane h4 { font-size: 12px; font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink2); background: var(--ground-alt); }
.compare-pane canvas { width: 100%; display: block; }

/* ── Workbench (upload → configure → result) ── */
.wb-stage[hidden] { display: none !important; }
.wb-files { list-style: none; margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.wb-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.wb-toolbar .spacer { flex: 1; }
.wb-add-more {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px dashed var(--line2); background: var(--ground-alt2);
  color: var(--ink2); font-size: 14px; font-weight: 600;
  border-radius: var(--radius-sm); padding: 10px 16px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.wb-add-more:hover { border-color: var(--accent); color: var(--accent); }

/* Page thumbnails */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin: 16px 0; }
.pgrid.lg { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pthumb {
  position: relative;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 8px 6px;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, opacity 0.2s;
  user-select: none;
}
.pthumb.clickable { cursor: pointer; }
.pthumb.grab { cursor: grab; }
.pthumb.grab:active { cursor: grabbing; }
.pthumb:hover { border-color: var(--line2); box-shadow: var(--shadow-sm); }
.pthumb.sel { border-color: var(--accent); background: var(--accent-l); }
.pthumb.deleted { opacity: 0.4; }
.pthumb.deleted .pcanvas { filter: grayscale(1); }
.pthumb.dragging { opacity: 0.5; border-style: dashed; }
.pthumb.dragover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.pthumb .pcanvas {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  min-height: 60px;
  display: flex; align-items: center; justify-content: center;
}
.pthumb .pcanvas canvas { width: 100%; height: auto; display: block; transition: transform 0.25s var(--ease); }
.pthumb .pn { font-size: 11px; font-weight: 700; color: var(--ink2); margin-top: 6px; display: block; }
.pthumb .pbadge {
  position: absolute; top: 4px; left: 4px; z-index: 2;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 800;
  border-radius: 6px; padding: 2px 7px;
  box-shadow: var(--shadow-sm);
}
.pthumb .pdel {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 24px; height: 24px; border-radius: 7px;
  border: 1px solid var(--line2); background: rgba(255,255,255,0.95);
  color: var(--ink2); font-size: 12px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.pthumb .pdel:hover { color: var(--err); border-color: var(--err); background: var(--err-bg); }
.pthumb .prot {
  position: absolute; bottom: 26px; right: 6px; z-index: 2;
  width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid var(--line2); background: rgba(255,255,255,0.95);
  color: var(--ink2); font-size: 13px;
  display: grid; place-items: center; cursor: pointer;
}
.pthumb .prot:hover { color: var(--accent); border-color: var(--accent); }

/* Result panel */
.result-panel {
  border: 1px solid #A7F3D0;
  background: var(--ok-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 8px;
}
.result-head { display: flex; align-items: center; gap: 14px; }
.result-head .success-check {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--ok); color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.result-head .success-check svg { width: 24px; height: 24px; }
.result-title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: #065F46; }
.result-sub { font-size: 14px; font-weight: 600; color: #047857; margin-top: 2px; word-break: break-all; }
.result-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.result-stat {
  font-size: 13px; font-weight: 500; color: #065F46;
  background: #fff; border: 1px solid #A7F3D0;
  border-radius: 100px; padding: 6px 14px;
}
.result-stat b { font-weight: 800; }
.result-preview { margin-top: 18px; }
.result-prev-label { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #047857; margin-bottom: 10px; }
.result-pages { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.result-page {
  flex: 0 0 auto; width: 120px;
  background: #fff; border: 1px solid #A7F3D0; border-radius: 8px;
  padding: 6px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.result-page canvas { width: 100%; height: auto; display: block; border-radius: 3px; }
.result-page .pn { font-size: 10px; font-weight: 700; color: var(--ink3); display: block; margin-top: 4px; }
.result-page.more {
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #047857;
  min-height: 120px;
}
.result-ziplist { list-style: none; display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.result-ziplist li {
  display: flex; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid #A7F3D0; border-radius: 8px;
  font-size: 13px; font-weight: 600; padding: 8px 12px; color: #065F46;
}
.result-ziplist .zsize { color: #047857; font-weight: 500; flex-shrink: 0; }
.result-img { max-width: 320px; border: 1px solid #A7F3D0; border-radius: 8px; background: #fff; padding: 6px; }
.result-text {
  background: #fff; border: 1px solid #A7F3D0; border-radius: 8px;
  padding: 14px; font-size: 12px; line-height: 1.6; font-family: var(--mono);
  max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  color: var(--ink);
}
.result-note { margin-top: 14px; color: #065F46; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* Preview button (leads people to see the PDF before download) */
.btn.preview {
  background: #fff;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  box-shadow: 0 1px 2px rgba(229, 50, 45, 0.12);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.preview:hover:not(:disabled) { background: rgba(229, 50, 45, 0.06); box-shadow: 0 4px 14px rgba(229, 50, 45, 0.18); }
.pv-eye { width: 18px; height: 18px; flex: 0 0 auto; }
.result-pages.clickable { cursor: zoom-in; }
.result-pages.clickable .result-page { transition: transform .12s ease, box-shadow .12s ease; }
.result-pages.clickable:hover .result-page { box-shadow: 0 4px 14px rgba(17, 24, 39, 0.12); }

/* Full-screen native PDF preview modal */
.pv-back {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(17, 24, 39, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, 3vh) max(12px, 3vw);
  animation: pv-fade .12s ease;
}
@keyframes pv-fade { from { opacity: 0; } to { opacity: 1; } }
.pv-modal {
  background: #fff; border-radius: 14px; overflow: hidden;
  width: min(1080px, 96vw); height: min(92vh, 1200px);
  display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}
.pv-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.pv-title { font-weight: 700; color: var(--ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.pv-spacer { flex: 1; }
.pv-openlink { color: var(--ink2); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pv-openlink:hover { color: var(--accent); }
.btn.dl.sm { padding: 8px 14px; font-size: 14px; }
.pv-close {
  border: 1px solid var(--line); background: #fff; color: var(--ink2);
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 15px; line-height: 1;
  flex: 0 0 auto;
}
.pv-close:hover { background: var(--ground-alt); color: var(--ink); }

/* paging toolbar */
.pv-nav {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--ground-alt);
}
.pv-navbtn {
  min-width: 34px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; cursor: pointer; font-size: 17px; line-height: 1; font-weight: 700;
}
.pv-navbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pv-navbtn:disabled { opacity: .4; cursor: default; }
.pv-pagelbl { min-width: 66px; text-align: center; font-weight: 700; color: var(--ink); font-size: 14px; }
.pv-zoomlbl { min-width: 48px; text-align: center; color: var(--ink2); font-size: 13px; font-weight: 600; }
.pv-navsep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

/* scrollable page area */
.pv-body { flex: 1; min-height: 0; overflow: auto; background: #525659; }
.pv-canvas-host { min-height: 100%; display: flex; align-items: flex-start; justify-content: center; padding: 20px; box-sizing: border-box; }
.pv-page-canvas { height: auto; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); border-radius: 2px; display: block; }
.pv-loading, .pv-error { color: #fff; align-self: center; margin: auto; font-size: 14px; padding: 40px 20px; text-align: center; }
.pv-error a, .pv-loading a { color: #fff; text-decoration: underline; }
.pv-imgbody { display: flex; align-items: center; justify-content: center; padding: 20px; }
.pv-img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); border-radius: 2px; }

/* Clickable ZIP entries (click a file to preview it) */
.result-ziplist li.zpreview { cursor: zoom-in; border-radius: 8px; }
.result-ziplist li.zpreview:hover { background: var(--accent-l); }
.result-ziplist .zeye { color: var(--accent); font-weight: 700; font-size: 12px; margin-left: 8px; white-space: nowrap; }
@media (max-width: 640px) {
  .pv-title { max-width: 30vw; }
  .pv-openlink { display: none; }
}

/* Live option previews */
.preview-stage {
  position: relative;
  margin: 16px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ground-alt);
  overflow: hidden;
  max-width: 100%;
  width: fit-content;
}
.preview-stage canvas { display: block; max-width: 100%; }
.preview-overlay { position: absolute; inset: 0; pointer-events: none; }

/* Position picker (3×3) */
.pospick { display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; }
.pospick button {
  width: 44px; height: 36px; border-radius: 8px;
  border: 1px solid var(--line2); background: var(--card); cursor: pointer;
  display: grid; place-items: center; color: var(--ink3);
  transition: 0.15s;
}
.pospick button::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: currentColor; }
.pospick button:hover { border-color: var(--accent); color: var(--accent); }
.pospick button.on { border-color: var(--accent); background: var(--accent-l); color: var(--accent); }

/* Crop box */
.cropbox {
  position: absolute; border: 2px solid var(--accent);
  background: rgba(229, 50, 45, 0.08);
  cursor: move; touch-action: none;
}
.cropbox .cbh {
  position: absolute; width: 14px; height: 14px;
  background: #fff; border: 2px solid var(--accent); border-radius: 50%;
  touch-action: none;
}
.cropbox .cbh.nw { top: -8px; left: -8px; cursor: nwse-resize; }
.cropbox .cbh.ne { top: -8px; right: -8px; cursor: nesw-resize; }
.cropbox .cbh.sw { bottom: -8px; left: -8px; cursor: nesw-resize; }
.cropbox .cbh.se { bottom: -8px; right: -8px; cursor: nwse-resize; }
.crop-shade { position: absolute; background: rgba(17, 24, 39, 0.45); pointer-events: none; }

/* Signature pad */
.sigpad-wrap { border: 1px solid var(--line2); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.sigpad-wrap canvas { display: block; width: 100%; touch-action: none; cursor: crosshair; }
.sig-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.sig-tabs button {
  border: 1px solid var(--line2); background: var(--card); color: var(--ink2);
  font-size: 13px; font-weight: 700; border-radius: 8px; padding: 8px 14px; cursor: pointer;
}
.sig-tabs button.on { border-color: var(--accent); background: var(--accent-l); color: var(--accent); }

/* ── PDF Editor ── */
.ed-root { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.ed-toolbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--ground-alt);
  position: sticky; top: var(--nav-h); z-index: 20;
}
.ed-tool {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent; background: none; color: var(--ink2);
  font-size: 13px; font-weight: 700; font-family: inherit;
  border-radius: 8px; padding: 8px 10px; cursor: pointer;
  transition: 0.12s; white-space: nowrap;
}
.ed-tool svg { width: 16px; height: 16px; }
.ed-tool:hover { background: var(--card); color: var(--ink); border-color: var(--line); }
.ed-tool.on { background: var(--accent-l); color: var(--accent); border-color: rgba(229,50,45,0.3); }
.ed-tool:disabled { opacity: 0.35; cursor: not-allowed; }
.ed-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; flex-shrink: 0; }
.ed-toolbar .spacer { flex: 1; }
.ed-save { padding: 9px 18px; font-size: 14px; }
.ed-propbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--card);
  font-size: 13px; font-weight: 600; color: var(--ink2);
}
.ed-propbar[hidden] { display: none; }
.ed-propbar select, .ed-propbar input[type=number] {
  border: 1px solid var(--line2); border-radius: 7px; padding: 5px 8px;
  font-size: 13px; font-weight: 600; font-family: inherit; color: var(--ink); background: #fff;
}
.ed-propbar input[type=color] {
  width: 32px; height: 28px; border: 1px solid var(--line2); border-radius: 7px;
  padding: 2px; background: #fff; cursor: pointer;
}
.ed-propbar .ed-style-btn {
  width: 30px; height: 28px; border: 1px solid var(--line2); border-radius: 7px;
  background: #fff; color: var(--ink2); font-size: 13px; cursor: pointer;
}
.ed-propbar .ed-style-btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-l); }
.ed-viewport {
  position: relative; overflow: auto; background: #EBEDF0;
  height: min(72vh, 820px); padding: 24px 12px;
  overscroll-behavior: contain;
}
.ed-pages { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ed-page {
  position: relative; background: #fff;
  box-shadow: 0 2px 12px rgba(17,24,39,0.14);
  flex-shrink: 0;
}
.ed-page > canvas { display: block; }
.ed-overlay { position: absolute; inset: 0; }
.ed-overlay.tool-active { cursor: crosshair; }
.ed-statusbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; border-top: 1px solid var(--line); background: var(--ground-alt);
  font-size: 12px; font-weight: 600; color: var(--ink2); flex-wrap: wrap;
}
.ed-statusbar .spacer { flex: 1; }
.ed-zoom { display: flex; align-items: center; gap: 4px; }
.ed-zoom button {
  width: 28px; height: 28px; border: 1px solid var(--line2); border-radius: 7px;
  background: #fff; color: var(--ink2); font-size: 15px; cursor: pointer; line-height: 1;
}
.ed-zoom button:hover { color: var(--accent); border-color: var(--accent); }
.ed-zoom .zlvl { min-width: 48px; text-align: center; }
.ed-hint-msg { color: var(--accent); font-weight: 700; }

/* Editor elements */
.ed-el { position: absolute; touch-action: none; }
.ed-el.selected { outline: 2px solid var(--accent); outline-offset: 0; z-index: 6; }
.ed-el .ed-handle {
  position: absolute; width: 12px; height: 12px;
  background: #fff; border: 2px solid var(--accent); border-radius: 50%;
  z-index: 7; display: none; touch-action: none;
}
.ed-el.selected .ed-handle { display: block; }
.ed-el .ed-handle.se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.ed-el .ed-handle.e { right: -7px; top: 50%; margin-top: -6px; cursor: ew-resize; }
.ed-el .ed-del {
  position: absolute; top: -14px; right: -14px; z-index: 8;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: #fff; border: 2px solid #fff;
  font-size: 12px; line-height: 1; display: none;
  place-items: center; cursor: pointer; box-shadow: var(--shadow);
}
.ed-el.selected .ed-del { display: grid; }
.ed-text {
  min-width: 24px; min-height: 1em;
  outline: none; white-space: pre-wrap; word-break: break-word;
  cursor: move; line-height: 1.25;
}
.ed-text:focus { cursor: text; }
.ed-text.empty::before { content: "Type here"; color: #9CA3AF; }
.ed-shape { cursor: move; }
.ed-shape svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ed-img { cursor: move; }
.ed-img img { width: 100%; height: 100%; display: block; }

/* Editor modal (signature) */
.ed-modal-back {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(17,24,39,0.5);
  display: grid; place-items: center; padding: 20px;
}
.ed-modal {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: min(520px, 100%); padding: 22px;
}
.ed-modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.02em; }
.ed-modal .ed-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

@media (max-width: 720px) {
  .ed-viewport { height: 64vh; }
  .result-actions .btn { width: 100%; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
}

.ad-slot {
  position: relative;
  border: 1px dashed var(--line2);
  border-radius: var(--radius);
  background: var(--ground-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink3);
  margin: 40px 0;
}
.ad-slot::before {
  content: "Advertisement";
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ad-slot .ad-note { font-size: 13px; font-weight: 600; }
.ad-slot.leaderboard { min-height: 90px; }

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--ground-alt);
}
.foot-in { max-width: var(--max); margin: 0 auto; padding: 48px 24px; }
.foot-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;
  margin-bottom: 40px;
}
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.foot-brand b { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.foot-txt { font-size: 14px; color: var(--ink2); line-height: 1.7; font-weight: 500; max-width: 360px; }
.foot-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-cat h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 12px;
}
.foot-cat a {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  padding: 4px 0;
  text-decoration: none;
}
.foot-cat a:hover { color: var(--accent); text-decoration: none; }
.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { font-size: 14px; font-weight: 600; }
.foot-meta { font-size: 12px; color: var(--ink3); font-weight: 500; }

/* Responsive */
@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
  .tool-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .tool-sidebar .sidebar-block { flex: 1; min-width: 240px; }
  .foot-top { grid-template-columns: 1fr; }
  .foot-cats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    box-shadow: var(--shadow-lg);
    gap: 4px;
  }
  .nav-menu.open { display: flex; }
  .nav-dd-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 12px;
    display: none;
  }
  .nav-dd.open .nav-dd-panel { display: block; }
  .steps { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .nav-in { padding: 0 16px; }
  .tool-card-body { padding: 20px 16px; }
  .drop { padding: 40px 20px; min-height: 180px; }
  .btn { width: 100%; }
  .actionrow .btn { flex: 1; }
  .compare-panes { grid-template-columns: 1fr; }
  .foot-cats { grid-template-columns: 1fr 1fr; }
  .hero { padding: 32px 0 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .drop.over .dz-ic { transform: none; }
}

/* UnboundPDF footer legal links */
.foot-legal{display:flex;gap:18px;flex-wrap:wrap;margin:0 0 10px;font-size:.86rem}
.foot-legal a{color:inherit;opacity:.75;text-decoration:none}
.foot-legal a:hover{opacity:1;text-decoration:underline}

/* UnboundPDF per-tool content (How-to + FAQ) */
.unbound-content{border-top:1px solid var(--line);background:var(--ground-alt)}
.uc-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:48px}
.uc-how h2,.uc-faq h2{font-size:1.35rem;color:var(--ink);margin:0 0 14px}
.uc-intro{color:var(--ink2);margin:0 0 16px;line-height:1.6}
.uc-steps{margin:0 0 16px;padding-left:1.25em;color:var(--ink)}
.uc-steps li{margin:0 0 10px;line-height:1.55}
.uc-note{background:var(--accent-l);border-left:3px solid var(--accent);padding:10px 14px;border-radius:6px;font-size:.92rem;color:var(--ink)}
.uc-privacy{font-size:.88rem;color:var(--ink3);margin-top:12px}
.uc-q{border-bottom:1px solid var(--line);padding:13px 0}
.uc-q summary{cursor:pointer;font-weight:600;color:var(--ink);list-style:none}
.uc-q summary::-webkit-details-marker{display:none}
.uc-q summary::before{content:"+ ";color:var(--accent);font-weight:700}
.uc-q[open] summary::before{content:"\2013 "}
.uc-q p{margin:9px 0 0;color:var(--ink2);line-height:1.55}
@media(max-width:760px){.uc-grid{grid-template-columns:1fr;gap:28px}}
