*{box-sizing:border-box} :root{--yellow:#ffd700;--green:#35b875;--navy:#101729;--blue:#2862e8}
html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;color:#202936;background:#f1f2f5}
.site-header{height:262px;background:var(--yellow);display:flex;align-items:center;justify-content:center;padding:16px 5.8%}.brand-image{display:block;width:100%;height:100%;max-height:220px;object-fit:contain;object-position:center center}
main{padding:28px 20px 28px}.verification-card{width:min(100%,930px);margin:0 auto;border:3px solid var(--green);border-radius:42px;background:linear-gradient(145deg,#effff4,#dcfbe7);padding:58px 8.6% 54px;position:relative;text-align:center;box-shadow:0 5px 18px #2da96b12}.verified{position:absolute;top:28px;right:28px;background:#28bb68;color:white;font-size:14px;font-weight:700;letter-spacing:1.4px;border-radius:28px;padding:12px 22px}.portrait-wrap{position:relative;width:214px;height:214px;margin:0 auto 35px}.portrait{width:100%;height:100%;border:6px solid #fff;border-radius:28px;object-fit:cover;background:#d9dde0}.checkmark{position:absolute;right:-18px;bottom:-12px;width:52px;height:58px;background:#28c66c;border-radius:50%;color:white;font-size:34px;font-weight:700;display:flex;align-items:center;justify-content:center;border:3px solid #e3ffec}h1{font-size:clamp(22px,3.4vw,34px);line-height:1.2;margin:0 0 15px;font-weight:800}.course-title{font-size:clamp(17px,2.4vw,23px);font-weight:700;color:#37945e;margin-bottom:58px}.details-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px 28px;text-align:left;margin-bottom:54px}.detail-box{background:#ffffffdf;border-radius:25px;padding:32px 30px;min-height:124px;display:flex;flex-direction:column;justify-content:center;min-width:0}.detail-label{font-size:14px;color:#9ca3af;font-weight:700;margin-bottom:13px;white-space:nowrap}.detail-value{font-size:clamp(17px,2.2vw,22px);font-weight:500;white-space:nowrap}.actions{display:flex;flex-direction:column;gap:22px}.actions button{width:100%;min-height:82px;border:0;border-radius:28px;color:white;font-size:17px;font-weight:700;cursor:pointer}.certificate-button{background:var(--navy)}.id-button{background:var(--blue)}.extra-pages{margin:0;padding:0}.extra-pages img{display:block;width:100%;height:auto;margin:0;padding:0;box-shadow:0 3px 7px rgba(0,0,0,.10)}
.viewer{position:fixed;inset:0;z-index:20;background:#252525;padding:18px;overflow:auto;color:#fff}.viewer[hidden]{display:none}.viewer-toolbar{max-width:1100px;margin:0 auto 14px;display:flex;justify-content:space-between;align-items:center}.viewer-toolbar button{background:#fff;border:0;border-radius:8px;padding:10px 14px;font-weight:bold}.viewer-stage{min-height:80vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px}.viewer-stage iframe{width:min(100%,1100px);height:82vh;border:0;background:#fff}.id-document{width:min(100%,900px);background:#fff;color:#222;padding:24px;text-align:center}.id-document iframe{width:100%;height:55vh;border:0}
.welcome{max-width:800px;margin:auto;padding:45px;text-align:center;background:#fff;border-radius:20px}
@media(max-width:600px){.site-header{height:151px;padding:10px 6%}.brand-image{width:100%;max-height:125px}main{padding:16px 12px 16px}.verification-card{padding:35px 8.5% 24px;border-width:2px;border-radius:28px}.verified{top:14px;right:17px;padding:7px 12px;font-size:10px}.portrait-wrap{width:108px;height:108px;margin-bottom:16px}.portrait{border-width:4px;border-radius:20px}.checkmark{width:35px;height:39px;font-size:23px;right:-9px;bottom:-7px}h1{font-size:clamp(17px,4.4vw,22px);line-height:1.15;margin-bottom:7px;white-space:nowrap;letter-spacing:-.3px}.course-title{font-size:15px;margin-bottom:22px}.details-grid{gap:12px 14px;margin-bottom:20px}.detail-box{min-height:72px;padding:12px 13px;border-radius:17px}.detail-label{font-size:10px;margin-bottom:8px}.detail-value{font-size:clamp(13px,3.6vw,16px)}.actions{gap:12px}.actions button{min-height:48px;padding:8px 4px;font-size:12px;border-radius:18px}.record-qr{margin-top:16px}.record-qr img{width:126px;height:126px}}
/* Only the dynamic verification card has a subtle lower edge. The attached JPG pages stay flush with no shadow or gap. */
.verification-card.dynamic-page{box-shadow:0 8px 12px -9px rgba(0,0,0,.24)}
.extra-pages img{box-shadow:none!important;margin:0!important}

/* Reference-match fix: compact yellow logo header and taller dynamic verification card.
   Scoped to small/tablet viewports; all other pages and admin styling remain unchanged. */
@media (max-width: 800px){
  .site-header{height:92px!important;min-height:92px;padding:6px 5.8%!important}
  .brand-image{width:100%;height:100%;max-height:80px!important;object-fit:contain;object-position:center}
  main{padding:16px 12px 0!important}
  .verification-card.dynamic-page{padding-top:42px!important;padding-bottom:38px!important}
  .verification-card.dynamic-page .portrait-wrap{width:124px;height:124px;margin-bottom:22px}
  .verification-card.dynamic-page .course-title{margin-bottom:30px}
  .verification-card.dynamic-page .details-grid{gap:16px 14px;margin-bottom:28px}
  .verification-card.dynamic-page .detail-box{min-height:82px;padding:14px 13px}
  .verification-card.dynamic-page .actions{gap:14px}
  .verification-card.dynamic-page .actions button{min-height:52px}
}
@media (max-width:390px){
  .site-header{height:88px!important;min-height:88px}
  .verification-card.dynamic-page{padding-top:38px!important;padding-bottom:34px!important}
  .verification-card.dynamic-page .portrait-wrap{width:116px;height:116px}
}


/* Final requested mobile verification-page fit and reference-style check badge. */
@media (max-width: 800px){
  .site-header{height:92px!important;min-height:92px!important;padding:5px 5.8%!important}
  .brand-image{max-height:80px!important}
  main{padding:12px 12px 0!important}
  .verification-card.dynamic-page{min-height:calc(100svh - 116px);padding-top:38px!important;padding-bottom:26px!important;display:flex;flex-direction:column;justify-content:space-between}
  .verification-card.dynamic-page .portrait-wrap{width:124px;height:124px;flex:0 0 auto;margin:0 auto 18px}
  .verification-card.dynamic-page .portrait{width:100%;height:100%}
  .verification-card.dynamic-page .checkmark{width:46px;height:52px;right:-20px;bottom:-12px;font-size:29px;border-width:3px;z-index:2}
  .verification-card.dynamic-page h1{margin-bottom:7px}
  .verification-card.dynamic-page .course-title{margin-bottom:20px}
  .verification-card.dynamic-page .details-grid{gap:12px 14px;margin-bottom:20px}
  .verification-card.dynamic-page .detail-box{min-height:72px;padding:12px 13px}
  .verification-card.dynamic-page .actions{gap:12px}
  .verification-card.dynamic-page .actions button{min-height:50px}
}
@media(max-width:390px){
  .verification-card.dynamic-page{padding-top:34px!important;padding-bottom:22px!important}
  .verification-card.dynamic-page .portrait-wrap{width:112px;height:112px;margin-bottom:15px}
  .verification-card.dynamic-page .checkmark{width:43px;height:49px;right:-18px;bottom:-11px;font-size:27px}
  .verification-card.dynamic-page .course-title{margin-bottom:16px}
  .verification-card.dynamic-page .details-grid{gap:10px;margin-bottom:16px}
  .verification-card.dynamic-page .detail-box{min-height:66px;padding:10px 11px}
  .verification-card.dynamic-page .actions button{min-height:46px}
}
