/* =========================================================
   Design tokens
   ========================================================= */
:root {
    --bg: #0A0D14;
    --surface: #12161F;
    --surface-2: #1B212E;
    --border: rgba(255, 255, 255, 0.08);
    --text: #EDEFF5;
    --text-muted: #8A93A8;
    --accent: #FF5D3A;      /* overridden inline per admin "primary_color" setting */
    --accent-soft: rgba(255, 93, 58, 0.15);
    --accent-2: #33F2C7;    /* success / scan-line green */
    --danger: #FF4D6D;
    --radius: 14px;
    --font-display: 'Rajdhani', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(8px);
    position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { height: 32px; width: auto; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--accent); color: #0A0D14;
    font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; color: var(--text); }
.site-nav { display: flex; gap: 28px; }
.site-nav a { text-decoration: none; color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color .15s; }
.site-nav a:hover { color: var(--text); }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding: 72px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent); margin: 0 0 14px;
}
.hero-copy h1 {
    font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.05; margin: 0 0 16px; letter-spacing: -0.01em;
}
.hero-subtitle { color: var(--text-muted); font-size: 17px; max-width: 42ch; margin: 0 0 32px; }

.uid-form { max-width: 480px; }
.input-row { display: flex; gap: 10px; }
#uid-input {
    flex: 1; min-width: 0; padding: 15px 18px; font-size: 16px; font-family: var(--font-mono);
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
#uid-input::placeholder { color: var(--text-muted); font-family: var(--font-body); }
#uid-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }

.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 15px 26px; border: none; border-radius: 10px; cursor: pointer;
    background: var(--accent); color: #0A0D14; font-weight: 700; font-size: 15px;
    font-family: var(--font-display); letter-spacing: 0.02em; white-space: nowrap;
    transition: transform .12s, filter .12s;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.7; cursor: progress; }
.btn-spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(10,13,20,0.35); border-top-color: #0A0D14;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.field-hint { font-size: 13px; color: var(--text-muted); margin: 10px 2px 0; }
.form-error { color: var(--danger); font-size: 14px; margin: 10px 2px 0; }

/* Hero visual: scan card */
.hero-visual { display: flex; justify-content: center; }
.scan-card {
    position: relative; width: 100%; max-width: 340px; aspect-ratio: 4 / 3;
    background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border); border-radius: 18px; padding: 22px;
    overflow: hidden;
}
.scan-card-row { display: flex; gap: 6px; margin-bottom: 22px; }
.scan-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.scan-card-body { display: flex; flex-direction: column; gap: 6px; }
.scan-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--text-muted); margin-top: 14px; }
.scan-value { font-family: var(--font-mono); font-size: 18px; color: var(--text-muted); letter-spacing: 0.08em; opacity: 0.5; }
.scan-line {
    position: absolute; left: 0; right: 0; top: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
    box-shadow: 0 0 16px 2px var(--accent-2);
    animation: scan-sweep 3.2s ease-in-out infinite;
}
@keyframes scan-sweep {
    0%, 100% { top: 8%; opacity: 0.9; }
    50% { top: 92%; opacity: 0.5; }
}
@media (prefers-reduced-motion: reduce) {
    .scan-line { animation: none; top: 50%; }
    html { scroll-behavior: auto; }
}

/* =========================================================
   Result / error cards
   ========================================================= */
.result-section { padding: 0 0 24px; min-height: 12px; }
.result-card, .error-card {
    max-width: 560px; margin: 24px auto 0; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
    animation: card-in .35s ease;
}
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.result-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.result-card-header h2 { font-family: var(--font-display); font-size: 20px; margin: 0; }
.result-grid { display: grid; gap: 16px; margin: 0 0 20px; }
.result-grid dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 4px; }
.result-grid dd { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; }
.mono { font-family: var(--font-mono); }
.copy-btn {
    font-family: var(--font-body); font-size: 12px; padding: 4px 10px; border-radius: 6px;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted); cursor: pointer;
    transition: color .15s, border-color .15s;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }

.btn-secondary {
    padding: 11px 20px; border-radius: 9px; border: 1px solid var(--border);
    background: transparent; color: var(--text); font-weight: 600; cursor: pointer; font-family: var(--font-body);
    transition: border-color .15s, background .15s;
}
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-soft); }

.error-card { text-align: center; }
.error-card svg { margin-bottom: 10px; }
.error-card p { color: var(--text); margin: 0 0 18px; }

/* =========================================================
   Recent checks
   ========================================================= */
.recent-section { padding: 8px 0 40px; }
.recent-header { display: flex; align-items: center; justify-content: space-between; max-width: 560px; margin: 0 auto 12px; }
.recent-header h2 { font-family: var(--font-display); font-size: 18px; margin: 0; }
.link-btn { background: none; border: none; color: var(--text-muted); font-size: 13px; cursor: pointer; text-decoration: underline; }
.recent-list { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; display: flex; flex-direction: column; gap: 8px; }
.recent-list li {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; font-size: 14px;
}
.recent-list .recent-uid { font-family: var(--font-mono); color: var(--text-muted); }
.recent-note { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 12px; }

/* =========================================================
   How it works / API sections
   ========================================================= */
.how-section, .api-section { padding: 56px 0; border-top: 1px solid var(--border); }
.how-section h2, .api-section h2 { font-family: var(--font-display); font-size: 26px; margin: 0 0 28px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how-steps li { display: flex; gap: 14px; }
.step-index {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); color: var(--accent-2); font-size: 14px;
}
.how-steps h3 { margin: 0 0 6px; font-size: 16px; }
.how-steps p { margin: 0; color: var(--text-muted); font-size: 14px; }

.api-section p { color: var(--text-muted); }
.code-block {
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; color: var(--accent-2);
}
.api-note { font-size: 13px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 24px; }
.footer-inner { display: flex; flex-direction: column; gap: 4px; color: var(--text-muted); font-size: 13px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .how-steps { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .input-row { flex-direction: column; }
    .btn-primary { width: 100%; }
    .site-nav { display: none; }
}
