/* ---- Font display override — prevents font-swap layout shift ---- */
@font-face {
    font-family: 'Inter';
    font-display: optional;
    src: local('Inter');
}
@font-face {
    font-family: 'Outfit';
    font-display: optional;
    src: local('Outfit');
}

/* =============================================
   SCOREIQ — Finance Quiz
   Dark Navy + Gold · Mobile-first · Fast paint
   ============================================= */

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

:root {
    --navy:        #0f1d35;
    --navy-mid:    #1a2b4a;
    --navy-light:  #243660;
    --gold:        #f4b942;
    --gold-light:  #fde68a;
    --gold-dark:   #d4880a;
    --text-main:   #f0f4ff;
    --text-muted:  #8fa3c8;
    --text-dark:   #1f2937;
    --bg-card:     rgba(26, 43, 74, 0.85);
    --bg-card-solid: #1a2b4a;
    --border:      rgba(244, 185, 66, 0.2);
    --border-light: rgba(255,255,255,0.08);
    --green:  #10b981;
    --yellow: #f59e0b;
    --orange: #f97316;
    --red:    #ef4444;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-gold: 0 0 30px rgba(244, 185, 66, 0.15);
    --shadow-card: 0 10px 40px rgba(0,0,0,0.4);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    background: linear-gradient(135deg, #060e1c 0%, #0f1d35 40%, #162447 100%);
    background-attachment: fixed;
}

/* ---- STAR PARTICLES (CSS only ambient glow) ---- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(244,185,66,0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(99,102,241,0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ---- MOBILE FRAME ---- */
.site-frame {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    background: rgba(10, 18, 35, 0.6);
    backdrop-filter: blur(2px);
}

/* ---- HEADER ---- */
.site-header {
    background: rgba(10,18,35,0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: .55rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    color: var(--gold);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.logo-icon { font-size: 1.5rem; }

.header-badge {
    font-size: .7rem;
    background: rgba(244,185,66,0.12);
    color: var(--gold);
    border: 1px solid rgba(244,185,66,0.3);
    border-radius: 99px;
    padding: .25rem .75rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: .03em;
}

/* ---- SKELETON LOADERS ---- */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: rgba(255,255,255,0.04);
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(244,185,66,0.07) 50%, transparent 100%);
    animation: shimmer 1.8s infinite;
}

@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ad-banner.skeleton { min-height: 270px; }

/* ---- AD BANNER ---- */
.ad-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-light);
    padding: .4rem 0;
    min-height: 260px;
    overflow: hidden;
    position: relative;
}

.ad-label {
    font-size: .55rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: rgba(255,255,255,0.2);
    margin-bottom: .3rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* ---- HERO ---- */
.hero {
    text-align: center;
    padding: 1.8rem 1.2rem 1.4rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(244,185,66,0.06) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.hero__eyebrow {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--gold);
    background: rgba(244,185,66,0.1);
    border: 1px solid rgba(244,185,66,0.25);
    padding: .25rem .8rem;
    border-radius: 99px;
    margin-bottom: .9rem;
}

.hero__title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.7rem, 6vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: .7rem;
    color: var(--text-main);
}

.hero__title span {
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__sub {
    font-size: .9rem;
    color: var(--text-muted);
    max-width: 30ch;
    margin: 0 auto;
    line-height: 1.5;
}

/* ---- TRUST BAR ---- */
.trust-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .3rem .8rem;
    background: rgba(15,29,53,0.8);
    border-bottom: 1px solid var(--border-light);
    padding: .5rem 1rem;
    font-size: .7rem;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.trust-bar span {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(244,185,66,0.1);
    border-radius: 50%;
    font-size: .6rem;
}

/* ---- QUIZ WRAP ---- */
.quiz-wrap {
    padding: 1rem 1rem 0;
    max-width: 500px;
    margin: 0 auto;
}

/* ---- PROGRESS BAR ---- */
.progress-wrap {
    margin-bottom: 1rem;
    background: rgba(26,43,74,0.7);
    backdrop-filter: blur(8px);
    padding: .75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: .5rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.progress-label span:last-child {
    color: var(--gold);
}

.progress-track {
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    height: 7px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    box-shadow: 0 0 8px rgba(244,185,66,0.5);
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

/* ---- QUIZ CARD ---- */
.quiz-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.3rem 1.1rem;
    margin-bottom: .8rem;
    position: relative;
    overflow: hidden;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
}

.quiz-step { display: none; animation: fadeIn 0.35s ease forwards; }
.quiz-step.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-q {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    margin-bottom: .9rem;
    line-height: 1.4;
}

.step-q em {
    color: var(--gold);
    font-style: normal;
    background: rgba(244,185,66,0.1);
    padding: 0 .25rem;
    border-radius: 4px;
}

/* ---- OPTIONS ---- */
.opt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    margin-bottom: .2rem;
}

.opt-btn {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: .75rem .4rem;
    cursor: pointer;
    font-size: .83rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    transition: all 0.2s ease;
    line-height: 1.2;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.opt-btn:hover {
    border-color: rgba(244,185,66,0.4);
    background: rgba(244,185,66,0.07);
    color: var(--text-main);
    transform: translateY(-2px);
}

.opt-btn.selected {
    border-color: var(--gold);
    background: rgba(244,185,66,0.15);
    color: var(--gold);
    box-shadow: 0 0 0 2px rgba(244,185,66,0.2);
    transform: scale(0.98);
}

.opt-btn:active { transform: scale(.95); }

.opt-btn .opt-icon {
    font-size: 1.25rem;
    display: block;
    margin-bottom: .2rem;
    transition: transform 0.2s ease;
}

.opt-btn:hover .opt-icon { transform: scale(1.1); }

/* ---- BUTTONS ---- */
.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--navy);
    border: none;
    border-radius: var(--radius-md);
    padding: .9rem 1.5rem;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all .2s ease;
    letter-spacing: .02em;
    box-shadow: 0 6px 20px rgba(244,185,66,0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(244,185,66,0.4);
    filter: brightness(1.05);
}

.btn-primary:active { transform: translateY(1px) scale(.98); }

.btn-full {
    width: 100%;
    margin-top: .9rem;
    display: block;
}

/* ---- MATCHING SPINNER ---- */
.matching-wrap {
    text-align: center;
    padding: 3rem 1rem;
    display: none;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 1.5rem;
}

.matching-wrap.active { display: block; animation: fadeIn 0.4s ease forwards; }

.matching-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(244,185,66,0.15);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .85s linear infinite;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 20px rgba(244,185,66,0.2);
}

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

.matching-title {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    margin-bottom: .5rem;
    color: var(--gold);
}

.matching-sub {
    font-size: .88rem;
    color: var(--text-muted);
}

/* ---- RESULTS ---- */
.results-wrap { display: none; padding: 0; }
.results-wrap.active { display: block; }

.result-score-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 2.2rem 1.4rem;
    margin-bottom: 1.2rem;
    text-align: center;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.score-circle-wrap { display: flex; justify-content: center; margin-bottom: 1.4rem; }

.score-circle {
    width: 125px;
    height: 125px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--gold);
    background: rgba(244,185,66,0.07);
    box-shadow: 0 0 40px rgba(244,185,66,0.2);
    transition: all .6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.score-circle.green  { border-color: var(--green);  background: rgba(16,185,129,0.1);  box-shadow: 0 0 30px rgba(16,185,129,0.2); }
.score-circle.yellow { border-color: var(--yellow); background: rgba(245,158,11,0.1);  box-shadow: 0 0 30px rgba(245,158,11,0.2); }
.score-circle.orange { border-color: var(--orange); background: rgba(249,115,22,0.1);  box-shadow: 0 0 30px rgba(249,115,22,0.2); }
.score-circle.red    { border-color: var(--red);    background: rgba(239,68,68,0.1);   box-shadow: 0 0 30px rgba(239,68,68,0.2); }

.score-number {
    font-size: 2.4rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    line-height: 1;
}

.score-out {
    font-size: .8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.result-label {
    font-size: 1.45rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    margin-bottom: .7rem;
    color: var(--gold);
}

.result-label.green  { color: var(--green);  }
.result-label.yellow { color: var(--yellow); }
.result-label.orange { color: var(--orange); }
.result-label.red    { color: var(--red);    }

.result-message {
    font-size: .93rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.4rem;
}

.result-cta {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--navy);
    border: none;
    border-radius: var(--radius-md);
    padding: .95rem 1.8rem;
    width: 100%;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
    text-align: center;
    box-shadow: 0 6px 20px rgba(244,185,66,0.3);
    position: relative;
    overflow: hidden;
}

.result-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    pointer-events: none;
}

.result-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(244,185,66,0.4);
    filter: brightness(1.05);
}

.result-cta:active { transform: translateY(1px) scale(.98); }

/* ---- FOOTER ---- */
.site-footer {
    border-top: 1px solid var(--border-light);
    text-align: center;
    padding: 1.5rem 1rem 100px;
    font-size: .78rem;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 .5rem;
    transition: color 0.2s;
    font-weight: 600;
}

.site-footer a:hover { color: var(--gold); }

/* ---- SEO CONTENT ---- */
.seo-content {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin: 1.5rem 1.2rem;
    padding: 2rem 1.6rem;
    box-shadow: var(--shadow-card);
}

.seo-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--gold);
    margin: 1.5rem 0 .8rem;
    line-height: 1.2;
}

.seo-content h2:first-child { margin-top: 0; }

.seo-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 1.5rem 0 .6rem;
    border-left: 3px solid var(--gold);
    padding-left: .8rem;
}

.seo-content p {
    font-size: .92rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.seo-content ul {
    margin: 1rem 0;
    padding-left: 1.2rem;
}

.seo-content li {
    font-size: .92rem;
    color: var(--text-muted);
    margin-bottom: .7rem;
    list-style-type: none;
    position: relative;
}

.seo-content li::before {
    content: "✦";
    color: var(--gold);
    font-size: .7rem;
    display: inline-block;
    width: 1.2em;
    margin-left: -1.2em;
}

.seo-content strong { color: var(--text-main); font-weight: 600; }

.keyword-tag {
    background: rgba(244,185,66,0.1);
    color: var(--gold);
    border: 1px solid rgba(244,185,66,0.2);
    padding: .1rem .45rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: .88em;
    font-family: 'Outfit', sans-serif;
}

/* Info callout */
.info-callout {
    background: rgba(244,185,66,0.06);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--gold);
}

.info-callout h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: .4rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.info-callout p { margin-bottom: 0; }

/* Stats grid */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
    margin: 1.2rem 0;
}

.stat-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--gold);
    font-family: 'Outfit', sans-serif;
    line-height: 1;
    margin-bottom: .25rem;
}

.stat-label {
    font-size: .7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Comparison table */
.comparison-table-wrap {
    overflow-x: auto;
    margin: 1.2rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .83rem;
    background: transparent;
}

.comparison-table th {
    background: rgba(244,185,66,0.1);
    color: var(--gold);
    font-family: 'Outfit', sans-serif;
    padding: .8rem;
    text-align: left;
    font-weight: 700;
}

.comparison-table td {
    padding: .8rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
}

.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table .check { color: var(--green); font-weight: bold; }

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
}

/* ---- BOTTOM STICKY AD ---- */
.sticky-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 200;
    background: rgba(10,18,35,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: .3rem .5rem .2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 430px;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.5);
    height: 75px;
    max-height: 30vh;
    overflow: hidden;
}

.sticky-ad .ad-label { margin-bottom: .2rem; }

/* ---- EXIT INTENT MODAL ---- */
.exit-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.exit-modal-overlay.active { display: flex; }

.exit-modal {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    max-width: 380px;
    width: 100%;
    border-radius: var(--radius-lg);
    padding: 2.2rem 1.8rem;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), var(--shadow-gold);
    animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.exit-modal h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: .8rem;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.exit-modal p {
    font-size: .95rem;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    line-height: 1.55;
}

.exit-modal p strong { color: var(--text-main); }

.exit-modal .btn-primary { width: 100%; padding: 1rem; font-size: 1.05rem; }

.close-exit {
    margin-top: 1rem;
    display: inline-block;
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.close-exit:hover { color: var(--text-main); }

/* ---- UTILITY ---- */
.hidden { display: none !important; }
