/* ============================================================================
   AVH Studios — Certificate of Authorship & Provenance (web viewer)
   A print-friendly, on-screen twin of the downloadable PDF certificate.
   Loads after brand.css so it inherits the :root design tokens.
   ========================================================================== */

.cert-page { max-width: 900px; margin: 0 auto; padding: 30px 22px 80px; }

/* ---- toolbar above the certificate -------------------------------------- */
.cert-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.cert-bar .cert-bar-title { font-weight: 800; font-size: .95rem; color: var(--text-dim); }
.cert-bar .cert-bar-title b { color: var(--text); }
.cert-bar-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.cbtn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); border-radius: 999px; padding: 9px 15px;
  background: var(--panel-2); color: var(--text); cursor: pointer;
  font: inherit; font-weight: 700; font-size: .84rem; white-space: nowrap; transition: .15s ease;
}
.cbtn:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; color: var(--text); }
.cbtn-accent { border-color: transparent; color: #0b0d11; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.cbtn-accent:hover { color: #0b0d11; box-shadow: 0 10px 24px rgba(255, 107, 53, .35); }
.cbtn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---- the certificate sheet ---------------------------------------------- */
.cert-sheet {
  position: relative; background: #fbfaf7; color: #12151b;
  border: 2.5px solid var(--accent); border-radius: 6px;
  padding: 8px; box-shadow: 0 26px 70px rgba(0, 0, 0, .5);
}
.cert-sheet-inner { border: 1px solid #d9dde4; border-radius: 3px; overflow: hidden; }

.cert-band {
  background: #0f1115; color: #fff; padding: 22px 26px 20px;
}
.cert-band .brandline {
  font-size: .72rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #c9ccd3;
}
.cert-band h1 {
  margin: 8px 0 6px; font-size: clamp(1.35rem, 3.4vw, 1.9rem); line-height: 1.12; color: #fff;
}
.cert-band h1 .grad { background: linear-gradient(135deg, #ff6b35, #35c2ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cert-band .sub { font-size: .8rem; color: #c9ccd3; }

.cert-body2 { padding: 26px; }

.cert-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
@media (max-width: 680px) { .cert-cols { grid-template-columns: 1fr; } }

.cert-title2 { font-size: 1.5rem; font-weight: 800; color: #12151b; margin: 0 0 4px; }
.cert-kind2 { color: #5b6270; font-size: .88rem; margin-bottom: 16px; }

.cert-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.cert-dl dt { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5b6270; padding-top: 2px; }
.cert-dl dd { margin: 0; font-size: .9rem; color: #12151b; word-break: break-word; }
.cert-dl dd.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }

.cert-seals { display: flex; flex-direction: column; gap: 10px; align-content: start; }
.cert-sealbox {
  border: 1px solid #d9dde4; border-radius: 8px; padding: 12px 14px; background: #fff;
}
.cert-sealbox .lbl { font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5b6270; margin-bottom: 5px; }
.cert-sealbox .val { font-size: .9rem; font-weight: 700; }
.cert-sealbox.ok .val { color: #0f9d63; }
.cert-sealbox.bad .val { color: #d63345; }
.cert-sealbox.warn .val { color: #c85a1e; }
.cert-sealbox .hint { font-size: .72rem; color: #5b6270; font-weight: 500; margin-top: 3px; }

.cert-hashblock {
  margin-top: 20px; border: 1px solid #d9dde4; border-radius: 8px; background: #fff; padding: 12px 14px;
}
.cert-hashblock .lbl { font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5b6270; margin-bottom: 5px; }
.cert-hashblock .val { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: #12151b; word-break: break-all; }

.cert-extra { margin-top: 16px; }
.cert-extra .lbl { font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5b6270; margin-bottom: 5px; }
.cert-extra .val { font-size: .86rem; color: #12151b; word-break: break-word; }
.cert-extra .val.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; }

/* ---- chain of title + co-signatures (rights layer) ---------------------- */
.ct-block { border-top: 1px solid #e6e2da; padding-top: 14px; }
.ct-pill { display: inline-block; margin-left: 6px; font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: none; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.ct-pill.ok { color: #0f9d63; border-color: rgba(15, 157, 99, .4); background: rgba(15, 157, 99, .08); }
.ct-pill.bad { color: #c0392b; border-color: rgba(192, 57, 43, .4); background: rgba(192, 57, 43, .08); }
.ct-list { display: flex; flex-direction: column; }
.ct-row { display: flex; gap: 10px; padding: 9px 0; border-top: 1px dashed #e6e2da; }
.ct-row:first-child { border-top: 0; }
.ct-seq { flex: 0 0 22px; height: 22px; border-radius: 50%; background: #ff6b35; color: #fff; font-size: .72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.ct-main { flex: 1 1 auto; min-width: 0; }
.ct-head { font-size: .86rem; font-weight: 800; color: #12151b; }
.ct-date { color: #5b6270; font-size: .72rem; font-weight: 500; }
.ct-move { font-size: .8rem; color: #0f8fd6; margin-top: 2px; }
.ct-detail { font-size: .8rem; color: #5b6270; margin-top: 2px; word-break: break-word; }
.ct-cosign { font-size: .84rem; padding: 2px 0; }
.ct-cosign.ok { color: #0f9d63; }
.ct-cosign.bad { color: #c0392b; }

.cert-foot2 {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid #d9dde4;
  color: #5b6270; font-size: .78rem; line-height: 1.6;
}
.cert-foot2 a { color: #0f8fd6; word-break: break-all; }

.cert-qr { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.cert-qr img { width: 108px; height: 108px; border: 1px solid #d9dde4; border-radius: 6px; background: #fff; padding: 6px; }
.cert-qr .qr-txt { font-size: .78rem; color: #5b6270; line-height: 1.5; }
.cert-qr .qr-txt b { color: #12151b; }

/* ---- states -------------------------------------------------------------- */
.cert-state {
  text-align: center; color: var(--text-dim); border: 1px dashed var(--border);
  border-radius: var(--radius-lg); padding: 60px 24px; background: var(--panel); line-height: 1.6;
}
.cert-state h2 { color: var(--text); margin: 0 0 8px; }
.cert-state .cbtn { margin-top: 16px; }

/* ---- print --------------------------------------------------------------- */
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body { background: #fff !important; }
  .site-nav, .site-footer, .cert-bar, .cert-state { display: none !important; }
  .cert-page { max-width: none; padding: 0; }
  .cert-sheet { box-shadow: none; border-color: #ff6b35; }
  .cert-band { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cert-sheet-inner { break-inside: avoid; }
}
