/* 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: calc(var(--nav-h) + var(--ticker-h) + 20px);
    -webkit-font-smoothing: antialiased;
}

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: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 1140px;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.navbar.scrolled {
    top: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--border);
}

.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: calc(var(--nav-h) + 2rem);
    left: 0;
    width: 100%;
    height: var(--ticker-h);
    background: transparent;
    z-index: 999;
    overflow: hidden;
}

.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 */
.tools-grid,
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.tool-card,
.post-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 3rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.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);
    }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .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) {
    body {
        padding-top: 140px;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition);
        gap: 1rem;
    }

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

    .nav-actions {
        display: none;
    }

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

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

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

    .footer-desc {
        max-width: 100%;
    }
}

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

/* BLOG PAGES */
.article-container {
    padding: 4rem 0 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);
}

.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 */
.featured-post {
    grid-column: span 2;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    border: 2px solid var(--primary);
    background: linear-gradient(to right, #fff, #f8faff);
}

.featured-post .post-image {
    height: 100%;
    margin-bottom: 0;
    position: relative;
}

.featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
    z-index: 10;
}

.featured-post h3 {
    font-size: 2rem;
}

@media (max-width: 1024px) {
    .featured-post {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

/* 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 */
.protocol-form {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

.protocol-form:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.protocol-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    padding: 0 1.5rem !important;
    outline: none !important;
    font-family: inherit;
    font-size: 1rem;
}

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

.protocol-btn {
    padding: 1rem 2rem !important;
    border-radius: 100px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    border: none !important;
    cursor: pointer !important;
    transition: var(--transition);
}

.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;
}