/**
 * StrikePoint Batch Verification - Public /verify page styles
 *
 * Design tokens mirror /coa/ and /ambassadors/. Everything is scoped under
 * .sp-verify-container / .sp-verify-modal so nothing leaks into WoodMart or
 * Elementor globals.
 */

/* ═══════════════════════════════════════════════════════════
   TOKENS
   Declared on BOTH roots on purpose: the modal is a sibling of
   the container in the DOM, not a child, so properties set only
   on the container would never cascade into it.
   ═══════════════════════════════════════════════════════════ */
.sp-verify-container,
.sp-verify-modal {
    --sp-dark:         #1a2218;
    --sp-dark-2:       #243020;
    --sp-gold:         #8a6e2a;
    --sp-gold-bright:  #c7b37a;
    --sp-gold-muted:   rgba(138, 110, 42, 0.08);
    --sp-gold-border:  rgba(138, 110, 42, 0.25);
    --sp-offwhite:     #f0ebe0;
    --sp-surface:      #f4f3f0;
    --sp-text:         #1a1a14;
    --sp-text-muted:   #4a5244;
    --sp-text-dim:     #7a8474;
    --sp-border:       rgba(0, 0, 0, 0.09);
    --sp-pass:         #2d6e3a;
    --sp-pass-bg:      rgba(45, 110, 58, 0.08);
    --sp-pass-border:  rgba(45, 110, 58, 0.25);
    --sp-alert:        #8a3320;

    --sp-display: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    --sp-body:    'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.sp-verify-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 0 56px;
    font-family: var(--sp-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--sp-text);

    /* Hard viewport clamp — the WoodMart container can otherwise cause
       horizontal cutoff on mobile. */
    max-width: min(1000px, 100vw);
    overflow-x: hidden;
}

.sp-verify-container *,
.sp-verify-container *::before,
.sp-verify-container *::after { box-sizing: border-box; }

.sp-verify-container a:focus-visible,
.sp-verify-container button:focus-visible,
.sp-verify-container input:focus-visible,
.sp-verify-modal button:focus-visible,
.sp-verify-modal a:focus-visible {
    outline: 2px solid var(--sp-gold);
    outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */
.sp-verify-hero {
    background: var(--sp-dark);
    padding: 64px 8% 56px;
    position: relative;
    overflow: hidden;
    margin-bottom: 48px;
}

.sp-verify-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-conic-gradient(#1e2b1b 0% 25%, #111a0f 0% 50%) 0 0 / 48px 48px;
    opacity: 0.18;
}

.sp-verify-hero-inner {
    position: relative;
    max-width: 640px;
}

.sp-verify-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(199, 179, 122, 0.3);
    padding: 6px 13px 6px 10px;
    margin-bottom: 24px;
    color: var(--sp-gold-bright);
}

.sp-verify-hero-tag svg {
    display: block;
    width: 15px;
    height: 15px;
}

.sp-verify-hero-tag-label {
    font-family: var(--sp-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1;
}

.sp-verify-container .sp-verify-title {
    font-family: var(--sp-display);
    font-size: 66px;
    font-weight: 800;
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -1.5px;
    color: var(--sp-offwhite) !important;
    margin: 0 0 20px;
}

.sp-verify-container .sp-verify-title span {
    display: block;
    color: var(--sp-gold-bright);
}

.sp-verify-subtitle {
    font-size: 17px;
    line-height: 1.65;
    color: #8a9e86;
    max-width: 460px;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   "SEARCH FOR ANOTHER BATCH" LINK
   Shown when a result is displayed and the lookup panels collapse.
   Quiet text link, not a button.
   ═══════════════════════════════════════════════════════════ */
.sp-verify-expand-link {
    margin: 0 0 40px;
    padding: 0 8%;
    text-align: center;
}

.sp-verify-container .sp-verify-expand-trigger {
    display: inline-block;
    font-family: var(--sp-display);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sp-gold) !important;
    text-decoration: none;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--sp-gold-border);
    padding: 4px 2px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.sp-verify-container .sp-verify-expand-trigger:hover,
.sp-verify-container .sp-verify-expand-trigger:focus {
    color: #5a4818 !important;
    border-bottom-color: var(--sp-gold);
    background: transparent;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   LOOKUP PANELS
   Two routes to the same answer. The shared hairline (1px grid gap
   over a border-colored bed) reads as two panels of one system
   rather than two unrelated cards.
   ═══════════════════════════════════════════════════════════ */
.sp-verify-lookup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--sp-border);
    border: 1px solid var(--sp-border);
    margin: 0 8% 32px;
}

/* Native [hidden] is what the JS toggles. Belt-and-suspenders — some
   themes override display on [hidden]. */
.sp-verify-lookup-grid[hidden],
.sp-verify-expand-link[hidden] { display: none !important; }

.sp-verify-lookup-card {
    background: #fff;
    padding: 32px 30px 34px;
}

.sp-verify-container .sp-verify-lookup-title {
    font-family: var(--sp-display);
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.2px;
    line-height: 1.05;
    color: var(--sp-text) !important;
    margin: 0 0 10px;
}

.sp-verify-lookup-desc {
    font-size: 14px;
    line-height: 1.65;
    color: var(--sp-text-muted);
    margin: 0 0 24px;
}

/* ── FORM ── */
.sp-verify-form {
    display: flex;
    flex-direction: column;
}

.sp-verify-label {
    display: block;
    font-family: var(--sp-display);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--sp-text-dim);
    margin: 0 0 7px;
}

.sp-verify-container .sp-verify-input {
    width: 100%;
    padding: 13px 15px;
    background: #fff;
    border: 1px solid var(--sp-border);
    border-radius: 0;
    font-family: var(--sp-body);
    font-size: 15px;
    color: var(--sp-text);
    margin: 0 0 18px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.sp-verify-container .sp-verify-input::placeholder {
    color: var(--sp-text-dim);
    opacity: 1;
}

.sp-verify-container .sp-verify-input:focus {
    outline: none;
    border-color: var(--sp-gold);
    box-shadow: 0 0 0 3px var(--sp-gold-muted);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   Primary = dark green on light ground (matches the COA download
   button). Secondary = gold hairline outline.
   ═══════════════════════════════════════════════════════════ */
.sp-verify-container .sp-verify-button,
.sp-verify-container .sp-verify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 0;
    font-family: var(--sp-display);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sp-verify-container .sp-verify-button,
.sp-verify-container .sp-verify-btn-primary {
    margin-top: 6px;
    background: var(--sp-dark);
    border-color: var(--sp-dark);
    color: var(--sp-offwhite) !important;
}

.sp-verify-container .sp-verify-button:hover,
.sp-verify-container .sp-verify-button:focus,
.sp-verify-container .sp-verify-btn-primary:hover,
.sp-verify-container .sp-verify-btn-primary:focus {
    background: var(--sp-dark-2);
    border-color: var(--sp-dark-2);
    color: var(--sp-offwhite) !important;
    text-decoration: none;
}

.sp-verify-container .sp-verify-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sp-verify-container .sp-verify-btn-secondary {
    background: transparent;
    border-color: var(--sp-gold-border);
    color: var(--sp-gold) !important;
}

.sp-verify-container .sp-verify-btn-secondary:hover,
.sp-verify-container .sp-verify-btn-secondary:focus {
    background: var(--sp-gold-muted);
    border-color: var(--sp-gold);
    color: #5a4818 !important;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   STATUS LINE
   ═══════════════════════════════════════════════════════════ */
.sp-verify-status {
    padding: 0 8%;
    margin: 0 0 8px;
    min-height: 20px;
    text-align: center;
    font-family: var(--sp-display);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sp-text-dim);
}

.sp-verify-status[data-status-type="success"] { color: var(--sp-pass); }
.sp-verify-status[data-status-type="error"]   { color: var(--sp-alert); }

.sp-verify-status.is-loading::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 9px;
    vertical-align: -1px;
    border: 2px solid var(--sp-border);
    border-top-color: var(--sp-gold);
    border-radius: 50%;
    animation: sp-verify-spin 0.8s linear infinite;
}

@keyframes sp-verify-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   RESULT CARD
   The page's signature element: an issued record, not a UI card.
   Dark banner, hairline-ruled spec rows, purity set large.
   ═══════════════════════════════════════════════════════════ */
.sp-verify-results {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 0 8%;
    margin-top: 16px;
}

/* Wrapper for the ?batch= server-rendered auto-lookup result. Renders in
   place of the hero, so it carries its own top spacing. */
.sp-verify-auto-result {
    padding: 0 8%;
    margin: 44px 0 36px;
}

.sp-verify-card {
    background: #fff;
    border: 1px solid var(--sp-border);
}

.sp-verify-card-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 26px;
    background: var(--sp-dark);
    color: var(--sp-offwhite);
    font-family: var(--sp-display);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.sp-verify-card-label { display: inline-block; }

.sp-verify-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #6fae7a;
    border: 1px solid rgba(111, 174, 122, 0.4);
    background: rgba(45, 110, 58, 0.18);
}

.sp-verify-check-icon svg { width: 13px; height: 13px; }

.sp-verify-card-body { padding: 8px 26px 22px; }

.sp-verify-details {
    display: grid;
    grid-template-columns: 190px 1fr;
    margin: 0;
}

.sp-verify-container .sp-verify-details dt,
.sp-verify-container .sp-verify-details dd {
    margin: 0;
    padding: 13px 0;
    border-bottom: 1px solid var(--sp-border);
}

.sp-verify-container .sp-verify-details dt {
    font-family: var(--sp-display);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--sp-text-dim);
    padding-top: 16px;
}

.sp-verify-container .sp-verify-details dd {
    font-size: 15px;
    line-height: 1.45;
    color: var(--sp-text-muted);
}

.sp-verify-container .sp-verify-details dt:last-of-type,
.sp-verify-container .sp-verify-details dd:last-of-type { border-bottom: none; }

.sp-verify-details dd code {
    display: inline-block;
    padding: 3px 9px;
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--sp-text);
}

/* Purity is the number people came for — set it like a headline. */
.sp-verify-details dd strong {
    font-family: var(--sp-display);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.2px;
    color: var(--sp-pass);
}

.sp-verify-card-footer {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 20px 26px 24px;
    border-top: 1px solid var(--sp-border);
}

/* Both buttons share the row equally and fill the footer width. */
.sp-verify-container .sp-verify-card-footer .sp-verify-btn {
    flex: 1 1 0;
    min-width: 0;
    margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════
   NOT FOUND
   Gold-ruled note, same device as the compliance block on
   /ambassadors/. States what happened and what to do next.
   ═══════════════════════════════════════════════════════════ */
.sp-verify-not-found {
    background: var(--sp-gold-muted);
    border: 1px solid var(--sp-gold-border);
    border-left: 3px solid var(--sp-gold);
    padding: 26px 28px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.sp-verify-not-found-icon {
    flex-shrink: 0;
    color: var(--sp-gold);
    line-height: 0;
    margin-top: 1px;
}

.sp-verify-not-found-icon svg { width: 24px; height: 24px; }

.sp-verify-not-found-message {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--sp-text-muted);
}

.sp-verify-container .sp-verify-not-found-message a {
    color: var(--sp-gold) !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--sp-gold-border);
    transition: color 0.18s ease, border-color 0.18s ease;
}

.sp-verify-container .sp-verify-not-found-message a:hover {
    color: #5a4818 !important;
    border-bottom-color: var(--sp-gold);
}

.sp-verify-not-found-message code {
    padding: 2px 7px;
    background: #fff;
    border: 1px solid var(--sp-gold-border);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    color: var(--sp-text);
}

/* ═══════════════════════════════════════════════════════════
   RUO NOTE
   ═══════════════════════════════════════════════════════════ */
.sp-verify-ruo {
    margin: 44px 8% 0;
    padding-top: 20px;
    border-top: 1px solid var(--sp-border);
    text-align: center;
    font-size: 11px;
    line-height: 1.65;
    color: var(--sp-text-dim);
}

/* ═══════════════════════════════════════════════════════════
   COA MODAL
   ═══════════════════════════════════════════════════════════ */
.sp-verify-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: var(--sp-body);
}

.sp-verify-modal[hidden] { display: none; }

.sp-verify-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 10, 0.92);
    cursor: pointer;
}

.sp-verify-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    overflow: hidden;
}

.sp-verify-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    background: var(--sp-surface);
    border-bottom: 1px solid var(--sp-border);
    flex-shrink: 0;
}

.sp-verify-modal .sp-verify-modal-title {
    margin: 0;
    font-family: var(--sp-display);
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--sp-text) !important;
}

.sp-verify-modal-close {
    flex-shrink: 0;
    padding: 2px 6px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--sp-text-muted);
    cursor: pointer;
    transition: color 0.18s ease;
}

.sp-verify-modal-close:hover { color: var(--sp-text); }

.sp-verify-modal-body {
    flex: 1;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eceae5;
    overflow: auto;
}

.sp-verify-modal-body iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 60vh;
    border: none;
}

.sp-verify-modal-body img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    height: auto;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--sp-border);
}

.sp-verify-modal-body iframe[hidden],
.sp-verify-modal-body img[hidden] { display: none; }

.sp-verify-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 14px 22px;
    border-top: 1px solid var(--sp-border);
    flex-shrink: 0;
}

.sp-verify-modal .sp-verify-modal-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--sp-dark);
    border: 1px solid var(--sp-dark);
    color: var(--sp-offwhite) !important;
    font-family: var(--sp-display);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.sp-verify-modal .sp-verify-modal-download:hover {
    background: var(--sp-dark-2);
    border-color: var(--sp-dark-2);
    color: var(--sp-offwhite) !important;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .sp-verify-container .sp-verify-title { font-size: 52px; }
    .sp-verify-lookup-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .sp-verify-hero { padding: 48px 5% 44px; margin-bottom: 36px; }
    .sp-verify-container .sp-verify-title { font-size: 40px; letter-spacing: -1px; }
    .sp-verify-subtitle { font-size: 15px; }

    .sp-verify-lookup-grid,
    .sp-verify-results,
    .sp-verify-auto-result,
    .sp-verify-status,
    .sp-verify-expand-link { margin-left: 5%; margin-right: 5%; }

    .sp-verify-results,
    .sp-verify-auto-result,
    .sp-verify-status,
    .sp-verify-expand-link { padding-left: 0; padding-right: 0; }

    .sp-verify-ruo { margin-left: 5%; margin-right: 5%; }

    .sp-verify-lookup-card { padding: 26px 22px 28px; }
    .sp-verify-container .sp-verify-lookup-title { font-size: 21px; }

    .sp-verify-card-header { padding: 14px 20px; font-size: 13px; }
    .sp-verify-card-body { padding: 6px 20px 18px; }

    /* Spec rows stack: label above value. */
    .sp-verify-details { grid-template-columns: 1fr; }

    .sp-verify-container .sp-verify-details dt {
        padding: 16px 0 0;
        border-bottom: none;
    }
    .sp-verify-container .sp-verify-details dd { padding: 3px 0 14px; }
    .sp-verify-container .sp-verify-details dt:first-of-type { padding-top: 6px; }

    /* Buttons stay side-by-side per spec — tighten so both labels fit. */
    .sp-verify-card-footer { padding: 18px 20px 20px; gap: 8px; }
    .sp-verify-container .sp-verify-card-footer .sp-verify-btn {
        padding: 13px 8px;
        font-size: 13px;
        letter-spacing: 0.06em;
    }

    .sp-verify-not-found { padding: 22px 20px; gap: 13px; }
    .sp-verify-modal { padding: 12px; }
    .sp-verify-modal-content { max-height: 95vh; }
    .sp-verify-modal-body iframe { min-height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
    .sp-verify-container *,
    .sp-verify-modal * { transition: none !important; }
    .sp-verify-status.is-loading::before { animation-duration: 2s; }
}

/* ═══════════════════════════════════════════════════════════
   CERTIFICATE PAGE — /verify/{batch}/
   The permalink view for a single batch. Shares the tokens
   declared on .sp-verify-container above.
   ═══════════════════════════════════════════════════════════ */
.sp-cert { padding-bottom: 40px; }

/* ── HERO ── */
.sp-cert-hero {
    background: var(--sp-dark);
    padding: 40px 8% 32px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.sp-cert-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-conic-gradient(#1e2b1b 0% 25%, #111a0f 0% 50%) 0 0 / 48px 48px;
    opacity: 0.18;
}

.sp-cert-hero-inner { position: relative; }

.sp-cert-crumb {
    display: flex;
    gap: 7px;
    align-items: center;
    margin-bottom: 22px;
    font-family: var(--sp-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7a9e76;
}

.sp-verify-container .sp-cert-crumb a {
    color: #7a9e76 !important;
    text-decoration: none;
}
.sp-verify-container .sp-cert-crumb a:hover { color: var(--sp-gold-bright) !important; }

.sp-cert-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.sp-cert-eyebrow {
    font-family: var(--sp-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sp-gold-bright);
    margin-bottom: 8px;
}

.sp-verify-container .sp-cert-title {
    margin: 0;
    font-family: var(--sp-display);
    font-size: 54px;
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -1px;
    text-transform: uppercase;
    color: var(--sp-offwhite) !important;
}

.sp-cert-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border: 1px solid rgba(111, 174, 122, 0.35);
    background: rgba(45, 110, 58, 0.18);
    color: #6fae7a;
    font-family: var(--sp-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sp-cert-badge svg { width: 14px; height: 14px; }

.sp-cert-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    margin-top: 22px;
    font-family: var(--sp-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7a9e76;
}

.sp-cert-meta b {
    color: #c7d4c4;
    font-weight: 700;
    margin-left: 5px;
}

/* ── STAT BAND ── */
.sp-cert-stats {
    display: grid;
    grid-template-columns: repeat(var(--sp-cert-cols, 4), minmax(0, 1fr));
    gap: 1px;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid var(--sp-border);
}

.sp-cert-stat {
    background: #22301f;
    padding: 20px 8%;
}

/* Only the first cell keeps the page's outer gutter; the rest sit closer. */
.sp-cert-stat + .sp-cert-stat { padding-left: 26px; padding-right: 26px; }

.sp-cert-stat-label {
    font-family: var(--sp-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7a9e76;
    margin-bottom: 5px;
}

.sp-cert-stat-value {
    font-family: var(--sp-display);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.2px;
    color: var(--sp-offwhite);
}

.sp-cert-stat-value.is-hero {
    font-size: 40px;
    color: #6fae7a;
    letter-spacing: -0.8px;
}

/* ── PRODUCT LINKS ──
   One batch commonly backs several listings: the plain vial, a multi-vial
   kit, an alternate form. Rows rather than cards, because they're peers —
   nothing here should imply one is the canonical product. */
.sp-cert-products {
    margin: 0 8%;
    padding: 34px 0;
    border-bottom: 1px solid var(--sp-border);
}

.sp-cert-product-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--sp-border);
}

.sp-cert-product { margin: 0; }

.sp-verify-container .sp-cert-product-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--sp-border);
    text-decoration: none;
    color: inherit !important;
    transition: background 0.15s ease;
}

.sp-verify-container .sp-cert-product-link:hover,
.sp-verify-container .sp-cert-product-link:focus-visible {
    background: var(--sp-surface);
    text-decoration: none;
}

.sp-verify-container .sp-cert-product-img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border: 1px solid var(--sp-border);
    flex-shrink: 0;
    display: block;
}

.sp-cert-product-img--empty { background: var(--sp-surface); }

.sp-cert-product-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sp-cert-product-name {
    font-family: var(--sp-display);
    font-size: 19px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.1px;
    line-height: 1.15;
    color: var(--sp-text);
}

.sp-cert-product-sku {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 11.5px;
    color: var(--sp-text-dim);
}

.sp-cert-product-go {
    flex-shrink: 0;
    font-size: 18px;
    color: var(--sp-gold);
    transition: transform 0.15s ease;
}

.sp-verify-container .sp-cert-product-link:hover .sp-cert-product-go {
    transform: translateX(3px);
}

/* ── SECTIONS ── */
.sp-cert-section {
    margin: 0 8%;
    padding: 34px 0;
    border-bottom: 1px solid var(--sp-border);
}

.sp-verify-container .sp-cert-h2 {
    margin: 0 0 20px;
    font-family: var(--sp-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sp-gold) !important;
}

/* ── DEFINITION GRID ── */
.sp-cert-dl {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
}

.sp-cert-dl-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--sp-border);
}

.sp-verify-container .sp-cert-dl dt {
    margin: 0;
    font-family: var(--sp-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sp-text-dim);
    white-space: nowrap;
}

.sp-verify-container .sp-cert-dl dd {
    margin: 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--sp-text);
    text-align: right;
    word-break: break-word;
}

/* ── RESULTS TABLE ── */
.sp-verify-container .sp-cert-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

.sp-verify-container .sp-cert-table thead th {
    padding: 0 0 9px;
    border-bottom: 1px solid var(--sp-border);
    text-align: left;
    font-family: var(--sp-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sp-text-dim);
    background: none;
}

.sp-verify-container .sp-cert-table tbody th,
.sp-verify-container .sp-cert-table tbody td {
    padding: 14px 0;
    border-bottom: 1px solid var(--sp-border);
    text-align: left;
    background: none;
    vertical-align: middle;
}

.sp-verify-container .sp-cert-table tbody th {
    font-family: var(--sp-display);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--sp-text);
    width: 30%;
}

.sp-verify-container .sp-cert-table tbody td {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12.5px;
    color: var(--sp-text-muted);
}

.sp-cert-conforms {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid var(--sp-pass-border);
    background: var(--sp-pass-bg);
    color: var(--sp-pass);
    font-family: var(--sp-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sp-cert-note {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--sp-text-muted);
}

.sp-cert-note b { color: var(--sp-text); }

/* ── DOCUMENT ── */
.sp-cert-doc {
    background: #eceae5;
    border: 1px solid var(--sp-border);
    padding: 20px;
    text-align: center;
}

.sp-cert-doc img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--sp-border);
}

.sp-cert-doc-pdf {
    padding: 40px 20px;
    font-size: 14px;
    color: var(--sp-text-muted);
}

.sp-cert-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.sp-cert-foot {
    margin: 0 8%;
    padding: 28px 0 0;
    text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .sp-verify-container .sp-cert-title { font-size: 40px; }
    .sp-cert-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sp-cert-stat,
    .sp-cert-stat + .sp-cert-stat { padding-left: 8%; padding-right: 8%; }
    .sp-cert-dl { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .sp-cert-hero { padding: 32px 5% 26px; }
    .sp-verify-container .sp-cert-title { font-size: 31px; }

    .sp-cert-hero-top { flex-direction: column; gap: 14px; }

    .sp-cert-stat,
    .sp-cert-stat + .sp-cert-stat { padding: 16px 5%; }
    .sp-cert-stat-value { font-size: 21px; }
    .sp-cert-stat-value.is-hero { font-size: 32px; }

    .sp-cert-section,
    .sp-cert-products,
    .sp-cert-foot { margin-left: 5%; margin-right: 5%; }

    /* Label above value — the right-aligned two-column row gets too tight. */
    .sp-cert-dl-row { flex-direction: column; gap: 3px; align-items: flex-start; }
    .sp-verify-container .sp-cert-dl dd { text-align: left; }

    /* Table collapses to stacked records. */
    .sp-verify-container .sp-cert-table thead { display: none; }
    .sp-verify-container .sp-cert-table tbody tr {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--sp-border);
    }
    .sp-verify-container .sp-cert-table tbody th,
    .sp-verify-container .sp-cert-table tbody td {
        display: block;
        padding: 0;
        border: none;
    }
    .sp-verify-container .sp-cert-table tbody td { margin-top: 4px; }

    .sp-cert-actions .sp-verify-btn { width: 100%; justify-content: center; }
    .sp-cert-doc { padding: 12px; }
}

/* Admin-only diagnostic. Visible to logged-in administrators only; the
   product link is silent for everyone else, so a missing one needs a way
   to be explained rather than just absent. */
.sp-cert-admin-note {
    margin: 0 8%;
    padding: 14px 16px;
    border: 1px dashed var(--sp-gold-border);
    background: var(--sp-gold-muted);
    font-size: 13px;
    line-height: 1.6;
    color: var(--sp-text-muted);
}

.sp-cert-admin-note b { color: var(--sp-gold); }

.sp-cert-admin-note code {
    padding: 1px 6px;
    background: #fff;
    border: 1px solid var(--sp-gold-border);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.92em;
}

@media (max-width: 720px) {
    .sp-cert-admin-note { margin-left: 5%; margin-right: 5%; }
}

/* ═══════════════════════════════════════════════════════════
   TEST HISTORY
   The track record. One purity figure reports a batch; a run of
   them reports a standard. Set as a ledger — monospace lots,
   aligned figures, oldest included — because the value is in the
   consistency being auditable, not in any single row.
   ═══════════════════════════════════════════════════════════ */
.sp-cert-history-lead {
    margin: -6px 0 20px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--sp-text-muted);
    max-width: 62ch;
}

.sp-cert-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--sp-border);
}

.sp-cert-history-item { margin: 0; }

.sp-verify-container .sp-cert-history-row {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 13px 10px 13px 4px;
    border-bottom: 1px solid var(--sp-border);
    text-decoration: none;
    color: inherit !important;
    transition: background 0.15s ease;
}

.sp-verify-container a.sp-cert-history-row:hover,
.sp-verify-container a.sp-cert-history-row:focus-visible {
    background: var(--sp-surface);
    text-decoration: none;
}

/* Fixed width so the figures form a column — the point is comparing
   them down the page, which ragged alignment defeats. */
.sp-cert-history-purity {
    flex: 0 0 92px;
    font-family: var(--sp-display);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.2px;
    color: var(--sp-pass);
}

.sp-cert-history-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
}

.sp-cert-history-lot {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12.5px;
    color: var(--sp-text);
}

.sp-cert-history-date {
    font-size: 12.5px;
    color: var(--sp-text-dim);
}

.sp-cert-history-state {
    flex: 0 0 auto;
    font-family: var(--sp-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sp-cert-history-view { color: var(--sp-gold); }

.sp-cert-history-current {
    padding: 3px 9px;
    border: 1px solid var(--sp-gold-border);
    background: var(--sp-gold-muted);
    color: var(--sp-gold);
}

.sp-cert-history-item.is-current .sp-cert-history-row { background: var(--sp-gold-muted); }

@media (max-width: 720px) {
    .sp-verify-container .sp-cert-history-row {
        flex-wrap: wrap;
        gap: 4px 14px;
        padding: 14px 4px;
    }
    .sp-cert-history-purity { flex: 0 0 auto; font-size: 20px; }
    .sp-cert-history-state { flex: 0 0 auto; margin-left: auto; }
    /* Lot and date drop to their own line under the figure. */
    .sp-cert-history-meta { flex: 1 0 100%; order: 3; }
}

/* ═══════════════════════════════════════════════════════════
   CERTIFICATE LISTS
   Shared by search matches and the recently-issued strip.
   Same ledger treatment as test history: fixed purity column so
   the figures form a readable column.
   ═══════════════════════════════════════════════════════════ */
.sp-verify-cert-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--sp-border);
}

.sp-verify-cert-item { margin: 0; }

.sp-verify-container .sp-verify-cert-row {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding: 13px 8px 13px 4px;
    border-bottom: 1px solid var(--sp-border);
    text-decoration: none;
    color: inherit !important;
    transition: background 0.15s ease;
}

.sp-verify-container .sp-verify-cert-row:hover,
.sp-verify-container .sp-verify-cert-row:focus-visible {
    background: var(--sp-surface);
    text-decoration: none;
}

.sp-verify-cert-purity {
    flex: 0 0 84px;
    font-family: var(--sp-display);
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
    color: var(--sp-pass);
}

.sp-verify-cert-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 14px;
}

.sp-verify-cert-name {
    font-family: var(--sp-display);
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.1px;
    color: var(--sp-text);
}

.sp-verify-cert-batch {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    color: var(--sp-text-muted);
}

.sp-verify-cert-date { font-size: 12px; color: var(--sp-text-dim); }

.sp-verify-cert-go {
    flex: 0 0 auto;
    font-size: 17px;
    color: var(--sp-gold);
    transition: transform 0.15s ease;
}

.sp-verify-container .sp-verify-cert-row:hover .sp-verify-cert-go {
    transform: translateX(3px);
}

/* ── SEARCH MATCHES ── */
.sp-verify-matches {
    background: var(--sp-gold-muted);
    border: 1px solid var(--sp-gold-border);
    border-left: 3px solid var(--sp-gold);
    padding: 22px 24px;
}

.sp-verify-matches-lead {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--sp-text-muted);
}

.sp-verify-matches-lead b { color: var(--sp-text); }

.sp-verify-matches .sp-verify-cert-list { border-top-color: var(--sp-gold-border); }

.sp-verify-matches-note {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--sp-text-dim);
}

/* ── RECENTLY ISSUED ── */
.sp-verify-recent {
    margin: 48px 8% 0;
    padding-top: 28px;
    border-top: 1px solid var(--sp-border);
}

.sp-verify-container .sp-verify-recent-title {
    margin: 0 0 16px;
    font-family: var(--sp-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sp-gold) !important;
}

.sp-verify-recent-more { margin: 16px 0 0; }

.sp-verify-container .sp-verify-recent-more a {
    font-family: var(--sp-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sp-gold) !important;
    text-decoration: none;
    border-bottom: 1px solid var(--sp-gold-border);
}

.sp-verify-container .sp-verify-recent-more a:hover {
    color: #5a4818 !important;
    border-bottom-color: var(--sp-gold);
}

@media (max-width: 720px) {
    .sp-verify-recent { margin-left: 5%; margin-right: 5%; }
    .sp-verify-container .sp-verify-cert-row { flex-wrap: wrap; gap: 3px 12px; }
    .sp-verify-cert-purity { flex: 0 0 auto; font-size: 19px; }
    .sp-verify-cert-go { margin-left: auto; }
    .sp-verify-cert-meta { flex: 1 0 100%; order: 3; }
    .sp-verify-matches { padding: 18px 16px; }
}
