/* ===========================================================================
 *  styles/pdf-cert.css — PDF Page 2: Certificate of Signature
 *
 *  Editorial restyle: cream paper, lighter guilloché bands, Fraunces serif
 *  title with italic "of", refined 3-column signer blocks with DM Mono
 *  timestamps, simpler signature box, refined badge.
 *
 *  All rules scoped under .pdf-cert-page. A4 portrait 794 × 1123 px.
 * =========================================================================== */

.pdf-cert-page {
  position: relative;
  background: #f8f5ee;
  width: 794px;
  height: 1123px;
  padding: 56px 56px 48px;
  color: #1c1812;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10pt;
  line-height: 1.5;
  overflow: hidden;
  box-sizing: border-box;

}

.pdf-cert-page *,
.pdf-cert-page *::before,
.pdf-cert-page *::after { box-sizing: border-box; }
.pdf-cert-page p,
.pdf-cert-page div,
.pdf-cert-page span { margin: 0; padding: 0; }

/* ---- Guilloché security bands (lighter) ---- */
.pdf-cert-page .cert-guilloche {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 60px;
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
}
.pdf-cert-page .cert-guilloche.is-top { top: 0; }
.pdf-cert-page .cert-guilloche.is-bottom { bottom: 0; transform: scaleY(-1); }
.pdf-cert-page .cert-guilloche svg { display: block; width: 100%; height: 100%; }

/* ---- Content sits above the pattern ---- */
.pdf-cert-page .cert-body {
  position: relative;
  z-index: 1;
  padding-top: 28px;
}

/* ---- Title ---- */
.pdf-cert-page .cert-title {
  text-align: center;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 32pt;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.0;
  margin: 8px 0 22px;
  color: #1c1812;
}
.pdf-cert-page .cert-title-of {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 26pt;
  color: #6b5a3e;
  padding: 0 8px;
}

/* ---- Top metadata row ---- */
.pdf-cert-page .cert-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
  font-size: 9pt;
}
.pdf-cert-page .cert-meta .cert-meta-col.is-right { text-align: right; }
.pdf-cert-page .cert-meta .cert-k {
  font-family: 'DM Mono', monospace;
  color: #6b5a3e;
  text-transform: uppercase;
  font-size: 7pt;
  letter-spacing: .22em;
  font-weight: 500;
  margin-bottom: 4px;
}
.pdf-cert-page .cert-meta .cert-v {
  font-family: 'DM Mono', monospace;
  font-size: 10pt;
  color: #1c1812;
  font-weight: 500;
  letter-spacing: .06em;
}
.pdf-cert-page .cert-meta .cert-v-sub {
  font-family: 'DM Mono', monospace;
  font-size: 7.5pt;
  color: #6b5a3e;
  margin-top: 2px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ---- Column header row ---- */
.pdf-cert-page .cert-col-header {
  display: grid;
  grid-template-columns: 1.05fr 1.1fr 1.15fr;
  gap: 18px;
  border-bottom: 1px solid #1c1812;
  padding-bottom: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 8pt;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .28em;
  color: #1c1812;
  margin-bottom: 14px;
}

/* ---- Signer block ---- */
.pdf-cert-page .cert-signer {
  display: grid;
  grid-template-columns: 1.05fr 1.1fr 1.15fr;
  gap: 18px;
  padding: 14px 0 18px;
  font-size: 9pt;
  line-height: 1.55;
}
.pdf-cert-page .cert-signer + .cert-signer {
  border-top: 1px dotted #c8b58a;
}

.pdf-cert-page .cert-signer .cert-name {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 14pt;
  letter-spacing: -.005em;
  color: #1c1812;
  margin-bottom: 8px;
  text-transform: none;
}

.pdf-cert-page .cert-signer .cert-label {
  font-family: 'DM Mono', monospace;
  color: #6b5a3e;
  text-transform: uppercase;
  font-size: 7pt;
  letter-spacing: .22em;
  font-weight: 500;
  margin-top: 8px;
}
.pdf-cert-page .cert-signer .cert-label:first-child { margin-top: 0; }

.pdf-cert-page .cert-signer .cert-value {
  font-size: 9pt;
  color: #1c1812;
  margin-top: 2px;
  word-break: break-word;
}
.pdf-cert-page .cert-signer .cert-value.is-mono {
  font-family: 'DM Mono', monospace;
  font-size: 8.5pt;
  letter-spacing: .04em;
}
.pdf-cert-page .cert-signer .cert-value.is-email {
  font-family: 'DM Mono', monospace;
  font-size: 8.5pt;
  letter-spacing: .04em;
  text-transform: none;
  color: #4a3f2e;
}

/* Verification sub-block */
.pdf-cert-page .cert-verify-h {
  margin-top: 16px;
  font-family: 'DM Mono', monospace;
  font-size: 7.5pt;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: #4a3f2e;
  border-top: 1px dashed #c8b58a;
  padding-top: 10px;
}

/* Signature box — simplified: thin under-rule only */
.pdf-cert-page .cert-sigbox {
  border: 0;
  border-bottom: 1px solid #1c1812;
  border-radius: 0;
  background: transparent;
  height: 70px;
  padding: 4px 2px 4px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  margin-bottom: 10px;
  overflow: hidden;
}
.pdf-cert-page .cert-sigbox img {
  max-height: 60px;
  max-width: 100%;
  display: block;
}
.pdf-cert-page .cert-sigbox .cert-sigbox-empty {
  font-family: 'Fraunces', serif;
  color: #94886a;
  font-style: italic;
  font-size: 9pt;
}

/* ---- Footer area ---- */
.pdf-cert-page .cert-footer {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  z-index: 1;
}

.pdf-cert-page .cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 1px solid #1c1812;
  border-radius: 0;
  padding: 7px 13px 6px 11px;
  font-family: 'DM Mono', monospace;
  font-size: 8pt;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: #1c1812;
}
.pdf-cert-page .cert-badge .cert-badge-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #b51a23;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  position: relative;
  box-shadow: inset 0 0 0 2px #f8f5ee, inset 0 0 0 3px #b51a23;
}
.pdf-cert-page .cert-badge .cert-badge-icon::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #f8f5ee;
}

.pdf-cert-page .cert-page-num {
  font-family: 'DM Mono', monospace;
  font-size: 8pt;
  letter-spacing: .25em;
  font-weight: 500;
  color: #4a3f2e;
  text-transform: uppercase;
}

.pdf-cert-page .cert-qr {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  background: #f8f5ee;
  padding: 3px;
  border: 1px solid #c8b58a;
}
.pdf-cert-page .cert-qr svg { display: block; width: 100%; height: 100%; }

.pdf-cert-page .cert-footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
