/* PDF Builder — hero & tool widget (aligned with business valuation calculator) */
.pdf-builder-page {
  --pdf-navy: #061a31;
  --pdf-navy-2: #0b2947;
  --pdf-coral: #f45f58;
  --pdf-coral-dark: #d94a44;
  --pdf-ink: #10243a;
  --pdf-muted: #5c6f82;
  --pdf-line: #d9e2ea;
  --pdf-green: #16825c;
  --pdf-green-soft: #eaf7f1;
  --pdf-amber-soft: #fff7e8;
  --pdf-red-soft: #fff0ef;
  --pdf-shadow: 0 24px 70px rgba(4, 24, 46, 0.18);
}

.pdf-builder-page .hero-tool {
  position: relative;
  min-height: calc(100svh - 58px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgba(54, 107, 155, 0.36), transparent 32%),
    linear-gradient(135deg, var(--pdf-navy) 0%, #081f39 58%, #0b2d50 100%);
  color: #fff;
}

.pdf-builder-page .grid-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.22;
  pointer-events: none;
  color: #fff;
}

.pdf-builder-page .page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1850px;
  margin-inline: auto;
  padding-block: 24px 26px;
  padding-inline: clamp(24px, 5vw, 96px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 62px);
  align-items: center;
}

.pdf-builder-page .kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffaaa6;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.pdf-builder-page .kicker:before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--pdf-coral);
}

.pdf-builder-page .intro h1 {
  max-width: 540px;
  margin: 0;
  font-size: clamp(2.45rem, 4.25vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
  font-weight: 800;
  text-align: left;
  word-spacing: normal;
}

.pdf-builder-page .intro h1 span {
  color: #ff817a;
}

.pdf-builder-page .intro-copy {
  max-width: 555px;
  margin: 18px 0 0;
  color: #c8d6e4;
  font-size: 0.94rem;
  line-height: 1.68;
}

.pdf-builder-page .proof {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 18px;
  margin-top: 20px;
  color: #c6d5e3;
  font-size: 0.73rem;
  font-weight: 650;
}

.pdf-builder-page .proof span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pdf-builder-page .proof svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #57dda1;
  stroke-width: 2.4;
}

.pdf-builder-page .scope-note {
  margin-top: 22px;
  padding: 13px 15px;
  max-width: 560px;
  border-left: 3px solid var(--pdf-coral);
  background: rgba(255, 255, 255, 0.07);
  color: #bdccda;
  font-size: 0.69rem;
  line-height: 1.55;
}

.pdf-builder-page .tool {
  min-width: 0;
  max-width: 100%;
  min-height: 645px;
  background: #fff;
  color: var(--pdf-ink);
  box-shadow: var(--pdf-shadow);
  border-top: 4px solid var(--pdf-coral);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.pdf-builder-page .tool-head {
  padding: 15px 18px 13px;
  border-bottom: 1px solid var(--pdf-line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.pdf-builder-page .tool-head small {
  display: block;
  color: var(--pdf-coral-dark);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.pdf-builder-page .tool-head h2 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
  color: var(--pdf-ink);
  text-align: left;
  word-spacing: normal;
}

.pdf-builder-page .live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  background: var(--pdf-green-soft);
  color: var(--pdf-green);
  font-size: 0.59rem;
  font-weight: 850;
  white-space: nowrap;
  align-self: flex-start;
}

.pdf-builder-page .live-badge svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.pdf-builder-page .workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.72fr);
  min-height: 0;
}

.pdf-builder-page .drop-pane {
  padding: 16px 18px;
  border-right: 1px solid var(--pdf-line);
  min-width: 0;
  overflow: auto;
}

.pdf-builder-page .output-pane {
  padding: 16px;
  background: #f7f9fb;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.pdf-builder-page .dropzone {
  border: 1px dashed #cfd8e1;
  background: #f8fafb;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
}

.pdf-builder-page .dropzone:hover,
.pdf-builder-page .dropzone.is-dragover {
  border-color: var(--pdf-coral);
  background: #fff8f7;
}

.pdf-builder-page .dropzone svg {
  width: 34px;
  height: 34px;
  stroke: var(--pdf-coral);
  fill: none;
  stroke-width: 1.6;
  margin-bottom: 10px;
}

.pdf-builder-page .dropzone h3 {
  margin: 0 0 5px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--pdf-ink);
}

.pdf-builder-page .dropzone p {
  margin: 0;
  font-size: 0.51rem;
  color: var(--pdf-muted);
  line-height: 1.45;
}

.pdf-builder-page .dropzone input[type="file"] {
  display: none;
}

.pdf-builder-page .format-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
  justify-content: center;
}

.pdf-builder-page .format-tags span {
  font-size: 0.47rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 7px;
  border: 1px solid var(--pdf-line);
  background: #fff;
  color: var(--pdf-muted);
}

.pdf-builder-page .file-list {
  list-style: none;
  margin: 11px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 220px;
  overflow: auto;
}

.pdf-builder-page .file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--pdf-line);
}

.pdf-builder-page .file-list .file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pdf-builder-page .file-list .file-meta strong {
  font-size: 0.55rem;
  color: var(--pdf-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-builder-page .file-list .file-meta span {
  font-size: 0.45rem;
  color: var(--pdf-muted);
}

.pdf-builder-page .file-remove {
  border: none;
  background: transparent;
  color: var(--pdf-coral);
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  flex-shrink: 0;
}

.pdf-builder-page .status-card {
  background: #fff;
  border: 1px solid var(--pdf-line);
  padding: 12px;
}

.pdf-builder-page .status-card small {
  display: block;
  font-size: 0.53rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b9c9d7;
  margin-bottom: 4px;
}

.pdf-builder-page .status-card strong {
  display: block;
  font-size: 0.75rem;
  color: var(--pdf-ink);
  margin-bottom: 3px;
}

.pdf-builder-page .status-card p {
  margin: 0;
  font-size: 0.53rem;
  color: var(--pdf-muted);
  line-height: 1.4;
}

.pdf-builder-page .status-card.is-ready {
  border-color: #c6e6d7;
  background: var(--pdf-green-soft);
}

.pdf-builder-page .status-card.is-ready small {
  color: var(--pdf-green);
}

.pdf-builder-page .status-card.is-ready strong {
  color: #126347;
}

.pdf-builder-page .status-card.is-ready p {
  color: #126347;
}

.pdf-builder-page .status-card.is-error {
  border-color: #efc9c6;
  background: var(--pdf-red-soft);
}

.pdf-builder-page .action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: auto;
  padding-top: 10px;
}

.pdf-builder-page .btn-primary,
.pdf-builder-page .btn-secondary {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pdf-line);
  cursor: pointer;
  font-size: 0.57rem;
  font-weight: 800;
  padding: 0 12px;
}

.pdf-builder-page .btn-primary {
  background: var(--pdf-coral);
  border-color: var(--pdf-coral);
  color: #fff;
}

.pdf-builder-page .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pdf-builder-page .btn-secondary {
  background: #fff;
  color: var(--pdf-ink);
}

.pdf-builder-page .tool-foot {
  padding: 10px 18px;
  border-top: 1px solid var(--pdf-line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  font-size: 0.51rem;
  color: var(--pdf-muted);
}

.pdf-builder-page .tool-foot strong {
  color: var(--pdf-ink);
}

@media (max-width: 1120px) {
  .pdf-builder-page .hero-tool {
    min-height: auto;
  }

  .pdf-builder-page .page-shell {
    grid-template-columns: 1fr;
    padding-block: 42px;
    padding-inline: clamp(24px, 5vw, 96px);
  }

  .pdf-builder-page .intro h1,
  .pdf-builder-page .intro-copy {
    max-width: 760px;
  }
}

@media (max-width: 760px) {
  .pdf-builder-page .page-shell {
    padding-inline: clamp(16px, 4vw, 24px);
    padding-block: 25px;
    gap: 26px;
  }

  .pdf-builder-page .intro h1 {
    font-size: 2.35rem;
  }

  .pdf-builder-page .intro-copy {
    font-size: 0.86rem;
  }

  .pdf-builder-page .scope-note {
    display: none;
  }

  .pdf-builder-page .tool {
    min-height: 940px;
  }

  .pdf-builder-page .workspace {
    grid-template-columns: 1fr;
  }

  .pdf-builder-page .drop-pane {
    border-right: 0;
    border-bottom: 1px solid var(--pdf-line);
  }

  .pdf-builder-page .output-pane {
    min-height: 400px;
  }

  .pdf-builder-page .action-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .pdf-builder-page .intro h1 {
    font-size: 2.05rem;
  }

  .pdf-builder-page .tool-head,
  .pdf-builder-page .drop-pane,
  .pdf-builder-page .output-pane {
    padding-left: 14px;
    padding-right: 14px;
  }

  .pdf-builder-page .live-badge {
    display: none;
  }

  .pdf-builder-page .tool-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdf-builder-page * {
    animation: none !important;
    transition: none !important;
  }
}
