:root {
    --bg: #fdfdfd;
    --bg-profile: #fcfcfc;
    --navy: #1a2a5e;
    --red: #c62828;
    --green: #2e7d32;
    --border: #e0e0e0;
    --text-main: #111;
    --text-muted: #666;
    --sidebar-bg: #f4f5f7;
    --status-con: #2e7d32;
    --status-eva: #ef6c00;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; color: var(--text-main); line-height: 1.5; background: var(--bg); }

/* Header & Search */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%; background: #fff; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 1000;
}
.logo-area { text-decoration: none; color: inherit; }
.logo-area h2 { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.4rem; }
.logo-tag { font-size: 10px; text-transform: uppercase; color: var(--text-muted); }

.search-container { flex: 1; max-width: 600px; margin: 0 40px; position: relative; }
.search-flex { display: flex; gap: 0; border: 1px solid var(--border); }
.search-flex input {
    flex: 1; padding: 12px 20px; border: none;
    background: #f9f9f9; font-size: 14px; outline: none; min-width: 0;
}
.search-btn {
    background: var(--navy); color: white; border: none;
    padding: 0 25px; font-weight: 700; font-size: 12px;
    cursor: pointer; text-transform: uppercase; white-space: nowrap;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid var(--border); border-top: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); display: none;
    max-height: 300px; overflow-y: auto; z-index: 2000;
}
.search-result-item {
    display: block; padding: 12px 20px; text-decoration: none;
    color: var(--text-main); border-bottom: 1px solid var(--border); font-size: 13px;
}
.search-result-item:hover { background: #f4f5f7; }

/* Main Layout */
.wrapper { display: grid; grid-template-columns: 1fr 300px; gap: 50px; max-width: 1400px; margin: 40px auto; padding: 0 5%; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-top: 30px; }
.card { background: #fff; border: 1px solid var(--border); padding: 25px; cursor: pointer; transition: transform 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

/* Profile Specific */
.profile-container { display: grid; grid-template-columns: 350px 1fr; gap: 60px; max-width: 1400px; margin: 40px auto; padding: 0 5%; }
.profile-side img { width: 100%; border-bottom: 10px solid var(--navy); filter: grayscale(1); margin-bottom: 25px; }

.section-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 30px; }
.section-title h2 { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--navy); margin-top: 15px;}


.vs-block { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; position: relative; margin-bottom: 25px; }
.quote-card { background: #f9f9f9; border: 1px solid var(--border); padding: 25px; font-size: 14px; }
.vs-badge {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: var(--red); color: white; width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900;
    box-shadow: 0 0 0 5px var(--bg); z-index: 5;
}

/* Utilities */
.badge { padding: 12px; font-size: 11px; font-weight: 700; margin-bottom: 20px; border-left: 3px solid transparent; }
.badge-red { background: #fff5f5; color: var(--red); border-color: var(--red); }
.badge-blue { background: #F0FFFF; color: var(--blue); border-color: var(--blue); }

/* --- DYNAMIC BADGES --- */
.badge {
    padding: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 20px;
    border-left: 3px solid transparent;
    text-transform: uppercase;
}

/* Red / Danger */
.badge-red {
    background: #fff5f5;
    color: var(--red);
    border-color: var(--red);
}

/* Green / Success */
.badge-blue {
    background: #f0fdf4;
    color: var(--green);
    border-color: var(--green);
}

/* Orange / Warning (Optional) */
.badge-warning {
    background: #fffbe6;
    color: #ef6c00;
    border-color: #ef6c00;
}



.label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; display: block; }
.stat-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.stat-value { font-weight: 700; color: var(--navy); }

/* Footer */
/* --- FOOTER (Matching Original Design) --- */
footer {
    background: #f8f9fa;
    padding: 60px 5%;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left a { text-decoration: none; color: inherit; }
.footer-left p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

.footer-center {
    display: flex;
    gap: 30px;
}

.footer-center a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-center a:hover {
    color: var(--navy);
}

.footer-right {
    /* Kept for spacing balance from original design */
    min-width: 150px;
}

/* --- UPDATED LINK STYLING --- */

/* Base style for the source links to match your original 'REFERENCE' design */
.source-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--navy); /* Uses your brand navy */
    text-decoration: none; /* Removes the default blue underline */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.source-link:hover {
    color: var(--red); /* Subtle change on hover to indicate it is clickable */
    text-decoration: underline;
}

/* --- EVADED QUESTIONS GRID --- */
.evade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.evade-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease;
}

.evade-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.evade-card .label {
    color: var(--status-eva); /* Orange-ish color from your root variables */
    margin-bottom: 10px;
}

.evade-card p {
    font-size: 14px;
    margin-bottom: 10px;
}

/* Ensure the link inside the card matches the "REFERENCE" aesthetic */
.evade-card .source-link {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    display: block;
}

/* Responsive adjustment for the grid */
@media (max-width: 600px) {
    .evade-grid {
        grid-template-columns: 1fr;
    }
}

/* Specific fix for links inside the Statement History cards */
.quote-card .source-link {
    display: block;
    width: fit-content;
}

/* General reset for footer and header links so they don't turn blue */
header a, footer a {
    text-decoration: none;
    color: inherit;
}

/* --- RE-VERIFYING GLOBAL COLORS --- */
:root {
    --bg: #fdfdfd;
    --bg-profile: #fcfcfc;
    --navy: #1a2a5e;
    --red: #c62828;
    --border: #e0e0e0;
    --text-main: #111;
    --text-muted: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .wrapper, .profile-container { grid-template-columns: 1fr; }
    .vs-block { grid-template-columns: 1fr; }
    .vs-badge { position: relative; left: 50%; top: auto; transform: translateX(-50%); margin: -10px 0; }
}
