/* ── Reset & Base ────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0d14;
    --bg-card: rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.07);
    --border: rgba(255,255,255,0.08);
    --text: #e4e4e7;
    --text-dim: #9ca3af;
    --gold: #d4af37;
    --gold-light: #F5A623;
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #F5A623 100%);
    --green: #22c55e;
    --blue: #3b82f6;
    --red: #ef4444;
    --radius: 12px;
    --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 700; }

/* ── Header ─────────────────────────────────────── */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
}

.logo { display: flex; align-items: baseline; gap: 4px; text-decoration: none; }
.logo-text { font-size: 1.25rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.logo-accent { font-size: 1.25rem; font-weight: 500; color: var(--gold); }

.back-link {
    font-size: 0.875rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.back-link:hover { color: var(--gold); text-decoration: none; }

/* ── Hero (index) ───────────────────────────────── */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4rem 1.5rem 2rem;
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    background: rgba(212,175,55,0.12);
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 1rem;
}

.gold { color: var(--gold); }

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 560px;
    margin-bottom: 2.5rem;
}

/* ── Search Box ─────────────────────────────────── */
.search-box {
    width: 100%;
    max-width: 560px;
    position: relative;
    margin-bottom: 2.5rem;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-dim);
    pointer-events: none;
}

#search {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search::placeholder { color: var(--text-dim); }
#search:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #161a24;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 320px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.search-results.active { display: block; }

.result-item {
    display: block;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
    text-align: left;
}
.result-item:last-child { border-bottom: none; }
.result-item:hover { background: var(--bg-card-hover); text-decoration: none; }
.result-item .r-name { font-weight: 600; color: #fff; }
.result-item .r-meta { font-size: 0.82rem; color: var(--text-dim); margin-top: 2px; }

.no-results {
    padding: 1rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    text-align: left;
}

.error-msg {
    background: rgba(239,68,68,0.12);
    color: var(--red);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* ── Trust Row ──────────────────────────────────── */
.trust-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}
.trust-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Stats Bar ──────────────────────────────────── */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2.5rem 1.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.stat { text-align: center; }
.stat-num {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gold);
}
.stat-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-dim);
    max-width: 200px;
}

/* ── Warning Card ───────────────────────────────── */
.warning-card {
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.3);
}
.warning-card h3 { color: var(--red); }

/* ── Report Page ────────────────────────────────── */
.report {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

/* Consultant bar */
.consultant-bar {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.consultant-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.consultant-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255,255,255,0.08);
    color: var(--text-dim);
}
.tag-active { background: rgba(34,197,94,0.15); color: var(--green); }
.tag-revoked { background: rgba(239,68,68,0.15); color: var(--red); }
.tag-suspended { background: rgba(245,166,35,0.15); color: var(--gold-light); }
.tag-resigned { background: rgba(156,163,175,0.15); color: var(--text-dim); }

.meta-text { font-size: 0.85rem; color: var(--text-dim); }

/* Score section */
.score-section {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.gauge-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.gauge { width: 100%; height: 100%; transform: rotate(-90deg); }

.gauge-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 10;
}

.gauge-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 534;
    stroke-dashoffset: 534;
    transition: stroke-dashoffset 1.5s ease-out;
}

.gauge-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gauge-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.gauge-of {
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 500;
}

.score-info { text-align: left; }

.grade {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.headline {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.percentile-text {
    font-size: 1rem;
    color: var(--text-dim);
}

/* Breakdown */
.breakdown {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.breakdown h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
}

.cat-row { margin-bottom: 1.25rem; }
.cat-row:last-child { margin-bottom: 0; }

.cat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.cat-label { font-weight: 600; font-size: 0.9rem; color: #fff; }
.cat-score { font-weight: 700; font-size: 0.9rem; color: var(--text-dim); }

.bar-track {
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 100px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    border-radius: 100px;
    transition: width 1s ease-out 0.3s;
}

.cat-detail {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
}

/* Glass cards */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
}

.glass-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.glass-card p { color: var(--text-dim); margin-bottom: 0.75rem; }

.glass-card ul {
    list-style: none;
    padding: 0;
}

.glass-card ul li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.glass-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}

/* CTA */
.cta-section { text-align: center; }

.cta-buttons { margin: 1.25rem 0; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: var(--gold-gradient);
    color: #0a0d14;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary svg { width: 18px; height: 18px; }
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(212,175,55,0.3);
    text-decoration: none;
    color: #0a0d14;
}

.cta-note {
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* Share */
.share-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 0;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.share-btn {
    padding: 0.4rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}
.share-btn:hover { background: var(--bg-card-hover); }

/* ── Footer ─────────────────────────────────────── */
footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 640px) {
    header { padding: 1rem; }
    .hero { padding: 2.5rem 1rem 1.5rem; }
    .hero h1 { font-size: 1.75rem; }
    .stats-bar { gap: 1.5rem; padding: 1.5rem 1rem; }
    .score-section { flex-direction: column; text-align: center; }
    .score-info { text-align: center; }
    .trust-row { flex-direction: column; align-items: center; gap: 0.75rem; }
}
