/* Certificate styles (from the mela certificate app) */
/* =====================================================================
   Certificate — shared by on-screen preview and the print area.
   Every internal size is in cqw (container-query width units) so the
   card scales as one unit regardless of what width it renders at.
   ===================================================================== */
.cert{
  position:relative;
  width:100%;
  aspect-ratio:1/1;
  background:#14251b;
  box-shadow:0 20px 50px -25px rgba(20,50,35,0.16);
  outline:4px solid #edf5f0;
  outline-offset:-3px;
  container-type:inline-size;
  container-name:cert;
}
#certMount .cert{ max-width:680px; }
.cert svg.frame{ position:absolute; inset:0; width:100%; height:100%; display:block; }

.cert-content{
  position:absolute;
  inset:6.5%;
  background:#101f16;
  display:flex;
  flex-direction:column;
  padding:1.5cqw 3cqw 1.3cqw;
  color:#f3f7f4;
  overflow:hidden;
  box-shadow:
    0 0 0 0.7cqw #101f16,
    0 0 0 0.88cqw #356b45,
    0 0 0 1.18cqw #a77819;
}

.cert-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:1.47cqw; flex:none; }
.issuer{ font-size:1.15cqw; line-height:1.35; color:#4f6457; max-width:22cqw; }
.issuer .label{ text-transform:uppercase; letter-spacing:0.12em; font-size:0.95cqw; color:#886b30; display:block; }
.issuer .name{ font-weight:700; color:#356b45; font-size:1.4cqw; }

.contolx-brand{ text-align:center; }
.contolx-brand .word{
  font-family:"Cormorant Garamond", serif; font-weight:700; font-size:3.3cqw;
  letter-spacing:0.01em; line-height:1.1;
}
.contolx-brand .brand-logo{ display:block; width:17cqw; height:auto; margin:0 auto; }
.contolx-brand .word .c1{ color:#4e9753; }
.contolx-brand .word .c2{ color:#a2311f; }
.contolx-brand .tag{ font-size:1.02cqw; letter-spacing:0.1em; text-transform:uppercase; color:#886b30; margin-top:0.12cqw; }

.event-badge{ text-align:right; font-size:1.2cqw; line-height:1.35; color:#e5ede8; max-width:23.5cqw; }
.event-badge .num{ font-family:"Cormorant Garamond", serif; font-weight:600; font-size:1.6cqw; color:#a2311f; }

.cert-middle{ display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; }

.cert-title{ text-align:center; margin-top:0.25cqw; flex:none; }
.cert-title .h-row{ display:flex; align-items:center; justify-content:center; gap:1cqw; }
.cert-title .h-row svg{ flex:none; opacity:0.85; height:1.4cqw; width:auto; }
.cert-title .h-row svg.right{ transform:scaleX(-1); }
.cert-title .h{
  font-family:"Cormorant Garamond", serif; font-weight:600; font-size:2.1cqw;
  letter-spacing:0.05em; color:#356b45; text-transform:uppercase; white-space:nowrap;
}
.cert-title .s{ font-size:1.15cqw; font-style:italic; color:#4f6457; margin-top:0.12cqw; }

/* photo-frame ratio matches the 600x800 (3:4) capture canvas exactly so
   object-fit:cover never has to crop a captured portrait photo */
.photo-wrap{ display:flex; justify-content:center; align-items:center; margin-top:0.35cqw; flex:1 1 auto; min-height:0; }
.photo-frame{
  width:52%; min-width:19cqw; max-height:100%; aspect-ratio:3/4;
  border:0.44cqw solid #a77819; box-shadow:0 0.88cqw 2.35cqw -1.18cqw rgba(20,50,35,0.14);
  position:relative; overflow:hidden; background:#28342d;
}
.photo-frame img{ width:100%; height:100%; object-fit:contain; display:block; }

.cert-who{ text-align:center; margin-top:0.35cqw; flex:none; }
.cert-who .name{
  font-family:"Cormorant Garamond", serif; font-weight:700; font-size:2.5cqw;
  color:#f3f7f4; display:inline-block; border-bottom:1px solid #708f7d;
  padding:0 0.7cqw 0.18cqw; margin:0.12cqw 0 0.18cqw; line-height:1.15;
}
.cert-who .org{ font-size:1.25cqw; font-weight:600; color:#e5ede8; }

.cert-para{
  text-align:center; font-size:1.6cqw; line-height:1.38; color:#eaf1ed;
  max-width:100%; margin:0.4cqw auto 0; flex:none;
}
.cert-para b{ color:#4e9753; }

/* no-photo variant: hide the photo block, let the title/name/para grow to fill */
.cert-content.no-photo .photo-wrap{ display:none; }
.cert-content.no-photo .cert-middle{ justify-content:center; gap:1.6cqw; }
.cert-content.no-photo .cert-title{ margin-top:0; }
.cert-content.no-photo .cert-title .h{ font-size:3.7cqw; }
.cert-content.no-photo .cert-title .s{ font-size:1.8cqw; margin-top:0.4cqw; }
.cert-content.no-photo .cert-who{ margin-top:0; }
.cert-content.no-photo .cert-who .name{ font-size:4.2cqw; padding:0 1.3cqw 0.5cqw; margin:0.6cqw 0 0.5cqw; }
.cert-content.no-photo .cert-who .org{ font-size:1.95cqw; }
.cert-content.no-photo .cert-para{ font-size:2cqw; line-height:1.5; max-width:100%; margin-top:0; }

.cert-foot{ display:flex; align-items:flex-end; justify-content:space-between; margin-top:0.4cqw; flex:none; }
.foot-block{ font-size:1.1cqw; line-height:1.35; color:#4f6457; }
.foot-block .label{ text-transform:uppercase; letter-spacing:0.1em; font-size:0.92cqw; color:#886b30; display:block; }
.foot-block .val{ font-size:1.3cqw; color:#f3f7f4; font-weight:700; }
.sig{ text-align:center; font-size:1.1cqw; color:#4f6457; }
.sig-mark{ height:5.5cqw; display:flex; align-items:flex-end; justify-content:center; }
.sig-img{ height:100%; width:auto; object-fit:contain; }
.sig-line{ width:11.5cqw; border-top:1px solid #52695c; margin:0.12cqw 0 0.35cqw; }
.sig-name{ font-family:"Cormorant Garamond", serif; font-weight:700; font-size:1.35cqw; color:#f3f7f4; }
.qr-block{ display:flex; align-items:center; gap:0.88cqw; }
.qr{ width:8.5cqw; height:8.5cqw; background:#141414; border:1px solid #708f7d; padding:3px; flex:none; }
.qr svg{ width:100%; height:100%; display:block; }
.qr-cap{ font-size:1.05cqw; color:#4f6457; line-height:1.3; max-width:11cqw; }

/* ---------- public verification page ---------- */
:root{ --ink:#f3f7f4; --muted:#4f6457; --paper:#16291e; --line:#2b4f3a; --forest:#4e9753; --navy:#356b45; --rust:#a2311f; --gold:#a77819; }
*{ box-sizing:border-box; }
body{ margin:0; background:var(--paper); color:var(--ink); font-family:"Source Sans 3", system-ui, sans-serif; }
.top{ background:var(--navy); color:#192e22; padding:12px 16px; display:flex; align-items:center; gap:12px; }
.top img{ height:30px; background:#141414; border-radius:8px; padding:3px 8px; }
.top .t{ font-family:"Cormorant Garamond", serif; font-weight:600; font-size:19px; }
.wrap{ max-width:1080px; margin:0 auto; padding:18px 16px 50px; }
.verified{ display:flex; gap:12px; align-items:center; background:#182d21; border:1px solid #2f5740; color:#e8f3eb; border-radius:12px; padding:12px 14px; margin-bottom:16px; }
.verified .tick{ width:34px; height:34px; border-radius:50%; background:var(--forest); color:#141414; display:grid; place-items:center; font-size:19px; flex:none; }
.verified b{ display:block; font-size:16px; }
.verified span{ font-size:13.5px; color:#4f6457; }
.notfound{ background:#132319; border-color:#274936; color:#8a2f1d; }
.notfound .tick{ background:var(--rust); }
.cert-box{ max-width:1040px; margin:0 auto; }
/* A4 landscape certificate (297 x 210), like the app's "A4 · Full Page, landscape" print */
.cert-box .cert{ aspect-ratio:297/210; max-width:none; }
.verified, .lookup, .about{ max-width:1040px; margin-left:auto; margin-right:auto; }
.actions{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin:18px 0 6px; }
.btn{ font:inherit; font-weight:600; font-size:14.5px; border-radius:10px; padding:11px 18px; border:1px solid var(--line); background:#141414; color:var(--navy); cursor:pointer; text-decoration:none; display:inline-flex; gap:8px; align-items:center; }
.btn.primary{ background:var(--forest); border-color:var(--forest); color:#141414; }
.btn.wa{ background:#4e9753; border-color:#4e9753; color:#141414; }
.lookup{ background:#141414; border:1px solid var(--line); border-radius:12px; padding:18px; margin-top:22px; }
.lookup h2{ font-family:"Cormorant Garamond", serif; margin:0 0 6px; font-size:22px; }
.lookup form{ display:flex; gap:8px; flex-wrap:wrap; }
.lookup input{ flex:1; min-width:200px; font:inherit; font-size:15px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; text-transform:uppercase; }
.muted{ color:var(--muted); font-size:13.5px; line-height:1.5; }
.about{ margin-top:22px; text-align:center; }
.about a{ color:var(--forest); font-weight:600; }
@media print{
  @page{ size:A4 landscape; margin:6mm; }
  body{ background:#141414; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .top, .verified, .actions, .lookup, .about{ display:none !important; }
  .wrap{ padding:0; max-width:none; }
  html, body{ width:285mm; height:198mm; overflow:hidden; }
  .cert-box{ max-width:none; width:285mm; height:198mm; margin:0; }
  .cert-box .cert{ width:285mm; height:198mm; aspect-ratio:auto; }
  .cert{ box-shadow:none; }
}