/* Certificado — diseño fijo (los PDF ya emitidos deben coincidir). Tokens propios, independientes del sitio. */
.certificate { --tinta: #161616; --tinta-2: #3A3D40; --gris: #58595B; --gris-2: #8B8E92; --regla: #D9DCE0; --regla-2: #ECEEF0; --azul: #0E8FD5; --azul-tinta: #0A6FA8; --noche: #0F1317; --noche-2: #171C22;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif; --serif: "Newsreader", "Iowan Old Style", Georgia, serif; --mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
  font-weight: 400; line-height: 1.6; }
.certificate h1, .certificate h2, .certificate h3 { font-weight: inherit; }
/* Certificado — A4 apaisado (1123 × 794 @ 96 dpi) */
.certificate { width: 1123px; height: 794px; position: relative; background: #fff; color: var(--tinta); font-family: var(--serif); padding: 54px 64px 54px 110px; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.certificate .frame { position: absolute; inset: 24px; border: 1px solid var(--regla); pointer-events: none; }
.certificate .marca { position: absolute; width: 13px; height: 15px; background: var(--azul); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.certificate .marca.tl { left: 19px; top: 19px; } .certificate .marca.tr { right: 19px; top: 19px; } .certificate .marca.bl { left: 19px; bottom: 19px; } .certificate .marca.br { right: 19px; bottom: 19px; }
.certificate .franja { position: absolute; left: 44px; top: 54px; bottom: 54px; width: 40px; border-right: 1px solid var(--regla); display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 6px 0; }
.certificate .franja span { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--sans); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); white-space: nowrap; }
.certificate .franja .h { display: none; }
.certificate .iso-grid { position: absolute; right: 64px; top: 130px; width: 330px; height: 330px; opacity: .55; pointer-events: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='83' viewBox='0 0 48 83'><path d='M24 0v83M0 14l48 28M48 14 0 42M0 55l48 28M48 55 0 83' fill='none' stroke='%23ECEEF0' stroke-width='1'/></svg>"); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%); -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%); }
.certificate .c-head { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.certificate .c-head img { height: 52px; }
.certificate .c-head .emisor { text-align: right; font-family: var(--sans); font-size: 9.5px; line-height: 1.5; color: var(--gris); }
.certificate .c-head .emisor b { display: block; font-weight: 500; color: var(--tinta); }
.certificate .c-title { margin-top: 40px; font-size: 46px; font-weight: 300; line-height: 1; letter-spacing: -.01em; position: relative; }
.certificate .c-prog { margin-top: 10px; font-family: var(--sans); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
.certificate .c-sub { margin-top: 4px; font-size: 19px; font-weight: 500; line-height: 1.3; max-width: 640px; position: relative; }
.certificate .c-grant { margin-top: 30px; font-family: var(--sans); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--gris); }
.certificate .c-name { margin-top: 6px; font-size: 40px; font-weight: 400; line-height: 1.1; display: inline-block; border-bottom: 1px solid var(--tinta); padding-bottom: 6px; position: relative; }
.certificate .c-course { margin-top: 18px; font-size: 13.5px; line-height: 1.55; color: var(--tinta-2); max-width: 640px; position: relative; }
.certificate .c-course b { color: var(--tinta); font-weight: 500; }
.certificate .c-ficha { margin-top: 18px; display: grid; grid-template-columns: repeat(4, auto); gap: 32px; justify-content: start; font-family: var(--sans); font-size: 11px; color: var(--gris); border-top: 1px solid var(--regla); padding-top: 10px; width: 640px; position: relative; }
.certificate .c-ficha b { display: block; font-weight: 500; color: var(--tinta); font-size: 12.5px; margin-top: 2px; }
.certificate .c-foot { position: absolute; left: 110px; right: 64px; bottom: 54px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 36px; align-items: end; }
.certificate .sig { border-top: 1px solid var(--tinta); padding-top: 8px; position: relative; }
.certificate .sig .rubric { position: absolute; left: 4px; bottom: 44px; height: 66px; width: auto; max-width: 220px; object-fit: contain; }
.certificate .sig b { display: block; font-family: var(--sans); font-weight: 500; font-size: 12.5px; }
.certificate .sig span { font-family: var(--sans); font-size: 10.5px; color: var(--gris); }
.certificate .qr { display: flex; gap: 12px; align-items: flex-end; }
.certificate .qr .qrbox { width: 92px; height: 92px; padding: 6px; border: 1px solid var(--regla); background: #fff; box-sizing: content-box; }
.certificate .qr .qrbox img, .certificate .qr .qrbox canvas { width: 92px !important; height: 92px !important; }
.certificate .qr small { display: block; font-family: var(--sans); font-size: 9px; color: var(--gris); line-height: 1.5; max-width: 215px; }
.certificate .qr small b { font-family: var(--mono); font-size: 8px; color: var(--tinta); font-weight: 400; overflow-wrap: anywhere; }
.certificate .qr small b.hash { word-break: break-all; }
.certificate.theme-sec { background: var(--noche); color: #fff; }
.certificate.theme-sec .frame { border-color: #3A3D40; }
.certificate.theme-sec .franja { border-right-color: #3A3D40; }
.certificate.theme-sec .franja span { color: #9DA1A6; }
.certificate.theme-sec .iso-grid { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='83' viewBox='0 0 48 83'><path d='M24 0v83M0 14l48 28M48 14 0 42M0 55l48 28M48 55 0 83' fill='none' stroke='%232A2E33' stroke-width='1'/></svg>"); opacity: 1; }
.certificate.theme-sec .c-head .logo-light { display: none; }
.certificate.theme-sec .c-head .emisor { color: #9DA1A6; }
.certificate.theme-sec .c-head .emisor b { color: #fff; }
.certificate .wordmark { display: none; }
.certificate.theme-sec .wordmark { display: flex; align-items: center; gap: 12px; }
.certificate.theme-sec .wordmark svg { width: 52px; height: 52px; }
.certificate.theme-sec .wordmark b { display: block; font-family: var(--sans); font-weight: 400; font-size: 19px; line-height: 1.05; letter-spacing: .02em; color: #fff; }
.certificate.theme-sec .wordmark b.accent { color: var(--azul); }
.certificate.theme-sec .wordmark small { display: block; margin-top: 4px; font-family: var(--sans); font-size: 7px; letter-spacing: .18em; text-transform: uppercase; color: #9DA1A6; }
.certificate.theme-sec .c-prog, .certificate.theme-sec .c-grant { color: #9DA1A6; }
.certificate.theme-sec .c-sub { color: var(--azul); }
.certificate.theme-sec .c-name { border-bottom-color: #fff; }
.certificate.theme-sec .c-course { color: #C7CACD; }
.certificate.theme-sec .c-course b { color: #fff; }
.certificate.theme-sec .c-ficha { color: #9DA1A6; border-top-color: #3A3D40; }
.certificate.theme-sec .c-ficha b { color: #fff; }
.certificate.theme-sec .sig { border-top-color: #fff; }
.certificate.theme-sec .sig span { color: #9DA1A6; }
.certificate.theme-sec .sig .rubric { filter: brightness(0) invert(1); }
.certificate.theme-sec .qr .qrbox { border-color: #3A3D40; }
.certificate.theme-sec .qr small { color: #9DA1A6; }
.certificate.theme-sec .qr small b { color: #E4E6E8; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body * { visibility: hidden; }
  .cert-frame, .cert-frame * { visibility: visible; }
  .cert-frame { position: fixed; inset: 0; margin: 0; border: 0; border-radius: 0; overflow: visible; }
  .cert-scale { transform: none !important; height: auto !important; width: auto; }
  .certificate { width: 297mm; height: 210mm; padding: 14mm 17mm 14mm 29mm; }
  .certificate .c-foot { left: 29mm; right: 17mm; bottom: 14mm; }
}
