/* ==========================================================
   ANIMWEB TECHNOLOGIES — VERIFICATION SUITE
   1. Verification portal (search + trust content)
   2. Credential document (A4 paper stock, print-exact)
   3. Document shield layers (watermark / veil / latent)
   4. Print stylesheet
   5. Responsive rules
   ========================================================== */

/* ==========================================================
   1 · VERIFICATION PORTAL
   ========================================================== */

.verify-hero {
    position: relative;
    padding: calc(var(--header-height) + 72px) 0 56px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(30, 107, 255, 0.18), transparent 60%),
        radial-gradient(ellipse at 0% 100%, rgba(77, 142, 255, 0.1), transparent 60%);
}

.verify-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(transparent 0%, transparent calc(100% - 1px), rgba(77, 142, 255, 0.06) 100%),
        linear-gradient(90deg, transparent 0%, transparent calc(100% - 1px), rgba(77, 142, 255, 0.06) 100%);
    background-size: 60px 60px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.verify-hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 940px;
    margin: 0 auto;
}

.verify-shield-emblem {
    width: 92px;
    height: 92px;
    margin: 0 auto 26px;
    background: linear-gradient(145deg, var(--color-blue) 0%, var(--color-blue-deep) 100%);
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 2.3rem;
    box-shadow:
        0 20px 50px rgba(30, 107, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    position: relative;
}

.verify-shield-emblem::before {
    content: '';
    position: absolute;
    inset: -9px;
    border: 1px solid rgba(77, 142, 255, 0.35);
    border-radius: 32px;
}

.verify-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: var(--radius-pill);
    color: #4ade80;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.verify-pill .lock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 12px #22c55e;
    animation: pulse 2.4s infinite;
}

.verify-hero h1 {
    font-size: clamp(2.1rem, 5.6vw, 4.2rem);
    margin-bottom: 16px;
    line-height: 1.08;
}

.verify-hero > .container > .verify-hero-inner > p {
    font-size: clamp(0.98rem, 1.3vw, 1.14rem);
    max-width: 720px;
    margin: 0 auto 34px;
    line-height: 1.75;
}

/* ---------- Registry counters ---------- */
.registry-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 30px;
}

.registry-stats .rs {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.registry-stats .rs b {
    color: var(--color-white);
    font-family: var(--font-mono);
    font-size: 0.94rem;
}

/* ---------- Search portal card ---------- */
.verify-portal {
    max-width: 780px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(30, 107, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    text-align: left;
}

.verify-portal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-blue-light), transparent);
}

.verify-portal-head {
    text-align: center;
    margin-bottom: 24px;
}

.verify-portal-head h2 {
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    margin-bottom: 8px;
}

.verify-portal-head p {
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-field {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.search-field i.input-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: var(--color-blue-light);
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}

.search-input::placeholder { color: var(--color-text-dim); }

.search-input:focus {
    outline: none;
    border-color: var(--color-blue);
    background: rgba(30, 107, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(30, 107, 255, 0.15);
}

.search-btn {
    padding: 16px 28px;
    background: var(--gradient-primary);
    color: var(--color-white);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(30, 107, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-blue-light), var(--color-blue));
    opacity: 0;
    transition: opacity var(--transition);
}

.search-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(30, 107, 255, 0.55); }
.search-btn:hover::before { opacity: 1; }
.search-btn > * { position: relative; z-index: 1; }
.search-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.search-btn .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.search-btn.loading .spinner { display: inline-block; }
.search-btn.loading i { display: none; }

/* ---------- Batch filter ---------- */
.batch-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    align-items: center;
}

.batch-filter .bf-label {
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-dim);
    font-weight: 600;
    margin-right: 2px;
}

.batch-btn {
    padding: 7px 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-family: inherit;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.batch-btn:hover { border-color: var(--color-blue); color: var(--color-blue-light); }

.batch-btn.active {
    background: var(--color-blue-soft);
    border-color: var(--color-blue);
    color: var(--color-white);
}

/* ---------- Session meta ---------- */
.verify-meta-row {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: center;
    color: var(--color-text-dim);
    font-size: 0.78rem;
}

.verify-meta-row span { display: inline-flex; align-items: center; gap: 7px; }
.verify-meta-row i { color: var(--color-blue-light); }
.verify-meta-row b { color: var(--color-text-muted); font-family: var(--font-mono); font-weight: 500; }

/* ---------- Status messages ---------- */
.verify-status {
    margin-top: 22px;
    padding: 17px 20px;
    border-radius: var(--radius-md);
    display: none;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.92rem;
    line-height: 1.65;
    border: 1px solid;
    animation: fadeUp 0.35s ease;
}

.verify-status.show { display: flex; }

.verify-status .ic {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.verify-status.success { background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.4); color: #86efac; }
.verify-status.success .ic { background: #22c55e; color: #fff; }
.verify-status.success strong { color: #bbf7d0; }

.verify-status.error { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.verify-status.error .ic { background: #ef4444; color: #fff; }
.verify-status.error strong { color: #fecaca; }

.verify-status.scanning { background: rgba(30, 107, 255, 0.08); border-color: rgba(30, 107, 255, 0.4); color: var(--color-blue-light); }
.verify-status.scanning .ic { background: var(--color-blue); color: #fff; }
.verify-status.scanning strong { color: var(--color-white); }

/* Scan progress readout */
.scan-steps {
    margin-top: 10px;
    display: grid;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--color-text-dim);
}

.scan-steps span { display: flex; align-items: center; gap: 8px; opacity: 0.35; transition: opacity 0.25s; }
.scan-steps span.done { opacity: 1; color: #86efac; }
.scan-steps span.done::before { content: '\2713'; color: #22c55e; }
.scan-steps span::before { content: '\00B7'; width: 10px; display: inline-block; text-align: center; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Match results ---------- */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.match-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.match-card:hover {
    transform: translateX(5px);
    border-color: var(--color-blue);
    background: rgba(30, 107, 255, 0.06);
}

.match-card .avatar {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.match-card .info { flex: 1; min-width: 0; }
.match-card strong { color: var(--color-white); display: block; font-size: 0.96rem; }
.match-card .m-role { color: var(--color-text-muted); font-size: 0.8rem; display: block; }
.match-card small {
    color: var(--color-blue-light);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    display: block;
    word-break: break-all;
    margin-top: 2px;
}
.match-card .arrow { color: var(--color-blue-light); flex-shrink: 0; }

.match-card .m-badge {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    flex-shrink: 0;
}

/* ---------- Trust cards ---------- */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 52px;
}

.trust-card {
    padding: 30px 26px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.trust-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.5s var(--transition);
}

.trust-card:hover::before { width: 100%; }
.trust-card:hover { transform: translateY(-5px); border-color: var(--color-blue); background: rgba(30, 107, 255, 0.05); }

.trust-card .ic {
    width: 52px;
    height: 52px;
    background: var(--color-blue-soft);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-blue-light);
    font-size: 1.3rem;
    margin-bottom: 16px;
    transition: all var(--transition);
}

.trust-card:hover .ic { background: var(--gradient-primary); color: var(--color-white); border-color: transparent; }
.trust-card h4 { margin-bottom: 8px; font-size: 1.05rem; }
.trust-card p { color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.7; }
.trust-card p a { color: var(--color-blue-light); }

/* ---------- Quick-lookup strip ---------- */
.intern-strip {
    margin-top: 34px;
    padding: 24px;
    background: rgba(30, 107, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.intern-strip h3 {
    text-align: center;
    margin-bottom: 6px;
    font-size: 1rem;
    color: var(--color-text);
    font-weight: 600;
}

.intern-strip .strip-sub {
    text-align: center;
    color: var(--color-text-dim);
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.intern-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.intern-chip {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.intern-chip:hover {
    border-color: var(--color-blue);
    background: var(--color-blue-soft);
    color: var(--color-blue-light);
    transform: translateY(-2px);
}

/* ==========================================================
   2 · CREDENTIAL DOCUMENT — A4 PAPER STOCK
   The sheet is 794 × 1123 CSS px, which is exactly A4 at 96dpi.
   Screen scales it down with a transform; print renders it 1:1.
   ========================================================== */

.cert-stage {
    position: relative;
    min-height: 100vh;
    padding: calc(var(--header-height) + 42px) 0 70px;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(30, 107, 255, 0.15), transparent 50%),
        radial-gradient(ellipse at 70% 100%, rgba(77, 142, 255, 0.08), transparent 50%);
    overflow: hidden;
}

.cert-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(transparent 0%, transparent calc(100% - 1px), rgba(77, 142, 255, 0.04) 100%),
        linear-gradient(90deg, transparent 0%, transparent calc(100% - 1px), rgba(77, 142, 255, 0.04) 100%);
    background-size: 50px 50px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

.cert-shell { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }

.cert-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 0.88rem;
    transition: all var(--transition-fast);
}
.cert-back-link:hover { color: var(--color-blue-light); transform: translateX(-3px); }

/* ---------- Result banner ---------- */
.result-banner {
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    margin-bottom: 26px;
    animation: fadeUp 0.5s ease;
}

.result-banner.ok {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.13), rgba(34, 197, 94, 0.04));
    border: 1px solid rgba(34, 197, 94, 0.42);
    box-shadow: 0 12px 36px rgba(34, 197, 94, 0.12);
}

.result-banner.bad {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.13), rgba(239, 68, 68, 0.04));
    border: 1px solid rgba(239, 68, 68, 0.42);
    box-shadow: 0 12px 36px rgba(239, 68, 68, 0.12);
}

.result-banner .rb-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.result-banner.ok  .rb-mark { background: linear-gradient(135deg, #22c55e, #15803d); }
.result-banner.bad .rb-mark { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.result-banner .rb-text { flex: 1; min-width: 220px; }
.result-banner .rb-text h2 { font-size: 1.15rem; margin-bottom: 3px; }
.result-banner.ok  .rb-text h2 { color: #bbf7d0; }
.result-banner.bad .rb-text h2 { color: #fecaca; }
.result-banner .rb-text p { color: var(--color-text-muted); font-size: 0.86rem; margin: 0; line-height: 1.6; }

.result-banner .rb-time {
    text-align: right;
    color: var(--color-text-dim);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    line-height: 1.6;
}
.result-banner .rb-time strong { display: block; color: var(--color-white); font-size: 0.8rem; }

/* ---------- Toolbar ---------- */
.cert-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.cert-toolbar .tb-hint {
    color: var(--color-text-dim);
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cert-toolbar .tb-hint i { color: var(--color-blue-light); }

.cert-toolbar .tb-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.tb-btn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.84rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.tb-btn:hover { background: var(--color-blue-soft); border-color: var(--color-blue); color: var(--color-white); }

.tb-btn.primary {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--color-white);
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(30, 107, 255, 0.35);
}
.tb-btn.primary:hover { box-shadow: 0 10px 26px rgba(30, 107, 255, 0.5); transform: translateY(-2px); }

/* ---------- The sheet ---------- */
/* The sheet keeps its true 794px width and is scaled to fit the viewport.
   `.paper-wrap` is given the resulting height by script so the page still
   flows correctly underneath it. */
.paper-wrap {
    position: relative;
    width: 100%;
    min-height: 1123px;
    margin-bottom: 26px;
}

.paper-scale {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 794px;
    margin: 0 auto;
    transform-origin: top center;
    transform: scale(var(--paper-fit, 1));
}

.cert-paper {
    --ink:        #0a1330;
    --ink-soft:   #47536f;
    --ink-faint:  #8a94ab;
    --rule:       #c4cfe6;
    --rule-soft:  #e2e8f4;
    --brand:      #12439e;
    --brand-lite: #1e6bff;
    --gold:       #9d7a28;
    --gold-lite:  #c9a44a;
    --paper:      #fffefa;

    position: relative;
    width: 794px;
    height: 1123px;
    background: var(--paper);
    color: var(--ink);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.25);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

/* Paper fibre / tint */
.cert-paper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 8%,  rgba(18, 67, 158, 0.045), transparent 45%),
        radial-gradient(ellipse at 88% 92%, rgba(157, 122, 40, 0.05), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

/* Guilloché rosette watermark (injected SVG) */
.p-rosette {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 470px;
    height: 470px;
    transform: translate(-50%, -50%);
    opacity: 0.058;
    pointer-events: none;
    z-index: 0;
}
.p-rosette svg { width: 100%; height: 100%; display: block; }

/* Decorative frame */
.p-frame {
    position: absolute;
    inset: 22px;
    border: 2px solid var(--brand);
    pointer-events: none;
    z-index: 1;
}
.p-frame::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px solid var(--gold);
}
.p-frame::after {
    content: '';
    position: absolute;
    inset: 9px;
    border: 0.5px solid var(--rule);
}

/* Guilloché ribbon inside the top & bottom frame rails */
.p-ribbon {
    position: absolute;
    left: 32px;
    right: 32px;
    height: 12px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.p-ribbon.top { top: 33px; }
.p-ribbon.bottom { bottom: 33px; }
.p-ribbon svg { width: 100%; height: 100%; display: block; }

/* Corner ornaments */
.p-corner {
    position: absolute;
    width: 46px;
    height: 46px;
    border-color: var(--gold);
    border-style: solid;
    border-width: 0;
    z-index: 2;
    pointer-events: none;
}
.p-corner.tl { top: 40px; left: 40px;   border-top-width: 3px; border-left-width: 3px; }
.p-corner.tr { top: 40px; right: 40px;  border-top-width: 3px; border-right-width: 3px; }
.p-corner.bl { bottom: 40px; left: 40px;  border-bottom-width: 3px; border-left-width: 3px; }
.p-corner.br { bottom: 40px; right: 40px; border-bottom-width: 3px; border-right-width: 3px; }

/* ---------- Sheet content ---------- */
/* Padding is in px on purpose: 794px is exactly A4 at 96dpi, so the same
   values lay out identically on screen and on paper. Do not convert to mm. */
.p-content {
    position: relative;
    z-index: 4;
    height: 100%;
    padding: 54px 62px 64px;
    display: flex;
    flex-direction: column;
}

/* Header */
.p-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid var(--brand);
}

.p-head .p-logo {
    width: 62px;
    height: 62px;
    object-fit: contain;
    flex-shrink: 0;
}

.p-head .p-org { flex: 1; min-width: 0; }

.p-head .p-org h1 {
    font-family: var(--font-display);
    font-size: 1.62rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--brand);
    line-height: 1.15;
    margin: 0 0 2px;
}

.p-head .p-org .p-sub {
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 4px;
}

.p-head .p-org .p-addr {
    font-size: 0.63rem;
    color: var(--ink-soft);
    line-height: 1.55;
}

.p-head .p-idblock {
    text-align: right;
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--ink-soft);
    line-height: 1.7;
}
.p-head .p-idblock b { display: block; color: var(--ink); font-size: 0.66rem; letter-spacing: 0.02em; }
.p-head .p-idblock .p-idlabel {
    font-family: var(--font-body);
    font-size: 0.53rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 600;
}

/* Title */
.p-title { text-align: center; margin: 22px 0 4px; }

.p-title .p-kicker {
    font-size: 0.6rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 9px;
}

.p-title h2 {
    font-family: var(--font-display);
    font-size: 2.15rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink);
    line-height: 1.1;
    margin: 0;
}

.p-title .p-rule {
    width: 176px;
    height: 3px;
    margin: 13px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold-lite) 18%, var(--gold) 50%, var(--gold-lite) 82%, transparent);
    position: relative;
}
.p-title .p-rule::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    background: var(--gold);
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Recipient */
.p-award { text-align: center; margin-top: 20px; }

.p-award .p-certifies {
    font-size: 0.82rem;
    color: var(--ink-soft);
    font-style: italic;
    letter-spacing: 0.03em;
}

.p-award .p-name {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 2.65rem;
    font-weight: 700;
    color: var(--brand);
    line-height: 1.16;
    margin: 8px 0 6px;
    letter-spacing: 0.005em;
    word-break: break-word;
}

.p-award .p-nameline {
    width: 62%;
    max-width: 430px;
    height: 1px;
    margin: 0 auto 10px;
    background: linear-gradient(90deg, transparent, var(--rule) 20%, var(--rule) 80%, transparent);
}

.p-award .p-role {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    padding: 5px 16px;
    border: 1px solid var(--gold-lite);
    border-radius: 2px;
}

/* Statement */
.p-statement {
    margin: 16px 6px 0;
    text-align: center;
    font-size: 0.845rem;
    line-height: 1.78;
    color: var(--ink-soft);
}
.p-statement b { color: var(--ink); font-weight: 600; }

/* Detail table */
.p-details {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
}

.p-details .pd {
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 9px 14px;
    min-width: 0;
}

.p-details .pd .pl {
    font-size: 0.55rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 700;
    margin-bottom: 3px;
}

.p-details .pd .pv {
    font-size: 0.79rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    word-break: break-word;
}

.p-details .pd.wide { grid-column: 1 / -1; }
.p-details .pd .pv.mono { font-family: var(--font-mono); font-size: 0.73rem; color: var(--brand); letter-spacing: 0.01em; }

/* Skills */
.p-skills { margin-top: 14px; }

.p-skills .ps-title {
    font-size: 0.56rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.p-skills .ps-title::after { content: ''; flex: 1; height: 1px; background: var(--rule-soft); }

.p-skills .ps-chips { display: flex; flex-wrap: wrap; gap: 5px; }

.p-skills .ps-chip {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--brand);
    background: rgba(18, 67, 158, 0.06);
    border: 1px solid rgba(18, 67, 158, 0.2);
    padding: 4px 10px;
    border-radius: 2px;
}

/* Footer: signature | seal | QR */
.p-foot {
    margin-top: auto;
    padding-top: 14px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 22px;
    align-items: flex-end;
}

.p-sign { min-width: 0; }

.p-sign .p-sigbox {
    position: relative;
    height: 74px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 4px;
}

/* The signature canvas — tinted + session-stamped at paint time */
.p-sign canvas.p-sigmark {
    height: 72px;
    width: auto;
    max-width: 260px;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

/* Transparent shield: intercepts save-image / long-press on the signature */
.p-sign .p-sigguard {
    position: absolute;
    inset: -6px;
    z-index: 3;
    background: transparent;
}

.p-sign .p-sigline { border-top: 1.5px solid var(--ink); padding-top: 5px; max-width: 268px; }
.p-sign .p-signer { font-size: 0.8rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.p-sign .p-signer-title { font-size: 0.63rem; color: var(--ink-soft); line-height: 1.45; }
.p-sign .p-signer-org { font-size: 0.6rem; color: var(--gold); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 1px; }

/* Seal */
.p-seal { width: 132px; height: 132px; flex-shrink: 0; position: relative; }
.p-seal svg { width: 100%; height: 100%; display: block; }

/* QR */
.p-qr { text-align: center; flex-shrink: 0; }
.p-qr canvas { width: 96px; height: 96px; display: block; border: 1px solid var(--rule); background: #fff; }
.p-qr .p-qr-cap {
    font-size: 0.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 700;
    margin-top: 5px;
    line-height: 1.4;
}

/* Security strip */
.p-security {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
}

.p-security .p-hash {
    font-family: var(--font-mono);
    font-size: 0.545rem;
    color: var(--ink-soft);
    line-height: 1.65;
    word-break: break-all;
    min-width: 0;
}
.p-security .p-hash b { color: var(--ink); }
.p-security .p-hash .p-hlabel {
    font-family: var(--font-body);
    font-size: 0.5rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 700;
}

.p-security .p-verifyurl {
    text-align: right;
    font-size: 0.55rem;
    color: var(--ink-soft);
    line-height: 1.6;
    flex-shrink: 0;
}
.p-security .p-verifyurl b { color: var(--brand); font-family: var(--font-mono); }

/* Microtext line — a solid rule to the eye, readable under magnification */
/* Sits in the clear band between the content box and the lower guilloché
   rail — a solid hairline to the eye, readable under magnification. */
.p-microtext {
    position: absolute;
    left: 62px;
    right: 62px;
    bottom: 50px;
    font-size: 2.1px;
    letter-spacing: 0.32px;
    color: var(--brand);
    white-space: nowrap;
    overflow: hidden;
    opacity: 0.72;
    z-index: 3;
    pointer-events: none;
    user-select: none;
}

/* ---------- Verification detail panel (screen only) ---------- */
.verify-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.vd-card {
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.vd-card .vd-l {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-dim);
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.vd-card .vd-l i { color: var(--color-blue-light); }

.vd-card .vd-v {
    color: var(--color-white);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}
.vd-card .vd-v.mono { font-family: var(--font-mono); font-size: 0.76rem; color: var(--color-blue-light); }
.vd-card .vd-v.ok { color: #4ade80; }

/* Checks list */
.check-list {
    display: grid;
    gap: 9px;
    padding: 18px 20px;
    background: rgba(34, 197, 94, 0.04);
    border: 1px solid rgba(34, 197, 94, 0.22);
    border-radius: var(--radius-md);
    margin-bottom: 22px;
}

.check-list h4 {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 700;
    margin-bottom: 3px;
}

.check-list .ck {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.check-list .ck i { color: #22c55e; margin-top: 3px; flex-shrink: 0; }
.check-list .ck b { color: var(--color-text); font-weight: 600; }

/* Not-found state */
.notfound-card {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 34px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: var(--radius-xl);
}

.notfound-card .nf-ic {
    width: 74px;
    height: 74px;
    margin: 0 auto 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.06));
    border: 1px solid rgba(239, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fca5a5;
    font-size: 1.9rem;
}

.notfound-card h2 { font-size: 1.5rem; margin-bottom: 10px; }
.notfound-card p { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 8px; line-height: 1.75; }
.notfound-card .nf-query {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin: 8px 0 18px;
    word-break: break-all;
}
.notfound-card .nf-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ==========================================================
   3 · DOCUMENT SHIELD LAYERS
   ========================================================== */

/* Selection lock on shielded pages (form fields stay usable) */
html.awt-shielded body {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
html.awt-shielded input,
html.awt-shielded textarea,
html.awt-shielded [data-allow-select] {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
}
html.awt-shielded img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }

/* Traceable, tiled session watermark */
.awt-wm {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0.038;
    background-repeat: repeat;
    background-position: center;
    mix-blend-mode: multiply;
}

/* Anti-camera moiré: near-invisible on screen, beats against a sensor grid */
.awt-moire {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0.5;
    background-image: repeating-linear-gradient(
        22.5deg,
        rgba(10, 19, 48, 0.035) 0px,
        rgba(10, 19, 48, 0.035) 1px,
        transparent 1px,
        transparent 2.5px
    );
}

/* Latent image — averages out on screen, separates under a camera/copier */
/* Latent image, after the security-printing technique: the lettering and the
   field around it are screened at DIFFERENT line frequencies but the SAME
   average density. The eye integrates both to one flat tone; a camera sensor
   or a photocopier resamples the two frequencies differently and the wording
   separates out. Keeping the two averages equal is what makes it work —
   change one alpha and you must change the other. */
.awt-latent {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.05;
    display: flex;
    align-items: center;
    justify-content: center;
}

.awt-latent::before {
    content: attr(data-text) attr(data-text) attr(data-text) attr(data-text)
             attr(data-text) attr(data-text) attr(data-text) attr(data-text);
    display: block;
    width: 175%;
    font-family: var(--font-display), sans-serif;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 0.2em;
    line-height: 2.5;
    text-align: center;
    transform: rotate(-30deg);
    word-spacing: 0.35em;
    /* 2px screen · 1px on at 0.60 → average density 0.30 */
    background-image: repeating-linear-gradient(
        0deg,
        rgba(10, 19, 48, 0.6) 0px,
        rgba(10, 19, 48, 0.6) 1px,
        transparent 1px,
        transparent 2px
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.awt-latent::after {
    /* 3px screen · 1px on at 0.90 → average density 0.30, the same tone */
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        0deg,
        rgba(10, 19, 48, 0.9) 0px,
        rgba(10, 19, 48, 0.9) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: multiply;
}

/* Focus-loss / devtools veil */
.awt-veil {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(5, 10, 20, 0.86);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

html.awt-obscured .awt-veil { display: flex; }

html.awt-obscured [data-protect],
html.awt-obscured .verify-detail,
html.awt-obscured .check-list {
    filter: blur(18px) saturate(0.4);
    pointer-events: none;
}

.awt-veil-card {
    max-width: 430px;
    text-align: center;
    padding: 36px 30px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.awt-veil-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 12px 30px rgba(30, 107, 255, 0.4);
}

.awt-veil-card h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--color-white); }
.awt-veil-card p { color: var(--color-text-muted); font-size: 0.88rem; line-height: 1.65; margin: 0; }
.awt-veil-ref {
    margin-top: 14px !important;
    font-family: var(--font-mono);
    font-size: 0.72rem !important;
    color: var(--color-text-dim) !important;
    letter-spacing: 0.06em;
}

/* Toast */
.awt-toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 20px);
    z-index: 9999;
    max-width: min(92vw, 460px);
    padding: 12px 20px;
    background: rgba(10, 16, 36, 0.96);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    color: var(--color-text);
    font-size: 0.83rem;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}
.awt-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================
   4 · PRINT — the sheet, exactly A4, nothing else
   ========================================================== */

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    /* Nothing but the sheet survives */
    .site-header,
    .site-footer,
    .cert-back-link,
    .cert-toolbar,
    .result-banner,
    .verify-detail,
    .check-list,
    .back-to-top,
    .page-transition,
    .awt-veil,
    .awt-toast,
    .print-note,
    .notfound-card .nf-actions {
        display: none !important;
    }

    html, body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    html::before, body::before, body::after { display: none !important; content: none !important; }

    html.page-loading, html.page-loaded { opacity: 1 !important; }

    /* Never let the shield hide the page mid-print */
    html.awt-obscured [data-protect],
    html.awt-obscured .verify-detail { filter: none !important; }

    .cert-stage {
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
    .cert-stage::before { display: none !important; }

    .cert-shell, .container {
        max-width: none !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .paper-wrap {
        display: block !important;
        position: static !important;
        margin: 0 !important;
        min-height: 0 !important;
        height: auto !important;
    }

    .paper-scale {
        position: static !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
    }

    .cert-paper {
        width: 210mm !important;
        height: 296.5mm !important;   /* a hair under A4 so no blank 2nd page */
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
        overflow: hidden !important;
        page-break-inside: avoid;
        break-inside: avoid;
        page-break-after: avoid;
    }

    /* Backgrounds, rules, seal and watermark must actually reach the paper */
    .cert-paper,
    .cert-paper * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* A printed copy stays traceable, but the watermark must never compete
       with the document itself — this is the holder's usable certificate. */
    .awt-wm { opacity: 0.042 !important; }
    .awt-moire { opacity: 0.2 !important; }

    /* The latent "COPY / VOID" layer is a screen-capture deterrent only.
       It must never surface on a legitimate printed certificate. */
    .awt-latent { display: none !important; }

    a[href]::after { content: none !important; }
}

/* ==========================================================
   5 · RESPONSIVE
   ========================================================== */

@media (max-width: 1024px) {
    .cert-shell { max-width: 100%; }
}

@media (max-width: 860px) {
    .cert-toolbar { flex-direction: column; align-items: stretch; }
    .cert-toolbar .tb-actions { justify-content: stretch; }
    .cert-toolbar .tb-btn { flex: 1; justify-content: center; }
}

@media (max-width: 768px) {
    .verify-hero { padding: calc(var(--header-height-mobile) + 56px) 0 44px; }
    .verify-portal { padding: 1.35rem; }
    .search-form { flex-direction: column; }
    .search-btn { width: 100%; }
    .verify-meta-row { justify-content: flex-start; font-size: 0.72rem; }
    .result-banner { padding: 15px 16px; }
    .result-banner .rb-time { text-align: left; width: 100%; }
    .cert-stage { padding: calc(var(--header-height-mobile) + 30px) 0 54px; }
    .match-card { padding: 13px 14px; gap: 12px; }
    .match-card .avatar { width: 38px; height: 38px; font-size: 0.82rem; }
    .awt-veil-card { padding: 28px 22px; }
}

@media (max-width: 520px) {
    .registry-stats .rs { font-size: 0.74rem; padding: 8px 14px; }
    .batch-filter { gap: 6px; }
    .batch-btn { font-size: 0.72rem; padding: 6px 12px; }
    .match-card .m-badge { display: none; }
    .notfound-card { padding: 30px 20px; }
    .trust-grid { grid-template-columns: 1fr; }
}

/* Users who ask for reduced motion get none of the decorative animation */
@media (prefers-reduced-motion: reduce) {
    .verify-pill .lock-dot,
    .search-btn .spinner { animation: none !important; }
    .result-banner, .verify-status { animation: none !important; }
    .match-card:hover, .trust-card:hover, .tb-btn.primary:hover { transform: none; }
}

/* High-contrast / forced colors */
@media (forced-colors: active) {
    .cert-paper { border: 1px solid CanvasText; }
    .awt-wm, .awt-moire, .awt-latent { display: none; }
}
