.page-tool-pdf-stamp {
  --pdf-blue: #1464bb;
  --pdf-navy: #0f2c4a;
  --pdf-sky: #e2f5fe;
  --pdf-muted: #58728d;
  --pdf-border: rgba(15, 44, 74, 0.12);
  --pdf-sky-top: #7ec8e3;
  --pdf-sky-mid: #a8dcf0;
  --pdf-sky-bottom: #c5e8f7;
  --pdf-sky-pale: #d8eef9;
  background: var(--pdf-sky-pale);
  color: var(--pdf-navy);
}

.page-tool-pdf-stamp [hidden] { display: none !important; }
.page-tool-pdf-stamp main { overflow: visible; }
.page-tool-pdf-stamp header {
  transition: transform .22s ease, opacity .18s ease !important;
}
.page-tool-pdf-stamp.pdf-tool-menu-hidden header {
  transform: translate(-50%, -150%);
  opacity: 0;
  pointer-events: none;
}
.page-tool-pdf-stamp button,
.page-tool-pdf-stamp input,
.page-tool-pdf-stamp select { font: inherit; }
.page-tool-pdf-stamp button,
.page-tool-pdf-stamp select,
.page-tool-pdf-stamp input[type="range"],
.page-tool-pdf-stamp input[type="checkbox"],
.page-tool-pdf-stamp input[type="radio"] { cursor: pointer; }
.page-tool-pdf-stamp :focus-visible {
  outline: 3px solid rgba(20, 100, 187, 0.42);
  outline-offset: 3px;
}

.pdf-tool-hero {
  padding: clamp(126px, 11vw, 150px) 0 clamp(16px, 2vw, 24px);
  text-align: center;
  background: linear-gradient(
    180deg,
    var(--pdf-sky-top) 0%,
    var(--pdf-sky-mid) 40%,
    var(--pdf-sky-bottom) 80%,
    var(--pdf-sky-pale) 100%
  );
}
.pdf-tool-hero__inner { max-width: 930px; }
.pdf-tool-breadcrumb {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--pdf-muted);
  font-size: .8rem;
  font-weight: 700;
}
.pdf-tool-breadcrumb a { color: var(--pdf-blue); text-decoration: none; }
.pdf-tool-kicker {
  display: inline-flex;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(20,100,187,.09);
  color: var(--pdf-blue);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.pdf-tool-hero h1,
.pdf-tool-section h2,
.pdf-tool-privacy h2,
.pdf-tool-commercial h2 {
  font-family: "Outfit", sans-serif;
  color: var(--pdf-navy);
  letter-spacing: -.045em;
}
.pdf-tool-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2.45rem, 5.5vw, 4.75rem);
  line-height: 1;
}
.pdf-tool-hero__lead {
  max-width: 760px;
  margin: 0 auto;
  color: var(--pdf-muted);
  font-size: clamp(.95rem, 1.65vw, 1.16rem);
  line-height: 1.45;
}
.pdf-tool-trust {
  display: flex;
  gap: 13px;
  max-width: 700px;
  margin: 28px auto 16px;
  padding: 17px 20px;
  border: 1px solid rgba(20,100,187,.15);
  border-radius: 20px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 15px 45px rgba(15,44,74,.08);
  text-align: left;
}
.pdf-tool-trust__icon,
.pdf-tool-privacy__shield {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dff8e8;
  color: #14733b;
  font-weight: 900;
}
.pdf-tool-trust strong { display: block; margin-bottom: 3px; }
.pdf-tool-trust p { margin: 0; color: var(--pdf-muted); font-size: .9rem; line-height: 1.5; }
.pdf-tool-signature { margin: 0; color: var(--pdf-muted); font-size: .82rem; }

.pdf-tool-workspace { padding: 0 0 clamp(55px, 7vw, 90px); }
.pdf-control-panel summary b {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e8f1fa;
  color: var(--pdf-blue);
  font-size: .72rem;
}

.pdf-tool-app {
  max-width: 1280px;
  margin: auto;
  padding: clamp(10px, 1.5vw, 18px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 30px;
  background: rgba(255,255,255,.66);
  box-shadow: 0 28px 80px rgba(15,44,74,.12);
}
.pdf-tool-alert {
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid #f0c36d;
  border-radius: 14px;
  background: #fff8e7;
  color: #744e00;
  font-size: .9rem;
}
.pdf-dropzone {
  display: grid;
  place-items: center;
  min-height: clamp(210px, 25vh, 245px);
  padding: 22px 20px;
  border: 2px dashed rgba(20,100,187,.3);
  border-radius: 24px;
  background:
    linear-gradient(rgba(255,255,255,.88), rgba(255,255,255,.88)),
    repeating-linear-gradient(45deg, #e8f5fc 0 12px, #f6fbfe 12px 24px);
  text-align: center;
  transition: border-color .2s, background .2s;
}
.pdf-dropzone.is-dragging { border-color: var(--pdf-blue); background: #edf8ff; }
.pdf-dropzone__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 57px;
  border-radius: 12px;
  background: #e7f2fd;
  color: var(--pdf-blue);
  box-shadow: inset 0 0 0 2px rgba(20,100,187,.13);
  font-weight: 900;
}
.pdf-dropzone h3 { margin: 9px 0 1px; font-size: clamp(1.25rem, 2.3vw, 1.65rem); }
.pdf-dropzone p { margin: 0 0 12px; color: var(--pdf-muted); font-size: .86rem; }
.pdf-dropzone small { margin-top: 8px; color: var(--pdf-muted); font-size: .7rem; }

.pdf-tool-onboarding {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}
.pdf-tool-onboarding__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pdf-tool-onboarding__steps article {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--pdf-border);
  border-radius: 13px;
  background: rgba(255,255,255,.84);
}
.pdf-tool-onboarding__steps b {
  display: grid;
  place-items: center;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: var(--pdf-blue);
  color: #fff;
  font-size: .75rem;
}
.pdf-tool-onboarding__steps strong,
.pdf-tool-onboarding__steps span { display: block; }
.pdf-tool-onboarding__steps strong {
  color: var(--pdf-navy);
  font-size: .76rem;
  line-height: 1.2;
}
.pdf-tool-onboarding__steps span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--pdf-muted);
  font-size: .64rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdf-tool-onboarding__privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 7px 12px;
  border-radius: 12px;
  background: #e8f8ee;
  color: #185f39;
  text-align: center;
}
.pdf-tool-onboarding__privacy > span {
  display: grid;
  place-items: center;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #ccefd8;
  font-size: .72rem;
  font-weight: 900;
}
.pdf-tool-onboarding__privacy p {
  margin: 0;
  font-size: .7rem;
  line-height: 1.35;
}

.pdf-tool-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 43px;
  padding: 10px 17px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}
.pdf-tool-button--primary,
.pdf-tool-button--generate { background: var(--pdf-blue); color: #fff; box-shadow: 0 9px 22px rgba(20,100,187,.22); }
.pdf-tool-button--primary:hover,
.pdf-tool-button--generate:hover { background: #0e559f; }
.pdf-tool-button--quiet { background: #eaf3fa; color: var(--pdf-navy); }
.pdf-tool-button--danger-quiet { background: #fff0f1; color: #a32638; }
.pdf-tool-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.pdf-link-button {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--pdf-blue);
  font-weight: 800;
  text-decoration: underline;
}
.pdf-link-button:disabled { color: #8ea0b2; cursor: not-allowed; }

.pdf-file-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 15px 18px;
  border: 1px solid var(--pdf-border);
  border-radius: 18px;
  background: #fff;
}
.pdf-file-summary__label,
.pdf-file-summary span { display: block; color: var(--pdf-muted); font-size: .75rem; }
.pdf-file-summary strong { display: block; max-width: 600px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-file-summary__actions { display: flex; gap: 8px; }
.pdf-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr);
  gap: 18px;
  align-items: start;
}
.pdf-preview-column {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 125px);
  min-height: 520px;
  max-height: 900px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--pdf-border);
  border-radius: 22px;
  background: #d9e6ee;
  overflow: hidden;
  transition: top .22s ease, height .22s ease, max-height .22s ease;
}
.page-tool-pdf-stamp.pdf-tool-immersive .pdf-preview-column {
  top: 10px;
  height: calc(100dvh - 20px);
  max-height: none;
}
.pdf-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  margin-bottom: 7px;
  border-radius: 14px;
  background: #fff;
}
.pdf-preview-toolbar button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: #edf4f8;
  color: var(--pdf-navy);
  font-weight: 900;
}
.pdf-preview-toolbar button:disabled { opacity: .35; }
.pdf-preview-toolbar strong,
.pdf-preview-toolbar span { font-size: .8rem; }
.pdf-preview-toolbar__separator { width: 1px; height: 22px; background: var(--pdf-border); }
.pdf-preview-shell {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  border-radius: 16px;
  background: #aebdca;
}
.pdf-canvas-stage {
  position: relative;
  flex: none;
  margin: 16px;
  box-shadow: 0 14px 35px rgba(15,44,74,.24);
  line-height: 0;
  touch-action: none;
}
#pdfCanvas { display: block; max-width: none; background: #fff; }
.pdf-preview-empty {
  position: absolute;
  z-index: 2;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  color: var(--pdf-muted);
  font-size: .82rem;
}
.pdf-stamp-overlay {
  position: absolute;
  z-index: 4;
  top: 10%;
  left: 10%;
  min-width: 42px;
  cursor: grab;
  line-height: normal;
  touch-action: none;
  user-select: none;
}
.pdf-stamp-overlay:active { cursor: grabbing; }
.pdf-stamp-overlay.is-hidden { display: none; }
.pdf-stamp-overlay__content,
.pdf-stamp-overlay__content svg,
.pdf-stamp-overlay__content img { display: block; width: 100%; height: auto; pointer-events: none; }
.pdf-uploaded-overlay { position: relative; line-height: 0; }
.pdf-uploaded-overlay span {
  position: absolute;
  left: 50%;
  bottom: 4%;
  max-width: 94%;
  padding: 3px 7px;
  transform: translateX(-50%);
  border-radius: 5px;
  background: rgba(255,255,255,.86);
  color: var(--pdf-navy);
  font-size: clamp(.5rem, 1.3vw, .85rem);
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}
.pdf-stamp-overlay__resize {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--pdf-blue);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  cursor: nwse-resize;
}
.pdf-stamp-overlay:focus-visible::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid var(--pdf-blue);
  border-radius: 6px;
}
.pdf-thumbnails {
  display: flex;
  flex: 0 0 90px;
  gap: 8px;
  padding: 6px 2px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(15,44,74,.28) transparent;
}
.pdf-thumbnails::-webkit-scrollbar { height: 6px; }
.pdf-thumbnails::-webkit-scrollbar-track { background: transparent; }
.pdf-thumbnails::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(15,44,74,.28); }
.pdf-document-order {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding-top: 5px;
}
.pdf-document-order strong { color: var(--pdf-navy); font-size: .72rem; }
.pdf-document-order span { color: var(--pdf-muted); font-size: .62rem; }
.pdf-thumbnail {
  position: relative;
  flex: 0 0 64px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(255,255,255,.72);
}
.pdf-thumbnail.is-active { border-color: var(--pdf-blue); }
.pdf-thumbnail canvas { display: block; width: 100%; height: 50px; object-fit: contain; background: #fff; }
.pdf-thumbnail span { display: block; padding-top: 2px; font-size: .6rem; font-weight: 800; line-height: 1; text-align: center; }
.pdf-thumbnail.has-override::after {
  content: "Ajustée";
  position: absolute;
  top: 7px;
  right: 6px;
  padding: 2px 4px;
  border-radius: 5px;
  background: var(--pdf-blue);
  color: #fff;
  font-size: .5rem;
}
.pdf-document-thumbnails {
  flex: 0 0 auto;
  gap: 12px;
  padding: 8px 4px 10px;
  align-items: stretch;
}
.pdf-document-card {
  position: relative;
  flex: 0 0 196px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  padding: 7px 8px 8px;
  border: 1.5px solid var(--pdf-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15,44,74,.07);
  transition: border-color .16s ease, opacity .16s ease, transform .16s ease, box-shadow .16s ease;
}
.pdf-document-card:hover { box-shadow: 0 6px 18px rgba(15,44,74,.13); }
.pdf-document-card.is-active {
  border-color: var(--pdf-blue);
  box-shadow: 0 0 0 3px rgba(29,111,204,.16);
}
.pdf-document-card.is-dragging { opacity: .45; transform: scale(.98); }
.pdf-document-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  border-radius: 8px;
  background: rgba(29,111,204,.09);
  cursor: grab;
  user-select: none;
}
.pdf-document-card__header:active { cursor: grabbing; }
.pdf-document-card__grip {
  color: var(--pdf-blue);
  font-size: .95rem;
  line-height: 1;
  letter-spacing: -1px;
}
.pdf-document-card__number {
  color: var(--pdf-blue);
  font-size: .74rem;
  font-weight: 900;
  white-space: nowrap;
}
.pdf-document-card.is-drop-before::before,
.pdf-document-card.is-drop-after::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 999px;
  background: var(--pdf-blue);
  box-shadow: 0 0 0 3px rgba(29,111,204,.2);
}
.pdf-document-card.is-drop-before::before { left: -8px; }
.pdf-document-card.is-drop-after::after { right: -8px; }
.pdf-document-thumbnails .pdf-thumbnail {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 4px;
  cursor: pointer;
  text-align: left;
  background: #f4f8fb;
  transition: background-color .16s ease;
}
.pdf-document-thumbnails .pdf-thumbnail:hover { background: #e9f2fa; }
.pdf-document-thumbnails .pdf-thumbnail.is-active { background: rgba(29,111,204,.12); }
.pdf-document-thumbnails .pdf-thumbnail canvas {
  width: 54px;
  height: 74px;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(15,44,74,.16);
  background: #fff;
}
.pdf-document-thumbnails .pdf-thumbnail .pdf-document-card__file {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--pdf-navy);
  font-size: .64rem;
  font-weight: 700;
  line-height: 1.28;
  text-align: left;
  word-break: break-word;
}
.pdf-piece-title {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 5px 9px;
  border: 1.5px solid var(--pdf-border);
  border-radius: 8px;
  background: #fff;
  color: var(--pdf-navy);
  font-family: inherit;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.1;
}
.pdf-piece-title::placeholder { color: var(--pdf-muted); font-weight: 600; }
.pdf-piece-title:hover { border-color: rgba(29,111,204,.4); }
.pdf-piece-title:focus {
  border-color: var(--pdf-blue);
  outline: 2px solid rgba(29,111,204,.18);
}
.pdf-bordereau-option {
  margin-bottom: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(29,111,204,.08);
  color: var(--pdf-navy);
  font-size: .72rem;
  font-weight: 800;
}
.pdf-bordereau-suboption {
  margin: 2px 0 0;
  padding: 7px 10px;
  color: var(--pdf-muted);
  font-size: .68rem;
  font-weight: 700;
}
label.pdf-bordereau-suboption input { width: 15px; height: 15px; }

.pdf-controls { display: grid; gap: 12px; }
.pdf-control-panel,
.pdf-generation-panel {
  border: 1px solid var(--pdf-border);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(15,44,74,.05);
  overflow: hidden;
}
.pdf-control-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 11px 15px;
  cursor: pointer;
  list-style: none;
}
.pdf-control-panel summary::after {
  content: "⌄";
  margin-left: 4px;
  color: var(--pdf-blue);
  font-size: 1rem;
  line-height: 1;
  transition: transform .2s ease;
}
.pdf-control-panel[open] summary::after { transform: rotate(180deg); }
.pdf-control-panel summary::-webkit-details-marker { display: none; }
.pdf-control-panel summary span { display: flex; align-items: center; gap: 8px; font-weight: 900; }
.pdf-control-panel summary small { color: var(--pdf-muted); }
.pdf-control-panel[open] summary { border-bottom: 1px solid var(--pdf-border); }
.pdf-control-panel__body { display: grid; gap: 14px; padding: 15px; }
.pdf-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.pdf-tabs button {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--pdf-border);
  border-radius: 12px;
  background: #f5f8fa;
  color: var(--pdf-muted);
  font-size: .74rem;
  font-weight: 800;
  line-height: 1.15;
}
.pdf-tabs button.is-active { border-color: rgba(20,100,187,.35); background: #eaf5ff; color: var(--pdf-blue); }
.stamp-live-preview {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 12px;
  border-radius: 16px;
  background:
    linear-gradient(45deg, #eef3f5 25%, transparent 25%),
    linear-gradient(-45deg, #eef3f5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef3f5 75%),
    linear-gradient(-45deg, transparent 75%, #eef3f5 75%),
    #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}
#stampBuilderPreview { width: 170px; color: #153e6f; }
#stampBuilderPreview svg { display: block; width: 100%; height: auto; }
.pdf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.pdf-form-grid__full { grid-column: 1 / -1; }
.pdf-control-panel label,
.pdf-control-panel legend {
  display: grid;
  gap: 6px;
  color: var(--pdf-navy);
  font-size: .78rem;
  font-weight: 800;
}
.pdf-control-panel input[type="text"],
.pdf-control-panel input[type="number"],
.pdf-control-panel select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(15,44,74,.18);
  border-radius: 10px;
  background: #fff;
  color: var(--pdf-navy);
}
#stampTemplate { min-width: 0; padding-right: 36px; }
.pdf-control-panel input[type="range"] { width: 100%; accent-color: var(--pdf-blue); }
.pdf-checkbox { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; }
.pdf-checkbox input { width: 18px; height: 18px; accent-color: var(--pdf-blue); }
.pdf-color-field,
.numbering-modes {
  margin: 0;
  padding: 0;
  border: 0;
}
.pdf-color-presets { display: flex; align-items: center; gap: 8px; }
.pdf-color-presets button,
.pdf-color-presets input {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(15,44,74,.22);
}
.pdf-color-presets input { overflow: hidden; }
.pdf-upload-stamp {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 105px;
  place-items: center;
  border: 2px dashed rgba(20,100,187,.25);
  border-radius: 14px;
  background: #f5fbff;
  color: var(--pdf-navy);
}
.pdf-upload-stamp span,
.pdf-help { color: var(--pdf-muted); font-size: .72rem; }
.uploaded-stamp-preview {
  padding: 12px;
  border-radius: 14px;
  background: #f1f5f7;
  text-align: center;
}
.uploaded-stamp-preview img { display: block; max-width: 180px; max-height: 160px; margin: 0 auto 10px; }
.saved-stamps { padding-top: 12px; border-top: 1px solid var(--pdf-border); }
.saved-stamps__heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.saved-stamps__heading button {
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: #eaf3fa;
  color: var(--pdf-blue);
  font-size: .68rem;
  font-weight: 900;
}
.saved-stamps__list { display: grid; gap: 6px; margin: 8px 0; }
.saved-stamps__list p { margin: 0; color: var(--pdf-muted); font-size: .72rem; }
.saved-stamp-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 4px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 9px;
  background: #f4f7f9;
}
.saved-stamp-item button { border: 0; background: transparent; color: var(--pdf-blue); font-size: .68rem; font-weight: 800; }
.position-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.position-presets button {
  min-height: 38px;
  padding: 7px;
  border: 1px solid var(--pdf-border);
  border-radius: 9px;
  background: #f6f9fb;
  color: var(--pdf-navy);
  font-size: .72rem;
  font-weight: 800;
}
.position-presets button:nth-child(3) { grid-column: 1 / -1; }
.page-position-actions { display: grid; gap: 5px; }
.pdf-position-confirmation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  margin-top: 7px;
  padding: 6px 7px;
  border: 1px solid rgba(166,27,43,.28);
  border-radius: 12px;
  background: #fff0f2;
  box-shadow: 0 8px 22px rgba(126,20,34,.1);
  opacity: 1;
  transition: opacity .18s ease, visibility .18s ease;
}
.pdf-position-confirmation[hidden] {
  display: grid !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.pdf-position-confirmation span {
  color: #8f1726;
  font-size: .63rem;
  font-weight: 800;
  text-align: center;
}
.pdf-position-confirmation button {
  width: 100%;
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid rgba(166,27,43,.3);
  border-radius: 8px;
  background: #fff;
  color: #9f1c2d;
  font-size: .67rem;
  font-weight: 900;
  line-height: 1.15;
}
.pdf-position-confirmation button:last-child { border-color: #a61b2b; background: #a61b2b; color: #fff; }
.pdf-inline-warning {
  margin: 0;
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff6dc;
  color: #755300;
  font-size: .72rem;
}
.numbering-modes { display: grid; gap: 9px; }
.numbering-modes label { display: flex; grid-template-columns: auto 1fr; align-items: flex-start; gap: 8px; font-weight: 700; }
.numbering-modes input { margin-top: 2px; accent-color: var(--pdf-blue); }
.numbering-example { margin: 0; padding: 9px 10px; border-radius: 9px; background: #edf7ff; color: var(--pdf-blue); font-size: .72rem; }
.pdf-generation-panel { display: grid; gap: 12px; padding: 15px; }
.generation-checklist { display: flex; flex-wrap: wrap; gap: 7px; }
.generation-checklist span { padding: 5px 8px; border-radius: 999px; background: #f0f4f6; color: var(--pdf-muted); font-size: .66rem; font-weight: 800; }
.generation-checklist span.is-valid { background: #dff8e8; color: #14733b; }
.pdf-tool-button--generate { width: 100%; min-height: 51px; }
.generation-progress progress { width: 100%; accent-color: var(--pdf-blue); }
.generation-progress p { margin: 5px 0 0; color: var(--pdf-muted); font-size: .75rem; }
.generation-success { display: grid; gap: 9px; padding: 13px; border-radius: 13px; background: #ecfbf1; text-align: center; }

.pdf-tool-section,
.pdf-tool-privacy,
.pdf-tool-commercial { padding: clamp(65px, 9vw, 115px) 0; }
.pdf-tool-section { text-align: center; background: #fff; }
.pdf-tool-section:nth-of-type(even) { background: #f4fbff; }
.pdf-tool-section h2,
.pdf-tool-privacy h2,
.pdf-tool-commercial h2 { max-width: 850px; margin: 14px auto 14px; font-size: clamp(2rem, 4.5vw, 3.8rem); line-height: 1.05; }
.pdf-tool-section__intro { max-width: 720px; margin: 0 auto 28px; color: var(--pdf-muted); line-height: 1.65; }
.pdf-how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; text-align: left; }
.pdf-how-grid article {
  padding: 25px;
  border: 1px solid var(--pdf-border);
  border-radius: 22px;
  background: #f8fcff;
}
.pdf-how-grid article > b { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--pdf-blue); color: #fff; }
.pdf-how-grid h3 { margin: 18px 0 7px; font-size: 1.15rem; }
.pdf-how-grid p { margin: 0; color: var(--pdf-muted); line-height: 1.55; }
.pdf-tool-privacy { background: var(--pdf-navy); color: #fff; }
.pdf-tool-privacy__inner { display: grid; grid-template-columns: auto 1fr; gap: 24px; max-width: 950px; align-items: start; }
.pdf-tool-privacy__shield { width: 72px; height: 72px; font-size: 1.7rem; }
.pdf-tool-privacy .pdf-tool-kicker { background: rgba(255,255,255,.1); color: #9fd6ff; }
.pdf-tool-privacy h2 { margin-left: 0; color: #fff; }
.pdf-tool-privacy p { max-width: 780px; font-size: 1.05rem; line-height: 1.7; }
.pdf-tool-privacy small { color: #b8cede; }
.pdf-use-cases { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.pdf-use-cases span { padding: 10px 15px; border: 1px solid var(--pdf-border); border-radius: 999px; background: #f1f8fd; color: var(--pdf-navy); font-weight: 800; }
.pdf-faq-list { max-width: 900px; margin: 32px auto 0; text-align: left; }
.pdf-faq-list details { border-bottom: 1px solid var(--pdf-border); }
.pdf-faq-list summary { display: flex; justify-content: space-between; gap: 20px; padding: 18px 2px; cursor: pointer; font-weight: 900; list-style: none; }
.pdf-faq-list summary::-webkit-details-marker { display: none; }
.pdf-faq-list summary span { color: var(--pdf-blue); font-size: 1.35rem; }
.pdf-faq-list details[open] summary span { transform: rotate(45deg); }
.pdf-faq-list p { margin: -5px 0 20px; color: var(--pdf-muted); line-height: 1.65; }
.pdf-tool-commercial { background: linear-gradient(135deg, #c9ebfa, #edf9ff); }
.pdf-tool-commercial__card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  padding: clamp(28px, 5vw, 55px);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 28px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 20px 55px rgba(15,44,74,.09);
}
.pdf-tool-commercial h2 { margin-left: 0; font-size: clamp(1.9rem, 4vw, 3.1rem); }
.pdf-tool-commercial p { max-width: 720px; margin: 0; color: var(--pdf-muted); line-height: 1.65; }
.pdf-tool-commercial--inline {
  padding: clamp(110px, 13vw, 150px) 0 clamp(48px, 7vw, 78px);
  background: transparent;
}
.pdf-tool-commercial--inline .pdf-tool-commercial__card {
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, .65fr);
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(20px, 2.5vw, 28px);
}
.pdf-tool-commercial--inline h2 {
  margin: 0 0 8px;
  max-width: 760px;
  font-size: clamp(1.4rem, 2.35vw, 1.95rem);
  line-height: 1.08;
  text-wrap: balance;
}
.pdf-tool-commercial--inline > .container > .pdf-tool-commercial__card > div > p {
  font-weight: 700;
}
.pdf-tool-commercial__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.pdf-tool-commercial__list li {
  position: relative;
  padding-left: 18px;
  color: var(--pdf-muted);
  font-size: .84rem;
  line-height: 1.4;
}
.pdf-tool-commercial__list li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--pdf-blue);
  font-weight: 900;
}
.pdf-tool-commercial__action {
  display: grid;
  gap: 14px;
  align-content: center;
  padding-left: clamp(20px, 3vw, 34px);
  border-left: 1px solid var(--pdf-border);
}
.pdf-tool-commercial__action p { color: var(--pdf-navy); font-weight: 800; line-height: 1.4; }
.pdf-tool-commercial__action .pdf-tool-button { width: fit-content; min-width: 150px; }

@media (max-width: 980px) {
  .pdf-editor-layout { grid-template-columns: 1fr; }
  .pdf-preview-column {
    position: static;
    height: min(780px, calc(100dvh - 40px));
    min-height: 520px;
    max-height: none;
  }
  .page-tool-pdf-stamp.pdf-tool-immersive .pdf-preview-column {
    height: calc(100dvh - 20px);
    min-height: 520px;
  }
  .pdf-preview-shell { min-height: 0; max-height: none; }
  .pdf-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdf-generation-panel { grid-column: 1 / -1; }
  .pdf-tool-commercial--inline .pdf-tool-commercial__card { grid-template-columns: 1fr; }
  .pdf-tool-commercial__action { padding: 18px 0 0; border-top: 1px solid var(--pdf-border); border-left: 0; }
}

@media (max-width: 700px) {
  .pdf-tool-hero { padding: 116px 0 16px; }
  .pdf-tool-breadcrumb { justify-content: flex-start; text-align: left; }
  .pdf-tool-hero h1 { font-size: clamp(2.35rem, 12vw, 3.5rem); }
  .pdf-tool-trust { padding: 14px; }
  .pdf-tool-app { padding: 10px; border-radius: 20px; }
  .pdf-dropzone { min-height: 225px; padding: 20px 14px; }
  .pdf-tool-onboarding__steps {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .pdf-tool-onboarding__steps article {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
  .pdf-tool-onboarding__privacy { align-items: flex-start; text-align: left; }
  .pdf-file-summary { align-items: flex-start; flex-direction: column; }
  .pdf-file-summary__actions { width: 100%; }
  .pdf-preview-column { padding: 7px; }
  .pdf-preview-toolbar { flex-wrap: wrap; }
  .pdf-preview-column {
    height: min(680px, calc(100dvh - 28px));
    min-height: 470px;
  }
  .page-tool-pdf-stamp.pdf-tool-immersive .pdf-preview-column {
    height: calc(100dvh - 12px);
    min-height: 470px;
  }
  .pdf-preview-shell { min-height: 0; max-height: none; }
  .pdf-canvas-stage { margin: 12px; }
  .pdf-position-confirmation { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pdf-position-confirmation span { grid-column: 1 / -1; }
  .pdf-document-order { align-items: flex-start; flex-direction: column; gap: 2px; }
  .pdf-controls { grid-template-columns: 1fr; }
  .pdf-generation-panel { grid-column: auto; }
  .pdf-form-grid { grid-template-columns: 1fr; }
  .pdf-form-grid__full { grid-column: auto; }
  .pdf-how-grid { grid-template-columns: 1fr; }
  .pdf-tool-privacy__inner { grid-template-columns: 1fr; }
  .pdf-tool-privacy__shield { width: 55px; height: 55px; }
  .pdf-tool-commercial__card { grid-template-columns: 1fr; }
  .pdf-tool-commercial__card .pdf-tool-button { width: 100%; }
  .pdf-tool-commercial__list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .page-tool-pdf-stamp *,
  .page-tool-pdf-stamp *::before,
  .page-tool-pdf-stamp *::after { scroll-behavior: auto !important; transition: none !important; }
}
