/* The certificate as a document: used by the public certificate page and by the recruiter's preview.
   NIDSARK design language: paper and ink, Instrument Serif for the lines that matter, one burgundy accent,
   hairline rules, no gradients. Every size inside the document is relative to the document's own width (cqw),
   so it scales as one piece on any screen and fills the page in print. It is always ink on white paper,
   whatever theme the page around it uses. */

.cert-wrap { container-type: inline-size; width: min(100%, 1040px); margin: 0 auto; }
.cert-doc { position: relative; aspect-ratio: 11 / 8.5; background: #fff; color: #141414; padding: 7.5cqw 9.4cqw 7.4cqw; display: flex; flex-direction: column; font-size: 1.4cqw; line-height: 1.5; overflow: hidden; }
/* The engraved frame is an SVG with the document's own proportions (1100 x 850 units), so it scales with it. */
.cd-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cd-water { position: absolute; left: 50%; top: 46%; width: 34cqw; height: 34cqw; transform: translate(-50%, -50%); opacity: .026; pointer-events: none; }

.cd-top { position: relative; display: flex; flex-direction: column; align-items: center; gap: .55cqw; }
.cd-top img { width: 4.1cqw; height: 4.1cqw; }
.cd-top b { font: 700 1.45cqw/1 var(--sans); letter-spacing: .34em; padding-left: .34em; }
.cd-top span { font: 400 0.88cqw/1 var(--mono); color: rgba(0,0,0,.5); letter-spacing: .04em; }

.cd-main { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .42cqw; padding: .4cqw 0; }
.cd-eyebrow { font: 700 1.08cqw/1 var(--sans); letter-spacing: .42em; text-transform: uppercase; color: var(--acc); margin-bottom: 1cqw; padding-left: .42em; }
.cd-lead { font: 400 1.2cqw/1.4 var(--sans); color: rgba(0,0,0,.58); margin: 0; }
.cd-name { font: 400 5.8cqw/1.06 var(--serif); letter-spacing: -.015em; margin: .1cqw 0 .7cqw; padding: 0 3cqw .9cqw; border-bottom: 0.09cqw solid #141414; min-width: 44%; overflow-wrap: anywhere; }
.cd-name.long { font-size: 4.4cqw; }
.cd-cred { font: 400 2.9cqw/1.15 var(--serif); margin: .1cqw 0 0; display: flex; align-items: center; justify-content: center; gap: 1.2cqw; flex-wrap: wrap; }
.cd-cred.long { font-size: 2.45cqw; }
.cd-code { font: 600 1.2cqw/1 var(--mono); letter-spacing: .14em; color: var(--acc); border: 0.11cqw solid var(--acc); border-radius: .32cqw; padding: .48cqw .7cqw .42cqw .86cqw; }
.cd-track { font: italic 400 1.62cqw/1.3 var(--serif); color: rgba(0,0,0,.7); margin: 0; }
.cd-track span { color: var(--acc); }
.cd-desc { font: 400 1.02cqw/1.55 var(--sans); color: rgba(0,0,0,.6); max-width: 60cqw; margin: .6cqw 0 0; }

.cd-strip { position: relative; display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.15fr; margin: .8cqw 0 1.3cqw; border-top: 0.07cqw solid rgba(0,0,0,.34); border-bottom: 0.07cqw solid rgba(0,0,0,.34); }
.cd-strip div { padding: .85cqw .8cqw .8cqw; text-align: center; border-left: 0.07cqw solid rgba(0,0,0,.16); }
.cd-strip div:first-child { border-left: none; }
.cd-strip dt, .cd-sign .cap, .cd-verify span { font: 700 0.78cqw/1.2 var(--sans); letter-spacing: .15em; text-transform: uppercase; color: rgba(0,0,0,.46); }
.cd-strip dd { margin: .4cqw 0 0; font: 400 1.2cqw/1.2 var(--sans); }
.cd-strip dd.mono { font: 600 1.06cqw/1.36 var(--mono); letter-spacing: .02em; }

.cd-foot { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 3cqw; }
.cd-emblem { width: 13.2cqw; height: 13.2cqw; display: block; margin: -.6cqw 0 -.7cqw; }
.cd-signs { display: flex; justify-content: center; align-items: flex-end; gap: 4.2cqw; padding-bottom: .5cqw; }
.cd-sign { display: flex; flex-direction: column; align-items: center; gap: .5cqw; text-align: center; min-width: 17cqw; }
.cd-sign .sig { font: italic 400 2.2cqw/1.1 var(--serif); white-space: nowrap; }
.cd-sign .line { width: 100%; border-top: 0.08cqw solid #141414; }
.cd-verify { display: flex; flex-direction: column; align-items: center; gap: .55cqw; text-align: center; }
.cd-qr { width: 9.6cqw; height: 9.6cqw; display: block; }
.cd-stamp { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%) rotate(-13deg); font: 700 8.6cqw/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); border: 0.5cqw solid var(--acc); padding: 1.1cqw 2.6cqw 1.1cqw 3.6cqw; background: rgba(255,255,255,.86); }
.cert-doc.revoked .cd-name { text-decoration: line-through; text-decoration-color: var(--acc); text-decoration-thickness: 0.2cqw; }
