/* Certificate maker: frame styles, colours, landscape or portrait. Height follows the paper (--ph from .sheet-slot). */
.ce{--c:#1F3A5F;--g:#E9A23B;position:relative;flex:1;display:flex;padding:3mm;min-height:calc(var(--ph) - 66mm);box-sizing:border-box;color:#111}
.ce-c-green{--c:#1E6B4A}.ce-c-maroon{--c:#7A1F2B}.ce-c-purple{--c:#4B2E83}.ce-c-teal{--c:#0F6670}.ce-c-black{--c:#222;--g:#888}
.ce-in{position:relative;z-index:1;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:8mm 14mm;gap:4mm}
.ce-org{margin:0;font-size:13pt;font-weight:700;color:var(--c)}
.ce-top{margin:0;font-size:14pt;letter-spacing:1.2mm;text-transform:uppercase;color:var(--c)}
[dir=rtl] .ce-top{letter-spacing:0}
.ce-seal{flex:none;width:30mm;height:24mm}.ce-seal-medal{height:30mm}
.ce-gold{fill:var(--g);stroke:var(--c);stroke-width:2.5;stroke-linejoin:round}
.ce-ring{fill:none;stroke:#fff;stroke-width:2}.ce-ink{fill:#fff}.ce-rib{fill:var(--c)}
.ce-award{margin:0;font-size:32pt;line-height:1.15;color:var(--c)}
.ce-award::after,.ce-award::before{content:none!important;display:none!important}
.ce-to{margin:2mm 0 0;font-size:13pt}
.ce-name{margin:0;min-width:120mm;max-width:100%;min-height:16mm;border-bottom:.5mm solid #000;font-size:28pt;font-weight:700;line-height:1.3}
.ce-why{margin:0;font-size:14pt;max-width:170mm}
.ce-foot{display:flex;flex-wrap:wrap;justify-content:center;gap:6mm 18mm;margin-top:8mm}
.ce-sign{display:flex;flex-direction:column;align-items:center;gap:1.5mm;min-width:52mm}
.ce-val{display:block;width:100%;min-height:8mm;border-bottom:.35mm solid #000;font-size:13pt}
.ce-sign small{font-size:10pt;color:#444}
.ce-land .ce-in{padding:6mm 20mm;gap:3mm}.ce-land .ce-award{font-size:34pt}.ce-land .ce-name{min-width:150mm}.ce-land .ce-foot{margin-top:5mm}

/* Classic: double frame with a thin gold inner line. */
.ce-classic{border:2.2mm double var(--c)}
.ce-classic .ce-in{border:.5mm solid var(--g)}
/* Elegant: thin frame with ornamented corners. */
.ce-elegant{border:.4mm solid var(--c);padding:5mm}
.ce-elegant .ce-in{border:.25mm solid var(--g)}
.ce-cn{position:absolute;width:24mm;height:24mm;z-index:0}
.ce-tl{top:1.5mm;left:1.5mm}.ce-tr{top:1.5mm;right:1.5mm;transform:scaleX(-1)}.ce-bl{bottom:1.5mm;left:1.5mm;transform:scaleY(-1)}.ce-br{bottom:1.5mm;right:1.5mm;transform:scale(-1,-1)}
.ce-ln{fill:none;stroke:var(--c);stroke-width:2.4}.ce-ln2{fill:none;stroke:var(--g);stroke-width:1.2}.ce-leaf{fill:var(--g);stroke:var(--c);stroke-width:1}
/* Playful: thick dashed frame with confetti corners. */
.ce-playful{border:2mm dashed var(--c);border-radius:6mm}
.ce-playful .ce-in{border:.8mm solid var(--g);border-radius:4mm}
.ce-playful .ce-cn{width:20mm;height:20mm}
.ce-dot1{fill:#E9A23B}.ce-dot2{fill:#3BA3E9}.ce-dot3{fill:#E95B7A}.ce-c-black .ce-dot1,.ce-c-black .ce-dot2,.ce-c-black .ce-dot3{fill:#999}
/* Modern: solid bands top and bottom, no side frame. */
.ce-modern{border-top:9mm solid var(--c);border-bottom:9mm solid var(--c);padding:0}
.ce-modern .ce-in{box-shadow:inset 0 2.5mm 0 var(--g),inset 0 -2.5mm 0 var(--g)}
.ce-modern .ce-top{letter-spacing:2mm}

/* Registry artwork (public/assets/art): theme icons in the four corners, image emblem. Art files keep their own colours. */
.ce-arted{padding:5mm}
.ce-art{width:20mm;height:20mm;z-index:2;pointer-events:none;transform:none}
.ce-art.ce-tl,.ce-art.ce-tr{top:4mm}.ce-art.ce-bl,.ce-art.ce-br{bottom:4mm}.ce-art.ce-tl,.ce-art.ce-bl{left:4mm}.ce-art.ce-tr,.ce-art.ce-br{right:4mm}
.ce-land .ce-art{width:22mm;height:22mm}
.ce-arted .ce-in{padding-inline:24mm}
.ce-seal-art{width:26mm;height:26mm}

/* Formal & Professional frames: 1200x850 landscape border art behind live text, kept in proportion (never stretched). */
.ce-framed{flex:none;align-self:center;width:min(100%,calc((var(--ph) - 66mm) * 1.4118));height:auto;min-height:0;aspect-ratio:1200/850;padding:0;margin-inline:auto}
.ce-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:0;pointer-events:none}
.ce-framed .ce-in{position:absolute;inset:13% 14% 12%;padding:0;gap:2mm}
.ce-framed.ce-land .ce-in{padding:0;gap:2mm}
.ce-framed .ce-award{font-size:24pt}.ce-framed .ce-name{min-width:60%;min-height:11mm;font-size:21pt}
.ce-framed .ce-to,.ce-framed .ce-org{font-size:11pt}.ce-framed .ce-why{font-size:11pt;max-width:100%}
.ce-framed .ce-seal{width:20mm;height:16mm}.ce-framed .ce-seal-medal,.ce-framed .ce-seal-art{height:18mm;width:18mm}
.ce-framed .ce-foot{margin-top:2mm;gap:3mm 12mm}.ce-framed .ce-sign{min-width:40mm}.ce-framed .ce-val{min-height:6mm;font-size:11pt}

/* Signatures: self-hosted OFL fonts (licences in /assets/fonts/OFL-sig-*.txt). Each stack falls back to the other script. */
@font-face{font-family:'Sig Great Vibes';src:url(../../fonts/sig-great-vibes.woff2) format('woff2');font-display:block}
@font-face{font-family:'Sig Allura';src:url(../../fonts/sig-allura.woff2) format('woff2');font-display:block}
@font-face{font-family:'Sig Dancing';src:url(../../fonts/sig-dancing-script.woff2) format('woff2');font-weight:400 700;font-display:block}
@font-face{font-family:'Sig Sacramento';src:url(../../fonts/sig-sacramento.woff2) format('woff2');font-display:block}
@font-face{font-family:'Sig Ruqaa';src:url(../../fonts/sig-aref-ruqaa.woff2) format('woff2');font-display:block}
@font-face{font-family:'Sig Kufi';src:url(../../fonts/sig-reem-kufi.woff2) format('woff2');font-weight:400 700;font-display:block}
.ce-f-vibes,.ce-f-auto{font-family:'Sig Great Vibes','Sig Ruqaa',cursive}
.ce-f-allura{font-family:'Sig Allura','Sig Ruqaa',cursive}
.ce-f-dancing{font-family:'Sig Dancing','Sig Ruqaa',cursive}
.ce-f-sacramento{font-family:'Sig Sacramento','Sig Ruqaa',cursive}
.ce-f-ruqaa{font-family:'Sig Ruqaa','Sig Great Vibes',cursive}
.ce-f-kufi{font-family:'Sig Kufi','Sig Great Vibes',sans-serif}
.gen-tile-s{display:block;font-size:1.35rem;line-height:1.5;white-space:nowrap;color:var(--ink)}
.gen-img small{display:block;margin-top:.3rem;color:var(--muted,#666)}.gen-img-x{margin-top:.4rem}
.ce-sign{max-width:62mm}
.ce-mark{display:flex;align-items:flex-end;justify-content:center;width:100%;height:14mm;border-bottom:.35mm solid #000;overflow:visible}
.ce-sig-t{display:block;max-width:100%;white-space:nowrap;line-height:1.25;color:#1a2a4a;font-weight:400;padding-bottom:.6mm}
.ce-c-black .ce-sig-t{color:#111}
.ce-sig-img{display:block;max-width:100%;max-height:13mm;object-fit:contain;margin-bottom:-1mm}
.ce-sname{display:block;max-width:100%;font-size:11pt;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
.ce-sign small{max-width:100%;line-height:1.25;overflow-wrap:anywhere}
.ce-sign-date .ce-val{min-height:0;height:14mm;display:flex;align-items:flex-end;justify-content:center;box-sizing:border-box;padding-bottom:1mm}
.ce-foot{align-items:flex-start}.ce-foot-2{gap:5mm 12mm}
.ce-framed .ce-sign{min-width:36mm;max-width:44mm}.ce-framed .ce-foot-2{gap:2mm 6mm}
.ce-framed .ce-mark,.ce-framed .ce-sign-date .ce-val{height:10mm}.ce-framed .ce-sig-img{max-height:9.5mm}
.ce-framed .ce-sname{font-size:9.5pt}.ce-framed .ce-sign small{font-size:8.5pt}
