*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.5;
    margin: 0;
    padding: 20px;
}

/* ── Layout ─────────────────────────────────────── */

.cert-container {
    max-width: 850px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
}

.cert-footer {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 20px;
    font-size: 12px;
    color: #9ca3af;
}

/* ── Header ─────────────────────────────────────── */

.cert-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.cert-header h1 {
    font-size: 24px;
    margin: 0 0 10px;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cert-header .cert-code {
    font-family: monospace;
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* ── Status Badge ────────────────────────────────── */

.cert-status {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 14px;
    margin-top: 15px;
}

.cert-status--issued   { background-color: #dcfce7; color: #166534; }
.cert-status--revoked  { background-color: #fee2e2; color: #991b1b; }
.cert-status--default  { background-color: #f3f4f6; color: #374151; }

/* ── Artwork ─────────────────────────────────────── */

.cert-artwork {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .cert-artwork { flex-direction: row; }
}

.cert-artwork__image {
    flex: 1;
    text-align: center;
}

.cert-artwork__image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,.1);
}

.cert-artwork__image--placeholder {
    background: #f3f4f6;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    border-radius: 8px;
}

.cert-artwork__info { flex: 1.5; }

/* ── Info Grid ───────────────────────────────────── */

.cert-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.cert-info-item {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
}

.cert-info-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 2px;
}

.cert-info-value {
    font-size: 15px;
    color: #111827;
}

/* ── Legal Statement ─────────────────────────────── */

.cert-legal {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #cbd5e1;
}

.cert-legal p {
    margin: 0;
    font-style: italic;
    color: #475569;
    font-size: 14px;
}

/* ── Exhibitions ─────────────────────────────────── */

.cert-exhibitions {
    margin-top: 40px;
}

.cert-exhibitions__header {
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e5e7eb;
}

.cert-exhibition-item {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #f3f4f6;
    padding: 12px 0;
}

.cert-exhibition-item__year {
    font-weight: 700;
    color: #6b7280;
    width: 60px;
    flex-shrink: 0;
}

.cert-exhibition-item__title {
    font-weight: 600;
    color: #111827;
}

.cert-exhibition-item__location {
    font-size: 13px;
    color: #6b7280;
}

/* ── Issuer Footer ───────────────────────────────── */

.cert-issuer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-end;
}

.cert-issuer__details { font-size: 14px; }

.cert-issuer__name { font-weight: 700; color: #111827; }

.cert-issuer__role {
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
}

.cert-issuer__website {
    color: #3b82f6;
    text-decoration: none;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

/* ── Actions ─────────────────────────────────────── */

.cert-actions {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.cert-actions__hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

.cert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background-color: #111827;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s;
}

.cert-btn:hover { background-color: #374151; }

.cert-btn svg { width: 20px; height: 20px; }

/* ── Superseded Notice ───────────────────────────── */

.cert-superseded {
    margin-top: 20px;
    text-align: center;
    padding: 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════
   Home / Index
   ══════════════════════════════════════════════════ */

.cert-home {
    height: 100vh;
    height: 100svh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #ffffff 0%, #f3f4f6 100%);
}

/* ── Home footer ───────────────────────���─────────── */

.cert-home__footer {
    padding: 12px 32px 16px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}

/* ── Topbar ──────────────────────────────────────── */

.cert-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
}

.cert-topbar__logo svg {
    height: 28px;
    width: auto;
}

.cert-topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Language switcher ───────────────────────────── */

.cert-lang {
    position: relative;
    display: inline-block;
}

.cert-lang__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    user-select: none;
}

.cert-lang__btn:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.cert-lang__btn svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.cert-lang__chevron {
    width: 14px;
    height: 14px;
    color: #9ca3af;
    transition: transform .2s;
}

.cert-lang__dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 140px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    z-index: 50;
    overflow: hidden;
}

.cert-lang:focus-within .cert-lang__dropdown,
.cert-lang--open .cert-lang__dropdown {
    display: block;
}

.cert-lang:focus-within .cert-lang__chevron,
.cert-lang--open .cert-lang__chevron {
    transform: rotate(180deg);
}

.cert-lang__option {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    transition: background .1s;
}

.cert-lang__option:hover { background: #f9fafb; }

.cert-lang__option--active {
    color: #111827;
    font-weight: 600;
    background: #f3f4f6;
}

/* ── Login CTA ───────────────────────────────────── */

.cert-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.cert-login-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* ── Hero ────────────────────────────────────────── */

.cert-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px 24px;
}

.cert-hero__inner {
    width: 100%;
    max-width: 520px;
    text-align: center;
}

.cert-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #111827;
    border-radius: 14px;
    margin-bottom: 16px;
}

.cert-hero__icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.cert-hero__title {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
    letter-spacing: -.3px;
}

.cert-hero__subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 24px;
}

/* ── Search card ─────────────────────────────────── */

.cert-search-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px 24px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05), 0 4px 20px rgba(0,0,0,.04);
    text-align: left;
}

.cert-search-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.cert-search-row {
    display: flex;
    gap: 8px;
}

.cert-search-input {
    flex: 1;
    padding: 11px 16px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: monospace;
    letter-spacing: .5px;
}

.cert-search-input::placeholder { color: #9ca3af; font-family: inherit; letter-spacing: 0; }

.cert-search-input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17,24,39,.08);
    background: #fff;
}

.cert-search-input--error { border-color: #f87171; }

.cert-search-submit {
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #111827;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}

.cert-search-submit:hover { background: #374151; }

.cert-search-error {
    margin-top: 10px;
    font-size: 13px;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cert-search-hint {
    margin-top: 12px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

/* ── Register CTA ────────────────────────────────── */

.cert-register-cta {
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

.cert-register-link {
    color: #d22a89;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}

.cert-register-link:hover {
    border-bottom-color: #d22a89;
}
