/* ─── Completion screen ─── */
.complete {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  background:
    radial-gradient(900px 500px at 50% 80px, color-mix(in oklab, var(--accent) 6%, transparent), transparent 60%),
    var(--paper);
  overflow: hidden;
}

.celebrate {
  padding: var(--s-9) var(--s-5) var(--s-6);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-5);
  text-align: center;
  position: relative;
  z-index: 1;
}
.celebrate h1 + p { margin-top: 0; }
.celebrate-seal {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  display: grid; place-items: center;
  position: relative;
  box-shadow: var(--shadow-2);
}
.celebrate-seal::before {
  content: "";
  position: absolute; inset: 8px;
  border-radius: 50%;
  border: 1px dashed var(--accent-line);
  animation: sealRotate 30s linear infinite;
}
@keyframes sealRotate {
  to { transform: rotate(360deg); }
}
.celebrate-seal svg {
  width: 36px; height: 36px;
  color: var(--accent);
  position: relative;
  z-index: 2;
  animation: sealPop .5s cubic-bezier(.5,1.6,.4,1) backwards;
}
@keyframes sealPop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.celebrate h1 {
  margin: var(--s-3) 0 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  max-width: 18ch;
  animation: fadeUp .6s .15s ease backwards;
}
.celebrate p {
  margin: 0;
  max-width: 50ch;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
  animation: fadeUp .6s .25s ease backwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Confetti — subtle ink dots, not party ones */
.confetti {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.confetti i {
  position: absolute;
  top: 100px;
  width: 6px; height: 1.5px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
  animation: confettiFall 2.6s cubic-bezier(.4,.1,.4,1) forwards;
}

@keyframes confettiFall {
  0%   { transform: translate(0, -40px) rotate(0); opacity: 0; }
  10%  { opacity: 0.8; }
  100% { transform: translate(var(--dx, 0), var(--dy, 600px)) rotate(var(--rot, 360deg)); opacity: 0; }
}

.complete-body {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--s-7);
  padding: 0 var(--s-7) var(--s-8);
  align-items: start;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  min-height: 0;
  z-index: 1;
}

/* Client public thank-you page: hide audit column; show filled document full width */
.complete-body.complete-body--public-single {
  grid-template-columns: 1fr;
}

.audit {
  display: flex; flex-direction: column; gap: var(--s-4);
  position: sticky; top: var(--s-5);
  animation: fadeUp .6s .35s ease backwards;
}
.audit-card {
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  border-radius: 14px;
  padding: var(--s-5);
  box-shadow: var(--shadow-1);
}
.audit-card h3 {
  margin: 0 0 var(--s-3);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: flex; align-items: center; gap: 8px;
}
.audit-card h3 svg { color: var(--accent); }

.audit-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--s-3);
  padding: 7px 0;
  border-bottom: 1px solid var(--paper-edge);
  font-size: 12.5px;
}
.audit-row:last-child { border-bottom: 0; }
.audit-row .k {
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.audit-row .v {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
}
.audit-row.signers .v {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
}

.audit-actions {
  display: flex; flex-direction: column; gap: var(--s-2);
}

.audit-trust {
  display: flex; align-items: flex-start; gap: 10px;
  padding: var(--s-3) var(--s-4);
  background: color-mix(in oklab, var(--ok) 6%, var(--paper-2));
  border: 1px solid color-mix(in oklab, var(--ok) 25%, transparent);
  border-radius: 12px;
}
.audit-trust svg {
  color: var(--ok);
  flex-shrink: 0;
  margin-top: 1px;
}
.audit-trust .txt {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.45;
}
.audit-trust .txt b {
  color: var(--ink);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.final-doc-wrap {
  display: flex; justify-content: center;
  animation: fadeUp .7s .35s ease backwards;
}
.final-doc {
  width: 100%;
  max-width: 720px;
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  border-radius: 4px;
  box-shadow: var(--shadow-doc);
  /* Keep completion preview in sync with the builder/client document page box. */
  padding: 64px 80px;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  position: relative;
  min-height: max-content;
}
.final-doc .seal-watermark {
  position: absolute;
  right: 32px; top: 32px;
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-line);
  display: grid; place-items: center;
  text-align: center;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  transform: rotate(-6deg);
  background: color-mix(in oklab, var(--accent) 4%, transparent);
}
.final-doc .seal-watermark span { line-height: 1.3; }
