/* ============================================================
   FSA Cert Lookup — PSA-style cert page
   Tách hoàn toàn khỏi style.css của shop chính.
   ============================================================ */

[hidden] { display: none !important; }

:root {
    --bg:           #0A0604;
    --bg-2:         #14100A;
    --bg-3:         #1E1810;
    --bg-deep:      #050302;
    --text:         #F0DCC8;
    --text-soft:    #C9B79F;
    --text-muted:   #9C8A75;
    --text-dim:     #6B5C4A;
    --gold:         #D4A95C;
    --gold-bright:  #F2CB7C;
    --gold-deep:    #B58940;
    --ember:        #FF4500;
    --emerald:      #5FCB91;
    --emerald-soft: #2E7E55;
    --line:         rgba(212, 169, 92, 0.16);
    --line-strong:  rgba(212, 169, 92, 0.4);
    --glass:        rgba(14, 10, 6, 0.55);

    --font-display: 'Oswald', 'Be Vietnam Pro', sans-serif;
    --font-serif:   'Cormorant Garamond', 'Be Vietnam Pro', serif;
    --font-body:    'Manrope', 'Be Vietnam Pro', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, monospace;

    --container: min(1280px, 92vw);

    --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-snap: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at 20% 10%,  rgba(255, 69, 0, 0.045) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 90%, rgba(212, 169, 92, 0.04) 0%, transparent 60%);
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* GRAIN ================================================ */
.grain {
    position: fixed; inset: 0; pointer-events: none; z-index: 999;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.85  0 0 0 0 0.65  0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
    background-size: 240px 240px;
}

/* HEADER =============================================== */
.cert-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px clamp(20px, 4vw, 56px);
    background: linear-gradient(to bottom, rgba(10,6,4,0.85), rgba(10,6,4,0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.cert-brand {
    display: inline-flex; align-items: center; gap: 14px;
    text-decoration: none;
}
.cert-brand-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid var(--gold);
    border-radius: 2px;
    color: var(--gold);
    font-size: 16px;
    line-height: 1;
}
.cert-brand-stack { display: inline-flex; flex-direction: column; gap: 2px; }
.cert-brand-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text);
}
.cert-brand-name em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.04em;
    text-transform: lowercase;
    font-size: 16px;
}
.cert-brand-sub {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cert-back-link {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 18px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-soft);
    text-decoration: none;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    transition: color 220ms var(--ease-snap), border-color 220ms var(--ease-snap), background 220ms var(--ease-snap);
}
.cert-back-link:hover {
    color: var(--gold-bright);
    border-color: var(--gold);
    background: rgba(212,169,92,0.08);
}

/* SEARCH VIEW ========================================== */
.search-view {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 120px clamp(20px, 4vw, 56px) 80px;
    overflow: hidden;
}
.search-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255,69,0,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(212,169,92,0.08) 0%, transparent 60%);
}
.search-content {
    position: relative; z-index: 1;
    max-width: 880px;
    width: 100%;
    text-align: center;
}

.search-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--gold);
    padding: 8px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    margin-bottom: 36px;
    background: rgba(10,6,4,0.5);
    backdrop-filter: blur(8px);
}

.search-heading {
    font-family: var(--font-display);
    font-size: clamp(42px, 8vw, 96px);
    line-height: 1.02;
    font-weight: 600;
    letter-spacing: 0.005em;
    text-transform: uppercase;
    margin-bottom: 28px;
    display: flex; flex-direction: column; gap: 4px;
    align-items: center;
}
.search-heading span {
    background: linear-gradient(180deg, #FFEFCF 0%, var(--gold) 60%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.search-heading em {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(20px, 2.6vw, 32px);
    font-weight: 400;
    color: var(--text-soft);
    letter-spacing: 0.02em;
    text-transform: none;
    margin: 4px 0;
}

.search-subtitle {
    max-width: 540px;
    margin: 0 auto 44px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    opacity: 0.84;
}

.search-box {
    display: flex; align-items: stretch;
    max-width: 600px;
    margin: 0 auto 18px;
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 30px 80px -20px rgba(0,0,0,0.85),
        inset 0 1px 0 rgba(255,255,255,0.04);
    transition: border-color 240ms var(--ease-snap), box-shadow 240ms var(--ease-snap);
}
.search-box:focus-within {
    border-color: var(--gold);
    box-shadow:
        0 30px 80px -20px rgba(0,0,0,0.85),
        0 0 0 1px var(--gold),
        0 0 32px rgba(212,169,92,0.18);
}
.search-prefix {
    display: inline-flex; align-items: center;
    padding: 0 18px 0 22px;
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--gold);
    background: linear-gradient(180deg, rgba(212,169,92,0.06), transparent);
    border-right: 1px solid var(--line);
}
#serialInput {
    flex: 1;
    appearance: none;
    background: transparent;
    border: 0;
    outline: none;
    padding: 18px 16px;
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--text);
}
#serialInput::placeholder { color: var(--text-dim); }

.search-submit {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 0 28px;
    border: 0;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--bg);
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    transition: transform 240ms var(--ease-snap), box-shadow 240ms var(--ease-snap);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.search-submit:hover {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.35),
        0 0 32px rgba(212,169,92,0.4);
}
.search-submit svg { transition: transform 240ms var(--ease-snap); }
.search-submit:hover svg { transform: translateX(4px); }

.search-hint {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 24px;
    margin-bottom: 60px;
}
.hint-pill {
    appearance: none;
    background: rgba(212,169,92,0.06);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gold-bright);
    letter-spacing: 0.04em;
    transition: all 200ms var(--ease-snap);
}
.hint-pill:hover {
    background: rgba(212,169,92,0.14);
    border-color: var(--gold);
    color: var(--gold-bright);
}

.population-strip {
    display: inline-flex; align-items: stretch; gap: 0;
    padding: 22px 8px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.pop-stat {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 0 clamp(20px, 4vw, 44px);
}
.pop-num {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.2vw, 38px);
    font-weight: 600;
    color: var(--gold-bright);
    letter-spacing: 0.005em;
    line-height: 1;
}
.pop-lbl {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pop-divider {
    width: 1px;
    background: var(--line);
}

/* CERT VIEW ============================================ */
.cert-view {
    position: relative;
    padding: 110px clamp(20px, 4vw, 56px) 80px;
    min-height: 100vh;
}
.cert-bg {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255,69,0,0.06) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 80%, rgba(212,169,92,0.05) 0%, transparent 55%);
}

.cert-status-banner {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 14px;
    margin: 0 auto 36px;
    padding: 12px 22px;
    background: rgba(95, 203, 145, 0.08);
    border: 1px solid rgba(95, 203, 145, 0.32);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--emerald);
    max-width: var(--container);
}
.cert-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 12px var(--emerald);
    animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.15); opacity: 0.7; }
}
.cert-status-text { color: var(--emerald); }
.cert-status-meta {
    margin-left: auto;
    color: var(--text-muted);
    letter-spacing: 0.16em;
    font-weight: 500;
    text-transform: none;
    font-size: 12px;
    font-family: var(--font-mono);
}

.cert-grid {
    position: relative; z-index: 1;
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(40px, 5vw, 80px);
    align-items: start;
}

/* SLAB VISUAL =========================================== */
.cert-slab-col { position: sticky; top: 100px; }
.cert-slab {
    position: relative;
    background: linear-gradient(160deg, #1A140C 0%, #0E0907 100%);
    border-radius: 6px;
    padding: 18px;
    box-shadow:
        0 50px 100px -30px rgba(0,0,0,0.95),
        0 0 0 1px var(--line-strong),
        inset 0 1px 0 rgba(255,255,255,0.04);
    overflow: hidden;
    aspect-ratio: 3 / 4;
}
.cert-slab.is-flat {
    padding: 0;
    aspect-ratio: 2 / 3;
    background: transparent;
    border-radius: 20px;
    box-shadow:
        0 50px 100px -30px rgba(0,0,0,0.95),
        0 0 0 1px rgba(212,169,92,0.18);
}
.cert-flat-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 20px;
}
.cert-slab.is-flat .slab-frame,
.cert-slab.is-flat .slab-shine {
    display: none;
}
.slab-frame {
    position: relative; z-index: 2;
    background: var(--bg-deep);
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 14px 14px 18px;
    display: flex; flex-direction: column;
}
.slab-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
}
.slab-brand {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.32em;
    color: var(--gold);
}
.slab-grade-tag {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 56px; height: 56px;
    padding: 0 12px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
    color: var(--bg);
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    border-radius: 2px;
    box-shadow:
        0 8px 24px -6px rgba(212,169,92,0.5),
        inset 0 1px 0 rgba(255,255,255,0.4),
        inset 0 -1px 0 rgba(0,0,0,0.18);
}
.slab-window {
    flex: 1;
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    margin-bottom: 14px;
}
.slab-window img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.slab-footer {
    display: flex; flex-direction: column; gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.slab-serial {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--gold-bright);
}
.slab-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-soft);
    line-height: 1.4;
}
.slab-shine {
    position: absolute;
    top: -50%; left: -25%;
    width: 50%; height: 200%;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);
    pointer-events: none;
    z-index: 3;
    transform: rotate(8deg);
    animation: shine 6s ease-in-out infinite;
}
@keyframes shine {
    0%, 100% { transform: translateX(0) rotate(8deg); opacity: 0; }
    25%      { opacity: 1; }
    50%      { transform: translateX(280%) rotate(8deg); opacity: 0; }
}

.cert-share {
    display: flex; align-items: center; gap: 14px;
    margin-top: 24px;
    padding: 0 4px;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex; align-items: center; gap: 10px;
    appearance: none;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold-bright);
    border-radius: 2px;
    padding: 10px 18px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 220ms var(--ease-snap);
}
.share-btn:hover {
    background: var(--gold);
    color: var(--bg);
}
.cert-share-status {
    font-size: 12px;
    color: var(--emerald);
    font-weight: 500;
    opacity: 0;
    transition: opacity 220ms var(--ease-snap);
}
.cert-share-status.visible { opacity: 1; }

/* DETAIL PANEL ========================================= */
.cert-detail-col { display: flex; flex-direction: column; gap: 28px; }

.cert-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    display: flex; align-items: center; gap: 12px;
}
.cert-eyebrow .mono {
    color: var(--gold-bright);
    text-transform: none;
    letter-spacing: 0.04em;
    font-size: 12px;
}

.cert-card-name {
    font-family: var(--font-display);
    font-size: clamp(34px, 4.6vw, 60px);
    line-height: 1.06;
    font-weight: 600;
    letter-spacing: 0.005em;
    text-transform: uppercase;
    background: linear-gradient(180deg, var(--text) 0%, var(--text-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-top: -8px;
}
.cert-card-meta {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 17px;
    color: var(--text-soft);
    letter-spacing: 0.01em;
    flex-wrap: wrap;
}
.cert-card-meta .dot { color: var(--gold); font-style: normal; }

/* GRADE HEADLINE ======================================== */
.grade-headline {
    display: flex; flex-direction: column; gap: 14px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(212,169,92,0.06) 0%, rgba(255,69,0,0.04) 100%);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.grade-overall {
    display: flex; align-items: center; gap: 24px;
}
.grade-num {
    font-family: var(--font-display);
    font-size: clamp(80px, 10vw, 132px);
    font-weight: 700;
    line-height: 0.86;
    background: linear-gradient(180deg, #FFEFCF 0%, var(--gold) 50%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.01em;
}
.grade-divider {
    width: 1px;
    align-self: stretch;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    opacity: 0.5;
}
.grade-meta {
    display: flex; flex-direction: column; gap: 6px;
}
.grade-label {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gold-bright);
}
.grade-scale {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 15px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.grade-rarity-tag {
    align-self: flex-start;
    padding: 7px 14px;
    background: rgba(255,69,0,0.1);
    border: 1px solid rgba(255,69,0,0.4);
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #FF8B4D;
}

/* OWNERSHIP PASSPORT =================================== */
.ownership-passport,
.set-context,
.provenance-panel {
    padding: 24px 28px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background:
        linear-gradient(135deg, rgba(95,203,145,0.055) 0%, rgba(212,169,92,0.035) 50%, rgba(255,69,0,0.03) 100%),
        var(--bg-2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}
.passport-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.passport-kicker,
.set-kicker,
.panel-title {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}
.passport-main {
    display: grid;
    grid-template-columns: 1.4fr 1fr 0.7fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow: hidden;
}
.passport-main > div {
    display: flex; flex-direction: column; gap: 8px;
    padding: 16px 18px;
    background: rgba(5,3,2,0.62);
}
.passport-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.passport-main strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.35;
}
.passport-actions {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.passport-cta {
    appearance: none;
    border: 1px solid var(--gold);
    border-radius: 2px;
    background: linear-gradient(135deg, rgba(212,169,92,0.9), rgba(242,203,124,0.95));
    color: var(--bg);
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: transform 220ms var(--ease-snap), filter 220ms var(--ease-snap);
}
.passport-cta.secondary {
    background: transparent;
    color: var(--gold-bright);
}
.passport-cta:hover { transform: translateY(-1px); filter: brightness(1.07); }
.passport-note {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* SUB-GRADES =========================================== */
.subgrades {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow: hidden;
}
.subgrade {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 14px;
    padding: 18px 22px;
    background: var(--bg-2);
    align-items: center;
}
.sub-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.sub-value {
    grid-row: 1 / span 2;
    grid-column: 2;
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 600;
    color: var(--gold-bright);
    line-height: 1;
}
.sub-bar {
    grid-column: 1;
    width: 100%;
    height: 3px;
    background: rgba(212,169,92,0.1);
    border-radius: 999px;
    overflow: hidden;
}
.sub-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(to right, var(--gold-deep), var(--gold-bright));
    border-radius: inherit;
    width: 0;
    transition: width 1200ms var(--ease-soft);
}

/* SPECS GRID =========================================== */
.cert-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow: hidden;
}
.spec {
    display: flex; flex-direction: column; gap: 8px;
    padding: 16px 22px;
    background: var(--bg-2);
}
.spec-key {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.spec-val {
    font-size: 14px;
    color: var(--text);
    letter-spacing: 0.01em;
}
.spec-val.mono { font-family: var(--font-mono); color: var(--gold-bright); }
.cert-status-pill {
    display: inline-flex; align-self: flex-start;
    padding: 4px 10px;
    background: rgba(95,203,145,0.1);
    border: 1px solid rgba(95,203,145,0.4);
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--emerald);
    text-transform: uppercase;
}

/* SET CONTEXT ========================================== */
.set-context {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    align-items: center;
}
.set-copy h3 {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
}
.set-copy p {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gold-bright);
    letter-spacing: 0.04em;
}
.set-meter {
    display: flex; flex-direction: column; gap: 10px;
}
.set-meter-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-soft);
}
.set-meter-track {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(212,169,92,0.08);
    border: 1px solid rgba(212,169,92,0.12);
}
.set-meter-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(to right, var(--emerald-soft), var(--gold-bright));
    transition: width 1200ms var(--ease-soft);
}
.set-registry-btn {
    align-self: flex-start;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: rgba(212,169,92,0.055);
    color: var(--text-muted);
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: not-allowed;
}

/* POPULATION REPORT ===================================== */
.cert-pop {
    padding: 24px 28px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--bg-2);
}
.pop-headline {
    display: flex; justify-content: space-between; gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.cert-pop-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0;
}
.pop-disclaimer {
    max-width: 280px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-muted);
    text-align: right;
}
.rarity-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--line);
    margin-bottom: 18px;
}
.rarity-card {
    display: flex; flex-direction: column; gap: 6px;
    padding: 14px 16px;
    background: var(--bg-deep);
}
.rarity-card span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.rarity-card strong {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1;
    color: var(--gold-bright);
}
.pop-bars { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pop-bars li {
    display: grid;
    grid-template-columns: 90px 1fr 60px;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}
.pop-bar-label {
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: 0.04em;
}
.pop-bar-track {
    height: 6px;
    background: rgba(212,169,92,0.06);
    border-radius: 999px;
    overflow: hidden;
}
.pop-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(to right, var(--gold-deep), var(--gold-bright));
    border-radius: inherit;
}
.pop-bar-count {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gold-bright);
    text-align: right;
}

/* PROVENANCE TIMELINE ================================== */
.provenance-panel .panel-title { display: block; margin-bottom: 18px; }
.provenance-list {
    list-style: none;
    display: flex; flex-direction: column;
    gap: 0;
}
.provenance-list li {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 14px;
    position: relative;
    padding-bottom: 18px;
}
.provenance-list li:last-child { padding-bottom: 0; }
.provenance-list li::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--line-strong), transparent);
}
.provenance-list li:last-child::before { display: none; }
.timeline-marker {
    width: 11px; height: 11px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--gold-bright);
    box-shadow: 0 0 16px rgba(242,203,124,0.4);
}
.timeline-body { display: flex; flex-direction: column; gap: 4px; }
.timeline-top {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.timeline-top strong {
    color: var(--text);
    font-size: 14px;
    letter-spacing: 0.03em;
}
.timeline-top em {
    font-family: var(--font-mono);
    font-style: normal;
    color: var(--gold);
    font-size: 11px;
}
.timeline-note {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
}

/* VERIFY CHAIN ========================================= */
.cert-verify {
    display: flex; flex-direction: column; gap: 8px;
    padding: 18px 22px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 3px;
    border-left: 2px solid var(--gold);
}
.security-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    overflow: hidden;
    border-radius: 3px;
    border: 1px solid rgba(212,169,92,0.12);
    background: var(--line);
}
.security-grid span {
    display: flex; flex-direction: column; gap: 5px;
    background: rgba(20,16,10,0.76);
    padding: 12px 14px;
}
.security-grid strong {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.security-grid em {
    font-style: normal;
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.35;
}
.verify-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}
.verify-hash {
    font-size: 12px;
    color: var(--text-soft);
    word-break: break-all;
    letter-spacing: 0.02em;
}
.verify-meta {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    font-style: italic;
}

.cert-back-btn {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 12px;
    padding: 12px 22px;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-top: 8px;
    transition: all 220ms var(--ease-snap);
}
.cert-back-btn:hover {
    color: var(--gold-bright);
    border-color: var(--gold);
    background: rgba(212,169,92,0.06);
}

/* NOT FOUND ============================================ */
.notfound-view {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 120px clamp(20px, 4vw, 56px);
}
.notfound-content {
    text-align: center;
    max-width: 560px;
}
.notfound-code {
    font-family: var(--font-display);
    font-size: clamp(80px, 14vw, 168px);
    font-weight: 600;
    line-height: 0.9;
    color: rgba(212,169,92,0.18);
    letter-spacing: 0.005em;
    margin-bottom: 12px;
}
.notfound-heading {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text);
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}
.notfound-body {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.72;
    margin-bottom: 36px;
}
.notfound-body .mono { color: var(--gold-bright); }
.notfound-back {
    display: inline-flex; align-items: center;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: var(--bg);
    border: 0;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    transition: transform 240ms var(--ease-snap), box-shadow 240ms var(--ease-snap);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.notfound-back:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.35),
        0 12px 32px -6px rgba(242,203,124,0.4);
}

/* FOOTER ================================================ */
.cert-footer {
    padding: 56px clamp(20px, 4vw, 56px) 36px;
    border-top: 1px solid var(--line);
    text-align: center;
    background: linear-gradient(to bottom, var(--bg), var(--bg-deep));
    display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.cert-footer-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 16px;
    color: var(--gold-bright);
    font-weight: 500;
}
.cert-footer-meta {
    font-size: 12px;
    color: var(--text-dim);
    max-width: 540px;
    line-height: 1.55;
    letter-spacing: 0.02em;
}

/* RESPONSIVE ============================================ */
@media (max-width: 920px) {
    .cert-brand-sub { display: none; }
    .cert-back-link span { display: none; }
    .cert-grid { grid-template-columns: 1fr; gap: 36px; }
    .cert-slab-col { position: static; }
    .cert-slab { max-width: 360px; margin: 0 auto; }
    .cert-status-banner { width: 100%; flex-wrap: wrap; gap: 10px; }
    .cert-status-meta { margin-left: 0; width: 100%; }
    .subgrades { grid-template-columns: 1fr; }
    .cert-specs { grid-template-columns: 1fr; }
    .passport-main,
    .set-context,
    .rarity-strip,
    .security-grid { grid-template-columns: 1fr; }
    .pop-disclaimer { max-width: none; text-align: left; }
    .pop-bars li { grid-template-columns: 70px 1fr 50px; gap: 10px; }
    .grade-overall { gap: 16px; }
}
@media (max-width: 560px) {
    .search-heading { font-size: clamp(36px, 11vw, 56px); }
    .search-box { flex-wrap: wrap; }
    .search-prefix { padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); width: 100%; justify-content: center; }
    #serialInput { width: 100%; padding: 14px 16px; }
    .search-submit { width: 100%; padding: 16px; justify-content: center; }
    .population-strip { flex-direction: column; gap: 16px; padding: 18px; }
    .pop-divider { width: 80%; height: 1px; }
    .grade-headline { padding: 22px 20px; }
    .ownership-passport,
    .set-context,
    .cert-pop,
    .provenance-panel { padding: 20px; }
    .grade-overall { flex-direction: column; align-items: flex-start; gap: 14px; }
    .grade-divider { width: 60px; height: 1px; align-self: flex-start; }
    .passport-cta { width: 100%; justify-content: center; }
    .timeline-top { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
