:root {
  --brand: #5A34F0;
  --brand-dark: #3F27C7;
  --ink: #16151A;
  --muted: #6B6870;
  --paper: #F6F4EF;
  --card: #ffffff;
  --line: #E7E2D8;
  --ok: #1F9D63;
  --danger: #E8543F;
  --font: "Instrument Sans", system-ui, sans-serif;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
button { font: inherit; cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(90, 61, 240, 0.22); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.display { font-family: var(--display); letter-spacing: -0.03em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(246, 244, 239, 0.82);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  height: 62px; display: flex; align-items: center; gap: 14px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; color: inherit; }
.logo-pdf { font-family: var(--display); font-weight: 800; font-size: 23px; color: var(--ink); letter-spacing: -0.03em; }
.logo-x {
  font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1;
  color: #fff; background: var(--brand); border-radius: 7px; padding: 3px 8px; margin-left: 3px;
}
.nav { display: flex; gap: 2px; margin-left: 6px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .nav-link {
  white-space: nowrap; padding: 8px 12px; border-radius: 9px;
  color: var(--ink); font-size: 14px; font-weight: 500; border: none; background: none;
}
.nav a:hover, .nav-link:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.lang-select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 9px; padding: 7px 10px; font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; padding: 9px 16px; border-radius: 10px;
  font-weight: 600; font-size: 14px; white-space: nowrap; border: none; flex-shrink: 0;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-lg { padding: 12px 26px; border-radius: 11px; font-size: 15px; }
.btn-ghost {
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: #cfc8ba; background: #fff; color: var(--ink); }

/* Hero */
.hero {
  background: radial-gradient(120% 80% at 50% -20%, rgba(90,61,240,.12), transparent 62%);
  padding: clamp(48px, 8vw, 88px) 0 clamp(36px, 5vw, 56px);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px; font-size: 13px; font-weight: 600; color: var(--brand);
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 999px; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(31,157,99,.18);
}
.hero h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.02; text-align: center; font-size: clamp(2.1rem, 6.2vw, 4rem);
  max-width: 16ch; margin: 20px auto 18px; text-wrap: balance;
}
.hero-sub {
  text-align: center; color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.25rem);
  max-width: 60ch; margin: 0 auto 34px; line-height: 1.5; text-wrap: pretty;
}
.drop-card {
  max-width: 640px; margin: 0 auto; background: var(--card); border-radius: 22px;
  padding: clamp(20px, 4vw, 34px); box-shadow: 0 24px 60px -28px rgba(22,21,26,.35);
  border: 1px solid var(--line);
}
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; border: 2px dashed #cfc8ba; border-radius: 16px;
  padding: clamp(26px, 5vw, 44px) 20px; text-align: center; cursor: pointer; transition: .15s;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--brand); background: rgba(90,61,240,.03);
}
.dropzone input { display: none; }
.drop-icon {
  display: flex; width: 56px; height: 56px; border-radius: 16px;
  background: rgba(90,61,240,.1); align-items: center; justify-content: center;
  margin: 0 0 16px; flex-shrink: 0;
}
.drop-title {
  display: block; width: 100%;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.15rem, 3vw, 1.4rem); margin: 0 0 14px; color: var(--ink);
}
.drop-or {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; max-width: 220px; color: var(--muted);
  font-size: 13px; margin: 0 0 16px; flex-shrink: 0;
}
.drop-or::before, .drop-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.dropzone .btn, .dropzone .drop-select {
  display: inline-flex; margin: 0; flex-shrink: 0;
}
.drop-note {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  color: var(--muted); font-size: 12.5px; margin: 16px 0 0;
}

/* Partner CTA (PDF2Scan) */
.partner-cta {
  display: flex; align-items: center; gap: 14px; margin-top: 18px;
  padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(52,152,219,.08), rgba(90,61,240,.06));
  border: 1px solid rgba(52,152,219,.22);
  color: var(--ink); text-decoration: none; transition: .15s;
}
.partner-cta:hover {
  border-color: #3498db; background: linear-gradient(135deg, rgba(52,152,219,.12), rgba(90,61,240,.08));
  color: var(--ink);
}
.partner-cta-logo {
  width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 4px 12px -6px rgba(22,21,26,.35);
}
.partner-cta-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.partner-cta-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #2E77C9;
}
.partner-cta-title {
  font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.25;
}
.partner-cta-desc {
  font-size: 13px; color: var(--muted); line-height: 1.4;
}
.partner-cta-btn {
  flex-shrink: 0; background: #3498db; color: #fff; font-weight: 600; font-size: 13px;
  padding: 10px 14px; border-radius: 10px; white-space: nowrap;
}
.partner-cta:hover .partner-cta-btn { background: #2980b9; color: #fff; }
@media (max-width: 560px) {
  .partner-cta { flex-wrap: wrap; }
  .partner-cta-btn { width: 100%; text-align: center; }
}

/* Merge workspace (iLovePDF-style) */
.merge-workspace { display: none; margin-top: 8px; }
.merge-workspace.is-on { display: block; }
.merge-layout {
  display: grid; grid-template-columns: 1fr minmax(220px, 280px);
  gap: 16px; align-items: start;
}
@media (max-width: 800px) {
  .merge-layout { grid-template-columns: 1fr; }
}
.merge-board {
  background: #eceae4; border-radius: 16px; padding: 20px;
  min-height: 280px; border: 1px solid var(--line);
}
.merge-grid {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start;
}
.merge-card {
  width: 140px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px; cursor: grab; user-select: none;
  position: relative; transition: box-shadow .15s, transform .15s;
}
.merge-card:active { cursor: grabbing; }
.merge-card.is-dragging { opacity: .45; transform: scale(.96); }
.merge-card.is-over { box-shadow: 0 0 0 2px var(--brand); }
.merge-thumb {
  width: 100%; aspect-ratio: 3/4; object-fit: contain; background: #f3f1ec;
  border-radius: 8px; display: block;
}
.merge-name {
  display: block; margin-top: 8px; font-size: 12px; color: var(--muted);
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.merge-remove {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  border: none; border-radius: 999px; background: rgba(22,21,26,.75); color: #fff;
  font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.merge-fabs { display: flex; flex-direction: column; gap: 10px; margin-left: 4px; }
.merge-fab {
  width: 48px; height: 48px; border-radius: 999px; border: none;
  background: var(--brand); color: #fff; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: 0 8px 20px -10px rgba(90,61,240,.7);
}
.merge-fab.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; font-size: 13px; font-weight: 700; }
.merge-badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px;
  background: var(--ink); color: #fff; border-radius: 999px; font-size: 11px;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.merge-side {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; position: sticky; top: 78px;
}
.merge-side h3 {
  font-family: var(--display); font-weight: 800; font-size: 1.35rem; margin: 0 0 12px;
}
.merge-tip {
  background: rgba(90,61,240,.08); border: 1px solid rgba(90,61,240,.15);
  border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink);
  line-height: 1.45; margin-bottom: 18px;
}
.merge-side .btn { width: 100%; }

/* Organize workspace (page-level reorder) */
.org-workspace { display: none; margin-top: 8px; }
.org-workspace.is-on { display: block; }
.org-card { padding-bottom: 8px; }
.org-file-badge {
  position: absolute; top: 6px; left: 6px; min-width: 22px; height: 22px;
  border-radius: 999px; border: 1px solid; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 6px; z-index: 2;
}
.org-page-label {
  display: block; margin-top: 8px; text-align: center; font-size: 13px; font-weight: 700;
  border: 1px solid; border-radius: 8px; padding: 3px 0;
}
.org-files-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 700; margin: 4px 0 10px;
}
.org-reset {
  border: none; background: none; color: var(--brand); font: inherit; font-weight: 700;
  cursor: pointer; padding: 0; font-size: 13px;
}
.org-reset:hover { text-decoration: underline; }
.org-file-list { display: flex; flex-direction: column; gap: 8px; }
.org-file-row {
  display: flex; align-items: center; gap: 8px; border: 1px solid; border-radius: 10px;
  padding: 8px 10px; font-size: 13px;
}
.org-file-drag { color: var(--muted); font-size: 12px; }
.org-file-letter { font-weight: 800; min-width: 1.1em; }
.org-file-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600;
}
.org-file-rm {
  border: none; background: transparent; color: var(--muted); font-size: 16px;
  cursor: pointer; line-height: 1; padding: 0 2px;
}
.org-file-rm:hover { color: var(--ink); }

/* Sign workspace - full takeover after upload */
.sign-workspace { display: none; }
.sign-workspace.is-on { display: block; }
.drop-card.is-working .dropzone,
.drop-card.is-working #file-list,
.drop-card.is-working #tool-actions,
.drop-card.is-working #drop-note,
.drop-card.is-working #progress,
.drop-card.is-working #status,
.drop-card.is-working .partner-cta {
  display: none !important;
}
.drop-card.is-working {
  max-width: none !important;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.sign-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.sign-file-meta { min-width: 0; }
.sign-file-name {
  display: block; font-weight: 700; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw;
}
.sign-file-size { font-size: 12px; color: var(--muted); }
.sign-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px; align-items: start;
}
@media (max-width: 900px) {
  .sign-layout { grid-template-columns: 1fr; }
}
.sign-preview-wrap {
  background: #eceae4; border-radius: 16px; padding: 14px;
  border: 1px solid var(--line); text-align: center;
}
.sign-canvas-scroll {
  max-height: min(72vh, 860px); overflow: auto;
  border-radius: 10px; background: #d9d5cc; padding: 12px;
}
.sign-preview-wrap canvas#pdf-sign-canvas {
  max-width: 100%; height: auto; cursor: crosshair;
  box-shadow: 0 10px 30px -14px rgba(22,21,26,.5); background: #fff;
  display: block; margin: 0 auto;
}
.sign-hint {
  font-size: 13px; color: var(--muted); margin: 10px 0 0; text-align: center;
}
.sign-hint.is-ready { color: var(--ok); font-weight: 600; }
.sign-side {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; position: sticky; top: 74px;
}
.sign-side h3 {
  font-family: var(--display); font-weight: 800; font-size: 1.25rem; margin: 0 0 10px;
}
.sign-steps {
  margin: 0 0 16px; padding-left: 18px; color: var(--muted);
  font-size: 13px; line-height: 1.55;
}
.sign-side .field { margin-bottom: 12px; }
.sign-side .field label {
  display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px;
}
.sign-side .field select,
.sign-side .field input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: #fff; font: inherit;
}
.sig-canvas {
  width: 100%; height: 120px; border: 1px dashed var(--line); border-radius: 12px;
  background: #fff; touch-action: none; cursor: crosshair; display: block;
}
.sig-pos-box {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  margin: 4px 0 12px; background: var(--paper);
}
.sig-pos-box strong { display: block; font-size: 13px; margin-bottom: 4px; }
.sig-pos { font-size: 12px; color: var(--muted); margin: 0; }
.sig-pos.is-set { color: var(--ok); font-weight: 600; }
.page-nav {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px;
}
.page-nav button {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-weight: 700;
}
.tool-panel.is-sign-wide { max-width: 1100px; }

/* PDF Editor (Sejda-style) */
.edit-workspace { display: none; }
.edit-workspace.is-on { display: block; }
.ed-toolbar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px; margin-bottom: 12px; position: sticky; top: 70px; z-index: 20;
}
.ed-tool {
  border: 1px solid transparent; background: transparent; border-radius: 9px;
  padding: 8px 11px; font-size: 13px; font-weight: 600; color: var(--ink);
}
.ed-tool:hover { background: rgba(0,0,0,.05); }
.ed-tool.is-active {
  background: rgba(90,61,240,.1); color: var(--brand); border-color: rgba(90,61,240,.2);
}
.ed-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.ed-pagebar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.ed-pagebar button {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-weight: 700;
}
.ed-hint { color: var(--muted); font-size: 13px; margin-left: auto; }
.ed-stage {
  background: #e8e5de; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; overflow: auto; max-height: min(78vh, 920px); position: relative;
}
.ed-canvas-wrap {
  position: relative; margin: 0 auto; width: max-content; max-width: 100%;
}
.ed-canvas-wrap canvas {
  display: block; box-shadow: 0 12px 36px -18px rgba(22,21,26,.45); background: #fff;
}
.ed-textlayer, .ed-overlay {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0;
}
.ed-textlayer { z-index: 2; }
.ed-overlay { z-index: 3; pointer-events: none; }
.ed-overlay .ed-obj { pointer-events: auto; }
.ed-native {
  position: absolute; box-sizing: border-box;
  cursor: default; border-radius: 1px;
  padding: 0;
  width: max-content;
  max-width: none;
}
.ed-native:hover {
  outline: 1px solid rgba(90,61,240,.45);
  background: rgba(90,61,240,.05);
}
.ed-native.is-selected {
  outline: 1.5px solid var(--brand); outline-offset: 0;
  background: rgba(90,61,240,.06);
}
.ed-native.is-movable,
.ed-native.is-selected:not(.is-editing) {
  cursor: move;
  cursor: grab;
}
.ed-native.is-movable:active { cursor: grabbing; }
.ed-native.is-dirty {
  /* background comes from sampled page color via inline style */
}
.ed-native.is-editing {
  outline: 2px solid var(--brand);
  box-shadow: 0 0 0 2px rgba(90,61,240,.12);
  cursor: text !important;
}
.ed-native-input {
  outline: none; white-space: pre; word-break: keep-all;
  min-height: 1em; width: max-content; min-width: 0;
  height: auto; display: inline-block;
  caret-color: var(--brand);
  padding: 0; margin: 0;
  font: inherit; letter-spacing: inherit;
}
.ed-native:not(.is-editing) .ed-native-input {
  pointer-events: none;
  user-select: none;
}
.ed-obj {
  position: absolute; box-sizing: border-box; min-width: 16px; min-height: 16px;
  user-select: none;
}
.ed-obj.is-selected {
  outline: 2px dashed var(--brand); outline-offset: 2px;
}
.ed-text-input {
  outline: none; white-space: pre-wrap; word-break: break-word;
  min-height: 1.2em; padding: 2px 4px; cursor: text;
}
.ed-obj img { width: 100%; height: 100%; object-fit: fill; pointer-events: none; display: block; }
.ed-handle {
  position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px;
  background: var(--brand); border: 2px solid #fff; border-radius: 3px;
  cursor: nwse-resize; display: none;
}
.ed-obj.is-selected .ed-handle { display: block; }
.ed-float {
  position: absolute; z-index: 40; display: flex; gap: 0; align-items: center;
  background: #fff; border: 1px solid #b7c7ff; border-radius: 10px;
  box-shadow: 0 8px 24px -12px rgba(46,80,200,.45), 0 0 0 3px rgba(90,61,240,.12);
  overflow: hidden;
  pointer-events: auto;
}
.ed-float[hidden] { display: none !important; }
.ed-float button, .ed-float select, .ed-float input[type="color"] {
  border: none; border-right: 1px solid #e6eaf5; background: #fff;
  height: 36px; min-width: 36px; padding: 0 10px; font: inherit; cursor: pointer;
}
.ed-float button.is-active { background: rgba(90,61,240,.12); color: var(--brand); }
.ed-float input[type="color"] { padding: 4px; width: 42px; }
.ed-float button:last-child, .ed-float select:last-child { border-right: none; }
.ed-toolbar .ed-apply {
  margin-left: auto; padding: 8px 16px; font-size: 13px; font-weight: 700;
  white-space: nowrap;
}
.ed-status { margin-top: 10px; text-align: center; }
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.chip:hover { border-color: #cfc8ba; background: #fff; color: var(--ink); }
.chip-icon {
  display: inline-flex; width: 26px; height: 26px; border-radius: 8px;
  align-items: center; justify-content: center;
}
.trust { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }

/* Sections */
.section { padding: clamp(44px, 7vw, 84px) 0; scroll-margin-top: 70px; }
.section-dark { background: var(--ink); color: #fff; }
.section-title {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.025em;
  font-size: clamp(1.7rem, 4.4vw, 2.6rem); margin: 0 0 8px; text-align: center;
}
.section-sub {
  text-align: center; color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.12rem);
  margin: 0 auto 40px; max-width: 52ch;
}
.section-dark .section-sub { color: rgba(255,255,255,.72); }

.cat-label {
  font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px;
}
.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.tool-card {
  display: flex; align-items: flex-start; gap: 14px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 15px;
  padding: 16px; transition: .15s; color: var(--ink);
}
.tool-card:hover {
  border-color: #cfc8ba; box-shadow: 0 12px 26px -18px rgba(22,21,26,.4);
  transform: translateY(-2px); color: var(--ink);
}
.tool-icon {
  display: inline-flex; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  align-items: center; justify-content: center;
}
.tool-name { display: block; font-family: var(--display); font-weight: 700; font-size: 15.5px; margin-bottom: 3px; }
.tool-desc { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }

/* How / privacy */
.how-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.pill {
  display: inline-block; background: rgba(255,255,255,.1); color: #c9bcff;
  border-radius: 999px; padding: 5px 13px; font-size: 12.5px; font-weight: 600; margin-bottom: 18px;
}
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; align-items: center; gap: 11px; font-size: 15px; }
.step-stack { display: flex; flex-direction: column; gap: 14px; }
.step-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 22px;
}
.step-card strong { display: block; font-family: var(--display); font-weight: 700; font-size: 17px; margin-bottom: 6px; color: #fff; }
.step-card span { color: rgba(255,255,255,.66); font-size: 14px; line-height: 1.5; }

/* Compare */
.compare-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--card);
}
.compare { width: 100%; border-collapse: collapse; min-width: 440px; }
.compare th, .compare td { padding: 14px 18px; font-size: 14.5px; border-bottom: 1px solid var(--line); }
.compare th {
  text-align: left; font-family: var(--display); font-size: 14px; color: var(--muted); font-weight: 600;
}
.compare th.pdfx { text-align: center; color: var(--brand); font-weight: 800; font-size: 15px; }
.compare th.others { text-align: center; }
.compare td:nth-child(2) { text-align: center; font-weight: 700; color: var(--ok); }
.compare td:nth-child(3) { text-align: center; color: var(--muted); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 20px; font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-size: 22px; font-weight: 400; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 20px 20px; color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 62ch; }

/* Tool page */
.tool-hero {
  background: radial-gradient(120% 80% at 50% -30%, rgba(90,61,240,.1), transparent 60%);
  padding: clamp(28px, 4vw, 44px) 0 clamp(36px, 5vw, 56px);
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 24px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.tool-hero-icon {
  display: inline-flex; width: 64px; height: 64px; border-radius: 18px;
  align-items: center; justify-content: center; margin: 0 auto 18px;
}
.tool-hero h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 5.4vw, 3rem); margin: 0 0 12px; line-height: 1.05; text-align: center;
}
.tool-hero-desc {
  color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.2rem);
  max-width: 52ch; margin: 0 auto 30px; line-height: 1.5; text-align: center;
}
.tool-panel { max-width: 820px; margin: 0 auto; }
.file-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-size: 14px;
}
.file-row button { background: none; border: none; color: var(--danger); font-weight: 600; font-size: 13px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; justify-content: center; }
.tool-options {
  margin-top: 16px; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.field select, .field input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--card); font: inherit; color: var(--ink);
}
.status {
  margin-top: 14px; text-align: center; font-size: 14px; color: var(--muted); min-height: 1.4em;
}
.status.is-error { color: var(--danger); }
.status.is-ok { color: var(--ok); }
.progress {
  margin-top: 12px; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; display: none;
}
.progress.is-on { display: block; }
.progress > span {
  display: block; height: 100%; width: 0%; background: var(--brand); transition: width .2s;
}

.steps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
}
.mini-step {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
}
.mini-step-n {
  display: inline-flex; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(90,61,240,.1); color: var(--brand); align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 800; margin-bottom: 14px;
}
.mini-step strong { display: block; font-family: var(--display); font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.mini-step span { color: var(--muted); font-size: 14px; line-height: 1.5; }

.coming-soon {
  margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  background: rgba(90,61,240,.06); border: 1px solid rgba(90,61,240,.15);
  color: var(--ink); font-size: 14px; text-align: center; line-height: 1.5;
}
.sig-canvas {
  width: 100%; max-width: 480px; height: 140px;
  border: 1px dashed var(--line); border-radius: 12px;
  background: #fff; touch-action: none; cursor: crosshair;
}

/* Footer */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,.7);
  padding: clamp(44px, 6vw, 72px) 0 32px; margin-top: auto;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 34px 20px; margin-bottom: 44px;
}
.footer-brand { grid-column: 1 / -1; max-width: 34ch; }
.footer-brand p { font-size: 14px; line-height: 1.55; margin: 0; }
.footer-col h3 {
  color: #fff; font-family: var(--display); font-weight: 700; font-size: 14px; margin: 0 0 14px;
}
.footer-col a, .footer-col .nav-link {
  display: block; color: rgba(255,255,255,.7); font-size: 14px; margin-bottom: 9px;
  background: none; border: none; padding: 0; text-align: left;
}
.footer-col a:hover, .footer-col .nav-link:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.lang-select.dark {
  border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff;
}

/* Legal */
.legal { max-width: 720px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 20px; }
.legal-kicker {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; letter-spacing: .04em;
  color: #fff; background: var(--brand); border-radius: 7px;
  padding: 4px 9px; margin: 0 0 14px;
}
.legal h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 18px; }
.legal-lead { font-size: 1.05rem; color: var(--ink) !important; margin: 0 0 18px; }
.legal h2 { font-family: var(--display); font-weight: 700; font-size: 1.25rem; margin: 28px 0 10px; }
.legal p, .legal li { color: var(--muted); line-height: 1.65; font-size: 15px; }
.legal ul { padding-left: 1.2em; margin: 0 0 16px; }
.legal-meta { margin-top: 32px; font-size: 13px !important; opacity: .85; }
.contact-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 22px 0 28px;
}
.contact-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; color: inherit;
}
.contact-card:hover { border-color: #cfc8ba; color: inherit; }
.contact-card strong { font-size: 14px; color: var(--ink); }
.contact-card span { font-size: 15px; font-weight: 600; color: var(--brand); word-break: break-all; }
.contact-card em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.contact-card.is-static span { color: var(--ink); font-weight: 600; }

/* Articles, hubs, content indexes */
.article-page { padding: clamp(32px, 5vw, 56px) 0 72px; }
.article { max-width: 760px; }
.article-header h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin: 16px 0 12px; letter-spacing: -0.03em;
}
.article-lead { font-size: 1.1rem; color: var(--muted); line-height: 1.55; margin: 0 0 12px; }
.article-meta { font-size: 13px; color: var(--muted); margin: 0 0 28px; }
.prose { color: var(--ink); line-height: 1.7; font-size: 16px; }
.prose h2 { font-family: var(--display); font-weight: 700; font-size: 1.35rem; margin: 36px 0 12px; }
.prose h3 { font-family: var(--display); font-weight: 700; font-size: 1.1rem; margin: 24px 0 8px; }
.prose p { margin: 0 0 16px; color: var(--muted); }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.3em; color: var(--muted); }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: rgba(90,61,240,.06); font-weight: 600; color: var(--ink); }
.prose a { color: var(--brand); font-weight: 500; }
.prose strong { color: var(--ink); }
.article-faq-section { margin-top: 40px; }
.article-faq-section h2 { font-family: var(--display); font-size: 1.35rem; margin-bottom: 16px; }
.article-cta { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.article-cta h2 { font-family: var(--display); font-size: 1.25rem; margin-bottom: 16px; }
.content-list { display: grid; gap: 14px; margin-top: 28px; }
.content-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 22px; color: inherit;
}
.content-card:hover { border-color: #cfc8ba; color: inherit; }
.content-card h2 { font-family: var(--display); font-size: 1.15rem; margin: 0 0 8px; color: var(--ink); }
.content-card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.content-card time { font-size: 12px; color: var(--muted); }
.index-page { padding: clamp(40px, 6vw, 72px) 0; }
.index-page h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 10px; }
.hub-page { padding: clamp(32px, 5vw, 56px) 0 72px; }
.hub-header { text-align: center; margin-bottom: 36px; }
.hub-header h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.3rem); margin: 14px 0 10px; }
.hub-guide-link { margin-top: 32px; font-weight: 600; }
.privacy-inline, .privacy-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--ok); margin: 12px 0 0;
}
.tool-guide-cta { margin: 20px 0 0; font-weight: 600; }
.tool-guide-cta a { color: var(--brand); }

@media (max-width: 720px) {
  .btn.cta-desktop { display: none; }
  .header-inner { gap: 8px; }
}
