/* WEALTHGRID HUB - PRODUCTION v3.0 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #0284c7;
    --primary-glow: rgba(2, 132, 199, 0.15);
    --secondary: #10b981;
    --accent: #6366f1;
    --bg-body: #f8fafc;
    --bg-dark: #0f172a;
    --bg-alt: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --nav-h: 72px;
    --ticker-h: 40px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px var(--primary-glow);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* PROTECT AGAINST OVERFLOW */
    width: 100%;
}

/* Header Spacer to prevent content overlap */
#header-placeholder {
    height: calc(var(--nav-h) + var(--ticker-h));
    width: 100%;
    display: block;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* MODERN NAVBAR ARCHITECTURE */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h) !important;
    background: #ffffff !important;
    /* ABSOLUTE OPACITY */
    border-bottom: 1px solid var(--border);
    z-index: 1001;
    /* Highest priority */
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 6px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.logo-text span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    background: rgba(15, 23, 42, 0.03);
    padding: 0.4rem;
    border-radius: 100px;
}

.nav-links li a {
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========== UTILITY OVERRIDES (THE "JHAKAAS" FIX) ========== */

/* Force White Text (Use this on dark backgrounds) */
.text-white {
    color: #ffffff !important;
}

.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white p,
.text-white li,
.text-white span {
    color: #ffffff !important;
}

/* Force Dark Text (Use this on light backgrounds) */
.text-dark {
    color: #0f172a !important;
}

/* Dark Gradient Box (Common in generated content) */
.bg-gradient-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #ffffff !important;
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
}

.bg-gradient-blue {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: #ffffff !important;
}

/* Ensure these boxes force their children to be white */
.bg-gradient-dark *,
.bg-gradient-purple *,
.bg-gradient-blue * {
    color: #ffffff !important;
}

/* Standard Content Wrapper */
.standard-content {
    color: var(--text-secondary);
}

.nav-links li a:hover,
.nav-links li a.active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    background: var(--bg-body);
    border: 1px solid var(--border);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

/* TICKER UPDATED */
.ticker-wrap {
    position: fixed;
    top: var(--nav-h) !important;
    left: 0;
    width: 100%;
    height: var(--ticker-h) !important;
    background: #ffffff !important;
    /* ABSOLUTE OPACITY */
    opacity: 1 !important;
    z-index: 1000;
    /* Just below Navbar (1001) */
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker 60s linear infinite;
}

.ticker-item {
    background: #fff;
    margin-right: 1.5rem;
    padding: 0 1.2rem;
    height: 32px;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* BUTTONS MODERNIZED */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.8rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bg-dark), #1e293b);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 20px -2px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-body);
    border-color: var(--primary);
}

/* HERO SECTION POLISH */
.hero {
    padding: 10rem 0 8rem;
    background: radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10H90V90H10V10Z' fill='none' stroke='%23e2e8f0' stroke-opacity='0.2'/%3E%3C/svg%3E");
    z-index: -1;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 2rem;
    max-width: 800px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.ai-badge i {
    color: var(--secondary);
}

/* CARDS ARCHITECTURE - FIXED FOR MOBILE */
.tools-grid,
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

@media (max-width: 480px) {

    .tools-grid,
    .articles-grid {
        grid-template-columns: 1fr;
        /* STRICT SINGLE COLUMN */
        gap: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }
}

.post-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 0;
    /* Removing internal padding to let image reach edges */
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    /* FORCING VERTICAL STACK */
    position: relative;
    overflow: hidden;
    height: 100%;
}

.post-card .post-image {
    width: 100%;
    height: 200px;
    margin-bottom: 0;
    /* Image at very top */
}

.post-card .content-wrap {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    line-height: 1.4;
}

.post-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-10px);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.tool-card:hover::after {
    opacity: 1;
}

.tool-icon {
    width: 64px;
    height: 64px;
    background: #f8fafc;
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.post-image {
    height: 240px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(2, 132, 199, 0.1);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: auto;
}

/* SECTION HEADERS */
.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* SEARCH */
.search-container {
    margin: 2rem auto;
    max-width: 600px;
}

.search-container input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.no-results i {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* FOOTER */
.footer {
    padding: 6rem 0 3rem;
    background: linear-gradient(to bottom, #fff 0%, #f8fafc 100%);
    border-top: 1px solid var(--border);
    margin-top: 6rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 350px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer h4 {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 0.8rem;
}

.footer-list a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-list a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    font-size: 0.8rem !important;
    opacity: 0.7;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--nav-h));
        background: #fff;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        opacity: 0;
        transition: var(--transition);
        gap: 1.5rem;
        z-index: 1000;
        display: flex;
    }

    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
    }

    .nav-links li { width: 100%; }

    .nav-links li a {
        display: block;
        width: 100%;
        font-size: 1.25rem;
        padding: 1rem;
        text-align: center;
        background: #f8fafc;
        border-radius: 12px;
    }

    .nav-actions .btn {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
        background: var(--bg-body);
        border: 1px solid var(--border);
        cursor: pointer;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        align-items: center;
        justify-content: center;
        color: var(--text-primary);
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {

    /* STUBBORN OVERLAPPING FIXES */
    header.hero {
        padding: 6rem 0 4rem !important;
    }

    .hero h1 {
        font-size: 2.25rem !important;
        line-height: 1.1 !important;
        padding: 0 0.5rem !important;
    }

    .hero p {
        font-size: 1rem !important;
        padding: 0 1rem !important;
    }

    .section-header h2 {
        font-size: 2rem !important;
    }

    /* FORCING INLINE STYLE OVERRIDES FOR MOBILE */
    [style*="padding: 2rem"],
    [style*="padding: 3rem"] {
        padding: 1.5rem !important;
    }


    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--nav-h));
        background: #fff;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        /* SLIDE FROM RIGHT */
        opacity: 0;
        transition: var(--transition);
        gap: 1.5rem;
        z-index: 1000;
        display: flex;
    }

    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        display: block;
        width: 100%;
        font-size: 1.25rem;
        padding: 1rem;
        text-align: center;
        background: #f8fafc;
        border-radius: 12px;
    }

    .nav-actions .btn {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
        background: var(--bg-body);
        border: 1px solid var(--border);
        cursor: pointer;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        align-items: center;
        justify-content: center;
        color: var(--text-primary);
    }

    .hero-actions {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
        width: 100% !important;
        margin-top: 2rem !important;
    }

    .hero-actions .btn {
        width: 100% !important;
        margin: 0 !important;
        padding: 1rem 1.5rem !important;
    }

    /* GLOBAL MOBILE SPACING OVERRIDES */
    section {
        padding: 4rem 0 !important;
    }

    .section-header {
        margin-bottom: 2.5rem !important;
        padding: 0 1rem !important;
    }

    .section-header h2 {
        font-size: 1.75rem !important;
    }

    .container {
        padding: 0 1.25rem !important;
    }

    /* Fix ticker on mobile */
    .ticker-item {
        margin-right: 0.75rem !important;
        padding: 0 0.8rem !important;
        font-size: 0.7rem !important;
    }
}

/* ========== PAGE-SPECIFIC STYLES ========== */

/* BLOG PAGES */
.article-container {
    padding: 4rem 1.5rem 6rem;
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 3rem;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.article-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 3rem;
    border: 1px solid var(--border);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-main);
}

.article-content h2 {
    margin: 3rem 0 1.5rem;
    color: var(--text-main);
    font-size: 2rem;
}

.article-content h3 {
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.75rem;
}

.article-content b,
.article-content strong {
    color: var(--text-main);
    font-weight: 700;
}

.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.modal-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: 0.3s;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 600;
}

/* TOOL PAGES */
.tool-container {
    padding: 4rem 0 6rem;
    min-height: 100vh;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    background: #fff;
    padding: 3rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 4rem;
    box-shadow: var(--shadow);
}

.inputs-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 1rem;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.results-panel {
    background: linear-gradient(135deg, var(--bg-dark), #1e3a5f);
    padding: 2.5rem;
    border-radius: var(--radius);
    color: #fff;
}

.results-panel h3 {
    color: #fff;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-row:last-child {
    border: none;
}

.result-row .label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.result-row .value {
    font-weight: 800;
    color: #fff;
    font-size: 1.5rem;
}

.edu-content {
    max-width: 900px;
    margin: 4rem auto 0;
    line-height: 1.8;
    color: var(--text-main);
}

.edu-content h2 {
    color: var(--text-main);
    margin: 2.5rem 0 1rem;
    font-size: 1.75rem;
}

.edu-content p {
    margin-bottom: 1.5rem;
}

.edu-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.edu-content li {
    margin-bottom: 0.75rem;
}

.more-tools {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border);
}

.tool-card-mini {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: var(--transition);
}

.tool-card-mini:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.tool-card-mini h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.tool-card-mini p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.full-width {
    width: 100%;
}

/* GUIDE PAGES */
.guide-container {
    padding: 4rem 0 6rem;
    max-width: 900px;
    margin: 0 auto;
}

.guide-toc {
    background: #f8fafc;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 3rem;
}

.guide-toc h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.guide-toc ul {
    list-style: none;
    padding: 0;
}

.guide-toc li {
    margin-bottom: 0.75rem;
}

.guide-toc a {
    color: var(--primary);
    font-weight: 600;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 968px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-img {
        height: 250px;
    }
}

@media (max-width: 768px) {

    .article-container,
    .tool-container,
    .guide-container {
        padding: 2rem 0 4rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .calc-grid {
        padding: 1.5rem;
    }

    .results-panel {
        padding: 1.5rem;
    }
}

/* RELATED POSTS SECTION */
.related-posts {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border);
}

.related-posts h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: left;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.related-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.related-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(2, 132, 199, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    align-self: flex-start;
}

.related-card h4 {
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--text-main);
}

.related-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

/* FEATURED POST STYLES (Horizontal 2-Column Span) */
.articles-grid .post-card.featured-post {
    grid-column: span 2 !important;
    display: grid !important;
    grid-template-columns: 1fr 0.8fr !important;
    /* Slightly more balanced ratio */
    gap: 0 !important;
    align-items: stretch !important;
    border: 1px solid var(--border);
    background: #fff;
    overflow: hidden;
    min-height: 420px !important;
    flex-direction: row !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.featured-post .post-image {
    width: 100% !important;
    height: 100% !important;
    margin-bottom: 0 !important;
    position: relative;
    border-radius: 0 !important;
}

.featured-post .post-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.featured-post .content-wrap {
    padding: 3rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    width: auto !important;
    background: linear-gradient(to bottom right, #fff, #f8fafc);
}

.featured-post h3 {
    font-size: 2.2rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1.2rem !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
}

.featured-post p {
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.8rem !important;
    color: #475569 !important;
}

@media (max-width: 1100px) {
    .featured-post h3 {
        font-size: 1.8rem !important;
    }
}

@media (max-width: 900px) {
    .articles-grid .post-card.featured-post {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 768px) {
    .articles-grid .post-card.featured-post {
        grid-column: span 1 !important;
        grid-template-columns: 1fr !important;
        min-height: auto !important;
        flex-direction: column !important;
    }

    .featured-post .content-wrap {
        padding: 2rem !important;
    }
}

/* Legacy Badge Classes Locked (AdSense Compliance) */
.featured-badge,
.header-badge,
.flagship-badge {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* RESPONSIVE NAVIGATION */
@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        top: calc(var(--nav-h) + 2rem);
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        width: calc(100% - 2rem);
        max-width: 400px;
        background: #fff;
        flex-direction: column;
        padding: 2rem;
        border-radius: 20px;
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 1001;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        display: block;
        text-align: center;
        width: 100%;
        padding: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-actions .btn-primary {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero {
        padding: 8rem 0 6rem;
    }

    .navbar {
        width: calc(100% - 1rem);
    }
}

/* FORCED CONTRAST OVERRIDES */
.article-content,
.tool-card,
.post-card,
.content-card {
    color: var(--text-secondary) !important;
}

.article-content h1,
.article-content h2,
.article-content h3,
.tool-card h3,
.post-card h3 {
    color: var(--text-primary) !important;
}

.article-content strong,
.article-content b {
    color: var(--text-primary) !important;
}

/* Ensure links are visible */
a {
    color: inherit;
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: var(--primary-glow);
}

/* INTERACTIONS ENGINE STYLES */
.scroll-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scroll-hidden.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 3D Card Depth */
.tool-card,
.post-card {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

/* PREMIUM ARTICLE HEADERS */
.glass-header {
    background: #0f172a;
    padding: 6rem 4rem;
    border-radius: 40px;
    text-align: center;
    color: #fff;
    margin-bottom: 5rem;
    box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.3);
    position: relative;
    overflow: hidden;
}

.glass-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
}

.glass-header h1 {
    font-size: 3.5rem !important;
    line-height: 1.1;
    margin-bottom: 1.5rem !important;
    color: #ffffff !important;
    position: relative;
    z-index: 1;
}

.glass-header p {
    color: rgba(255, 255, 255, 0.9) !important;
    /* Increased from 0.7 for readability */
    font-size: 1.25rem !important;
    max-width: 700px;
    margin: 0 auto 2.5rem !important;
    position: relative;
    z-index: 1;
}

.header-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    color: #a5b4fc;
    /* Slightly lighter indigo */
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.share-protocol {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-protocol .share-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6) !important;
    /* Increased from 0.4 */
    text-transform: uppercase;
}

.share-protocol a {
    padding: 0.5rem 1.2rem;
    font-size: 0.7rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.share-protocol a:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
}

/* ALPHA LETTER PROTOCOL FORM - HARDENED (CONTRAST LOCK) */
.protocol-form {
    display: flex;
    align-items: center;
    gap: 0;
    background: #0f172a !important;
    /* Force dark background for white text visibility */
    padding: 0.5rem !important;
    border-radius: 100px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: var(--transition);
    max-width: 600px;
    margin: 2rem auto 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.protocol-input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    /* Pure white for high contrast */
    padding: 0 1.5rem !important;
    outline: none !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    height: 50px !important;
    min-height: 50px !important;
    -webkit-text-fill-color: #ffffff !important;
    /* Extra hardening for some browsers */
}

.protocol-input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.protocol-btn {
    height: 50px !important;
    padding: 0 2.5rem !important;
    border-radius: 100px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    border: none !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
    font-size: 0.9rem !important;
    white-space: nowrap !important;
}

.protocol-btn:hover {
    background: #f1f5f9 !important;
    transform: scale(1.02);
}

/* GLOBAL INTERACTION VISIBILITY - FAIL-SAFE */
/* Standard Inputs & Selects - High Specificity Force */
body main input:not(.protocol-input):not([type="submit"]),
body main select,
body main textarea,
.ai-card select,
.input-group select,
.form-group input,
.form-group select,
.form-group textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    opacity: 1 !important;
    display: block !important;
    width: 100% !important;
    padding: 0.8rem 1.2rem !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    visibility: visible !important;
}

/* Force Dropdown Options to be visible in all environments */
select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* MISSION ITEM & OTHER CARD OVERRIDES */
.mission-item,
.stat-card {
    background-color: #f8fafc !important;
    /* Force light readable background */
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
}

.mission-item *,
.stat-card * {
    color: #0f172a !important;
}

/* Ensure Labels are readable */
label {
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
}

/* Result Card Hardening */
.result-card,
.results-panel {
    background: #0f172a !important;
    color: #ffffff !important;
}

.result-card h3,
.result-card p,
.results-panel h3,
.results-panel p {
    color: #ffffff !important;
}

/* ==========================================================================
   SOVEREIGN RESPONSIVE OVERRIDES (AD-SENSE COMPLIANCE)
   ========================================================================== */

/* 1. HEADER STACK STABILITY (FIXED & OPAQUE) */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: var(--nav-h) !important;
    background: #ffffff !important;
    z-index: 1001 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ticker-wrap {
    position: fixed !important;
    top: var(--nav-h) !important;
    left: 0 !important;
    width: 100% !important;
    height: var(--ticker-h) !important;
    background: #ffffff !important;
    z-index: 1000 !important;
    border-bottom: 1px solid var(--border);
    opacity: 1 !important;
}

/* 2. CONTENT SPACING */
body {
    padding-top: 0 !important;
    /* Managed by placeholder, verified */
}

/* 3. MOBILE FORM HARDENING (< 768px) */
@media (max-width: 768px) {

    /* 1. LAYOUT HARDENING */
    header.hero {
        padding: 5rem 0 3rem !important;
    }

    .hero h1 {
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
    }

    .hero p {
        font-size: 1rem !important;
    }

    .hero-actions {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }

    .hero-actions .btn {
        width: 100% !important;
    }

    /* 2. COMPONENT OVERRIDES */
    .calc-grid,
    .tool-card,
    .market-card,
    .guide-card {
        padding: 1.25rem !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .stat-grid {
        grid-template-columns: 1fr !important;
    }

    .container {
        padding: 0 1rem !important;
    }

    section {
        padding: 3.5rem 0 !important;
    }

    /* 3. PROTOCOL FORM (Signup Form) */
    .protocol-form {
        flex-direction: column !important;
        padding: 1rem !important;
        height: auto !important;
    }

    .protocol-input,
    .protocol-btn {
        width: 100% !important;
        height: 52px !important;
        font-size: 16px !important;
        margin: 0 !important;
    }

    /* 4. NAVBAR MOBILE MODE */
    .nav-links {
        height: calc(100vh - var(--nav-h)) !important;
    }
}

/* AGGRESSIVE FLAGGING REMOVAL - VALID CSS */
[class*="flagship"],
.featured-badge,
.header-badge,
.flagship-badge,
.flagship,
.badge-flagship {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    z-index: -999 !important;
}