/* Product-page documents share the site's paper, mint and restrained typography. */
.certificate-section{background:#fff;overflow:hidden}
.certificate-section .section-heading{align-items:end}
.certificate-section .section-heading h2{max-width:17ch}
.certificate-carousel{min-width:0;width:100%;max-width:calc(3 * clamp(220px,23vw,340px) + 2 * clamp(18px,2vw,32px) + 4px);align-self:center}
.certificate-track{display:flex;gap:clamp(18px,2vw,32px);overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:0;scrollbar-width:thin;scrollbar-color:#9ec7bb #edf4ef;padding:8px 2px 18px;touch-action:pan-x pan-y pinch-zoom;cursor:grab}
.certificate-track.is-dragging{cursor:grabbing;scroll-snap-type:none;user-select:none}
.certificate-card{flex:0 0 clamp(220px,23vw,340px);min-width:0;scroll-snap-align:start}
.certificate-sheet{position:relative;display:block;width:100%;aspect-ratio:3/4;padding:14px;border:1px solid #d8e5de;border-radius:12px;background:#f1f6f3;overflow:hidden;cursor:zoom-in;color:#244f41}
.certificate-sheet img{display:block;width:100%;height:100%;object-fit:contain;background:white;-webkit-user-drag:none}
.certificate-sheet:focus-visible,.certificate-track:focus-visible,.certificate-actions button:focus-visible,.certificate-dialog button:focus-visible{outline:2px solid #32695d;outline-offset:4px}
.certificate-sample{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;font-size:clamp(13px,1.2vw,20px);font-weight:700;letter-spacing:.07em;color:#305f52b8;transform:rotate(-28deg);text-shadow:0 1px 2px white}
[data-document-status=document] .certificate-sample{display:none}
.certificate-enlarge{position:absolute;bottom:22px;right:22px;display:flex;align-items:center;gap:7px;padding:6px 10px;border-radius:4px;background:#fff;color:#244f41;font-size:11px;opacity:0;transition:opacity .2s}
.certificate-sheet:hover .certificate-enlarge,.certificate-sheet:focus-visible .certificate-enlarge{opacity:1}
.certificate-enlarge svg,.certificate-actions svg,.certificate-dialog svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.certificate-card h3{font-size:clamp(19px,1.5vw,27px);line-height:1.3;margin:18px 0 8px;letter-spacing:-.03em}
.certificate-card>p{font-size:clamp(13px,.95vw,18px);line-height:1.6;color:var(--muted,#5e7067);margin:0;max-width:36ch}
.certificate-source{display:inline-block;margin-top:8px;font-size:12px;color:#32695d;text-decoration:underline;text-underline-offset:4px}
.certificate-controls{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:14px}
.certificate-count{font-size:13px;color:#5e7067;margin:0}
.certificate-actions{display:flex;align-items:center;gap:8px}
.certificate-actions button{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:9px 12px;border:1px solid #d4e2da;border-radius:24px;background:#f8faf8;color:#285a4d;font:inherit;font-size:12px;cursor:pointer}
.certificate-actions button:disabled{opacity:.4;cursor:default}
.certificate-note{margin:20px 0 0;max-width:90ch;font-size:12px;line-height:1.6;color:#5e7067}
.certificate-dialog{width:min(1040px,94vw);max-width:94vw;max-height:94svh;padding:0;border:0;border-radius:12px;background:#f8faf8;color:#27322f;box-shadow:0 20px 80px #15392f40}
.certificate-dialog::backdrop{background:#17372dd6}
.certificate-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 20px;border-bottom:1px solid #dce8e1}
.certificate-dialog-head h2{font-size:18px;line-height:1.4;margin:0}
.certificate-dialog button{min-width:44px;min-height:44px;display:grid;place-items:center;padding:8px;border:1px solid #d4e2da;border-radius:24px;background:white;color:#285a4d;cursor:pointer}
.certificate-document{position:relative;display:grid;place-items:center;min-height:200px;padding:18px 64px;overflow:hidden}
.certificate-document>img{display:block;max-width:100%;max-height:calc(88svh - 140px);width:auto;height:auto;object-fit:contain;background:white}
.certificate-document .certificate-sample{font-size:clamp(22px,4vw,46px)}
.certificate-dialog-prev,.certificate-dialog-next{position:absolute;top:50%;translate:0 -50%}
.certificate-dialog-prev{left:12px}.certificate-dialog-next{right:12px}
.certificate-dialog-footer{display:flex;justify-content:space-between;gap:15px;padding:0 20px 16px;font-size:12px;color:#5e7067}
@media(max-width:900px){.certificate-section .section-heading{gap:18px}.certificate-section .section-heading h2{max-width:19ch}.certificate-card{flex-basis:76vw;max-width:340px}.certificate-card h3{font-size:21px}.certificate-card>p{font-size:14px}.certificate-enlarge{opacity:1}.certificate-controls{gap:12px}.certificate-note{font-size:12px}.certificate-dialog-head{padding:10px 14px}.certificate-dialog-head h2{font-size:16px}.certificate-document{padding:12px 48px}.certificate-dialog-prev{left:3px}.certificate-dialog-next{right:3px}.certificate-dialog-footer{padding:0 14px 12px}}
@media(prefers-reduced-motion:reduce){.certificate-enlarge{transition:none}.certificate-track{scroll-behavior:auto}}

/* Four complete documents share the desktop screen. Only a fifth overflows. */
@media(min-width:901px){
 .inner-page .certificate-section{height:calc(100svh - var(--top,112px));min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:clamp(10px,1.5svh,24px);padding:clamp(18px,2.5svh,48px) var(--g) clamp(14px,2svh,36px);scroll-snap-align:start}
 .certificate-section .section-heading{margin:0;gap:4vw}
 .certificate-section .section-heading h2{font-size:clamp(28px,3vw,64px);max-width:none;line-height:1.1}
 .certificate-section .section-heading>p{font-size:clamp(12px,.95vw,20px);line-height:1.5}
 .certificate-carousel{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:10px;max-width:none;min-height:0;height:100%;align-self:stretch}
 .certificate-track{--certificate-gap:clamp(16px,2vw,32px);gap:var(--certificate-gap);height:100%;min-height:0;padding:2px 2px 10px}
 .certificate-card{flex-basis:calc((100% - 3 * var(--certificate-gap)) / 4);height:100%;display:grid;grid-template-rows:minmax(0,1fr) auto auto auto;gap:6px}
 .certificate-sheet{width:auto;height:100%;min-width:0;min-height:0;max-width:100%;aspect-ratio:3/4;justify-self:center;padding:clamp(6px,.8vw,14px)}
 .certificate-card h3{font-size:clamp(16px,1.35vw,26px);line-height:1.2;margin:6px 0 0}
 .certificate-card>p{font-size:clamp(12px,.88vw,18px);line-height:1.45;max-width:none}
 .certificate-source{margin-top:0;font-size:clamp(11px,.7vw,13px)}
 .certificate-controls{margin:0}
 .certificate-note{margin:0;max-width:none;font-size:clamp(11px,.73vw,14px);line-height:1.4}
}
