:root {
    --brand-blue-dark: #1e3a8a;
    --brand-blue-medium: #0056b3; /* Used for the expert tab */
    --brand-blue-light: #f0f9ff;
    --brand-border: #e2e8f0;
    --text-dark: #333;
    --text-light: #666;
}
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
                 "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background-color: #f7f9fc;
    color: var(--text-dark);
}
h1, h2, h3, h4, h5, h6 {
        color: var(--text-dark); 
}
a {
    color: var(--brand-blue-medium);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* === TOP NAV HEADER === */
.full-width-header { background: #fff; padding: 10px 40px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.08); height: 60px; box-sizing: border-box; }
.header-logo { padding: 0; margin: 0; }
.header-logo a { font-size: 1.8em; font-weight: bold; color: var(--brand-blue-medium); text-decoration: none; display: flex; align-items: center; }
.header-logo img { height: 52px; width: auto; max-width: none; }
.header-logo-icon {
    width: 30px;
    height: 30px;
    background: #007bff;
    border-radius: 4px;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2em;
}

/* Ensure all links are underlined by default */
.article-body p a, 
.article-body li a,
.article-body a {
    text-decoration: underline;
}

/* Optional: Keep the subtle change for external links, but ensure the base is underlined */
.article-body p a[target="_blank"] { 
    text-decoration: underline; 
}
.header-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 25px; }
.header-nav a { text-decoration: none; color: var(--text-dark); font-weight: 500; }

/* === HERO SEARCH (From Pillar Page) === */
.hero-search { 
    background-color: #0056b3;
    color: #fff;
    padding: 80px 20px; 
    text-align: center; 
}
.hero-search h1 {
    color: #fff;
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
}
.hero-search .lead-text {
    font-size: 1.4em; 
    color: #fff;
    font-weight: normal;
    margin: 0 auto 30px;
    line-height: 1.4;
}
.search-tabs { 
    display: flex; 
    justify-content: center; 
    margin-bottom: 25px; 
    gap: 10px;
}
.search-tab { 
    background: #fff;
    color: #007bff; 
    padding: 12px 20px; 
    border-radius: 50px; 
    border: 1px solid #e9ecef;
    cursor: pointer; 
    font-weight: bold;
}
.search-tab.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.search-box { 
    display: flex; 
    justify-content: center; 
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}
.search-box input[type="text"] { 
    flex-grow: 1;
    padding: 15px 25px; 
    border: 1px solid #e9ecef; 
    border-right: none;
    border-radius: 50px 0 0 50px; 
    font-size: 1.1em; 
}
.search-box button { 
    padding: 15px 35px; 
    background: #28a745; 
    color: #fff; 
    border: none; 
    border-radius: 0 50px 50px 0; 
    cursor: pointer; 
    font-size: 1.1em; 
    font-weight: bold;
}

/* === BREADCRUMBS BAR === */
.breadcrumbs-bar { width: 100%; padding: 20px 0 0 0; box-sizing: border-box; background: #f7f9fc; }
.breadcrumbs-container { max-width: 900px; margin: 0 auto; padding: 0 25px; font-size: 0.85em; color: #555; }
.breadcrumbs-container a { font-weight: 500; }
.breadcrumbs-container span { color: var(--text-dark); }

/* === GUIDE LAYOUT === */
.container { max-width: 900px; margin: 15px auto 25px auto; padding: 25px; background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }

.article-header { text-align: left; margin-bottom: 25px; border-bottom: 1px solid var(--brand-border); padding-bottom: 25px; }
.article-header h1 { font-size: 2.8em; margin: 0; line-height: 1.2; }
.article-header .article-meta { font-size: 0.9em; color: var(--text-light); margin-top: 15px; }

.featured-image { max-width: 100%; height: auto; margin-bottom: 30px; border-radius: 12px; box-shadow: 0 8px 25px rgba(0,0,0,0.1); border: 1px solid var(--brand-border); }

/* === MAIN CONTENT === */
.article-body { color: var(--text-dark); }
.article-body p { margin-bottom: 1.2em; font-size: 1.05em; line-height: 1.7; }
.article-body h2 { font-size: 2.0em; margin-top: 40px; margin-bottom: 15px; border-bottom: 2px solid var(--brand-border); padding-bottom: 5px; }
.article-body h3 { font-size: 1.6em; color: var(--text-dark); margin-top: 30px; }
.article-body h4 { font-size: 1.3em; margin-top: 20px; }
.article-body ol, .article-body ul { margin: 20px 0; padding-left: 25px; }
.article-body li { margin-bottom: 10px; }
.article-body p a { text-decoration: underline; }
.article-body p a[target="_blank"] { text-decoration: underline; }
.article-body figure { margin: 1.5em 0; } 
.article-body figure img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 0 auto; }
.article-body blockquote { border-left: 4px solid var(--brand-border); margin: 1.5em 0 1.5em 0px; padding: 0.5em 15px; color: var(--text-light); background-color: #f9fafb; }
.article-body blockquote pre { background: none; padding: 0; margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.article-body blockquote pre code { font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; font-size: 0.9em; color: #555; }
.article-body code { font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; background-color: #eef2f9; padding: 2px 5px; border-radius: 4px; font-size: 0.9em; border: 1px solid #dbeafe; }

/* === TABLE OF CONTENTS (Revised for spacing and numbering) === */
.bold-toc {
    background: var(--brand-blue-light);
    border: 1px solid #bce0ff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    margin: 30px 0;
    overflow: hidden;
}
.bold-toc h2 {
    font-size: 1.3em;
    color: #fff;
    background-color: var(--brand-blue-dark);
    margin: 0;
    padding: 20px 25px;
    border-bottom: none;
}
/* Main list (1, 2, 3...) */
.bold-toc > ul {
    list-style-type: decimal;
    list-style-position: outside;
    margin: 0;
    padding: 20px 25px 20px 40px; /* Provides space for the numbers */
    background-color: var(--brand-blue-light);
}
/* Nested list (a, b, c...) */
.bold-toc ul ul {
    list-style-type: lower-alpha;
    list-style-position: outside;
    margin: 8px 0 8px 0; /* Tighter vertical spacing */
    padding-left: 20px; /* Indents the nested list */
    background-color: transparent;
}
/* All list items */
.bold-toc li {
    margin-bottom: 6px; /* Reduced spacing between all items */
    padding-left: 5px;
}
.bold-toc a {
    text-decoration: none;
    color: #334155;
    font-weight: 500;
}
/* Nested list links */
.bold-toc ul ul li a {
    font-weight: 500;
    font-size: 0.95em;
}


/* === EXPERT INSIGHT BOX === */
.expert-insight-tabbed { margin: 2em 0; border-radius: 12px; background-color: #f3f4f6; border: 1px solid var(--brand-blue-dark); box-shadow: 0 2px 5px rgba(0,0,0,0.05); overflow: hidden; }
.expert-insight-tabbed .expert-insight-header { background-color: var(--brand-blue-medium); padding: 10px 20px; }
.expert-insight-tabbed .expert-insight-title { font-weight: 700; font-size: 1.1em; color: #fff; margin: 0; line-height: 1.4; } 
.expert-insight-tabbed .expert-insight-content { padding: 20px 25px; font-size: 0.95em; color: var(--text-dark); border-top: 1px solid var(--brand-blue-dark); }
.expert-insight-tabbed .expert-insight-content p:last-child { margin-bottom: 0; }
.expert-insight-tabbed .expert-insight-content code { font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; background-color: #eef2f9; padding: 2px 5px; border-radius: 4px; font-size: 0.9em; border: 1px solid #dbeafe; }

/* === AUTHOR BOX === */
.author-box { display: flex; align-items: flex-start; gap: 20px; margin-top: 60px; padding: 25px; background: var(--brand-blue-light); border-radius: 12px; }
.author-box .avatar img { width: 96px; height: 96px; border-radius: 50%; border: 2px solid #3b82f6; }
.author-summary { flex: 1; }
.author-summary .author-title { font-size: 1.4em; font-weight: 700; margin: 0 0 5px 0; color: var(--text-dark); }
.author-summary .author-description { margin: 0; font-size: 1em; color: #555; }
.author-summary a { color: #0056b3; font-weight: bold; }
.author-summary a:hover { text-decoration: underline; }

/* === FOOTER === */
.full-width-footer { text-align: center; padding: 30px 20px; margin-top: 50px; font-size: 0.9em; color: var(--text-light); border-top: 1px solid var(--brand-border); background-color: #ffffff; }
.full-width-footer .footer-bar { margin-bottom: 15px; }
.full-width-footer .footer-bar ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 20px; }
.full-width-footer a { color: #007bff; }

/* === EXTERNAL LINK ICON === */
.article-body a[target="_blank"]::after { content: ' ↗'; display: inline-block; margin-left: 3px; font-size: 0.9em; color: #777; text-decoration: none; }

/* === TABLE STYLES === */
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { border: 1px solid #ddd; padding: 12px; text-align: left; }
th { background-color: #f2f2f2; font-weight: 600; }

/* === CTA CONTAINER (From Pillar) === */
.cta-container { text-align: center; padding: 30px; background: #0056b3; border-radius: 12px; color: #fff; }
.cta-container h2 { color: #fff; font-size: 1.8em; margin-bottom: 10px; }
.cta-button { display: inline-block; background: #22c55e; color: #fff; padding: 15px 30px; font-size: 1.2em; text-decoration: none; border-radius: 50px; font-weight: bold; transition: background 0.3s ease; }
.cta-button:hover { background: #16a34a; }

/* === FAQ SECTION (From new file) === */
.faq-section {
    background-color: #e0f2fe;
    padding: 40px;
    border-radius: 12px;
    margin-top: 60px;
}
.faq-section h2 {
    border-bottom: none;
    text-align: center;
}
.faq-list .faq-item {
    background: #fff;
    padding: 25px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.faq-question {
    font-size: 1.1em;
    font-weight: bold;
    color: #0056b3;
    margin: 0; /* Removed bottom margin */
    cursor: pointer; 
    position: relative;
    padding-right: 30px; 
}
.faq-question::after {
    content: '+';
    font-family: monospace;
    font-size: 1.8em;
    font-weight: bold;
    color: #007bff;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}
.faq-question.active::after {
    content: '−';
}
.faq-answer {
    color: #555;
    line-height: 1.5;
    padding-top: 10px;
    margin: 0; /* Reset margin */
}
.faq-answer p {
     font-size: 1em; /* Match body font size */
     margin-bottom: 0;
}
/* === END FAQ === */


/* === RESPONSIVE STYLES === */
@media (max-width: 768px) {
    .full-width-header { padding: 15px 20px; flex-direction: column; gap: 15px; height: auto; }
    .header-nav ul { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .breadcrumbs-container { padding: 0 20px; }
    .container { padding: 20px; margin: 15px; }
    .article-header h1 { font-size: 2.2em; }
    .article-header .article-meta { font-size: 0.85em; }
    .article-body h2 { font-size: 1.8em; }
    .article-body h3 { font-size: 1.4em; }
    .author-box { flex-direction: column; align-items: center; text-align: center; }

    .hero-search { padding: 60px 20px; }
    .hero-search h1 { font-size: 2.2em; }
    .hero-search .lead-text { font-size: 1.1em; }
    .search-box { flex-direction: column; align-items: stretch; max-width: 90%; }
    .search-box input[type="text"] { border-radius: 50px; margin-bottom: 15px; text-align: center; border-right: 1px solid #e9ecef; }
    .search-box button { border-radius: 50px; }
    .search-tabs { flex-wrap: wrap; }
    .search-tab { padding: 10px 15px; font-size: 0.9em; }

    .cta-container { padding: 20px; }
    .cta-container h2 { font-size: 1.5em; } /* Adjusted from h3 */
    
    .faq-section { padding: 20px; }
}

/*
 * =========================================
 * New Note Box Style (Orange Theme)
 * =========================================
 * This styles the 'note-style-orange' class
 * when added to the 'expert-insight-tabbed' box.
 */

.expert-insight-tabbed.note-style-orange {
    border-radius: 12px;
    background-color: #fffaf0; /* Very light cream/orange */
    margin: 2.5em 0;
    border: 1px solid #ffe0b3; /* Light orange border */
    overflow: hidden; /* Keeps the header inside the rounded corners */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.expert-insight-tabbed.note-style-orange .expert-insight-header {
    background-color: #fd9800; /* Bright orange from your example */
    padding: 12px 20px;
    border-bottom: 1px solid #e68900; /* Darker orange for depth */
}

.expert-insight-tabbed.note-style-orange .expert-insight-title {
    font-weight: 700;
    font-size: 1.1em;
    color: #ffffff; /* White text */
    margin: 0;
}

.expert-insight-tabbed.note-style-orange .expert-insight-content {
    padding: 20px;
}

.expert-insight-tabbed.note-style-orange .expert-insight-content p {
    margin: 0;
    line-height: 1.6;
    color: #222; /* Dark text for readability */
}

/*
 * =========================================
 * New Note Box Style (Purple Theme)
 * =========================================
 */

.expert-insight-tabbed.note-style-purple {
    border-radius: 12px;
    background-color: #f4f0ff; /* Very light purple */
    margin: 2.5em 0;
    border: 1px solid #3A008C; /* Dark purple border */
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.expert-insight-tabbed.note-style-purple .expert-insight-header {
    background-color: #4C00B0; /* Dark Purple */
    padding: 12px 20px;
    border-bottom: 1px solid #3A008C; /* Slightly darker purple for depth */
}

.expert-insight-tabbed.note-style-purple .expert-insight-title {
    font-weight: 700;
    font-size: 1.1em;
    color: #ffffff; 
    margin: 0;
}

.expert-insight-tabbed.note-style-purple .expert-insight-content {
    padding: 20px;
}

.expert-insight-tabbed.note-style-purple .expert-insight-content p {
    margin: 0;
    line-height: 1.6;
    color: #222; 
}


/* --- Styles for New BLUE Stats Block --- */

/* New blue color style for the "note" box */
.note-style-blue {
    background-color: #f5f9ff; /* Light blue background */
    border: 1px solid #0056b3; /* 3px solid border using the header color */
}

/* Grid for the 3 key stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
    text-align: center;
}
.stat-item {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #0056b3; /* Primary blue number */
    line-height: 1.2;
}
.stat-label {
    font-size: 0.95em;
    color: #333;
    margin-top: 10px;
}
.stat-label strong {
    color: #000;
}

/* Simple HTML/CSS Bar Chart */
.bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    border-left: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
    padding-left: 10px;
    padding-bottom: 5px;
}
.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 18%;
    position: relative;
}
.bar-label {
    font-size: 0.9em;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}
.bar {
    width: 80%;
    background-color: #0056b3; /* Primary blue bar color */
    border-radius: 5px 5px 0 0;
    color: #fff;
    font-weight: bold;
    font-size: 0.9em;
    padding-top: 8px;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

/* Tooltip on hover */
.bar:hover::after {
    content: attr(data-value);
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
}
.bar:hover {
    opacity: 0.85;
}

/* Media query for smaller screens */
@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .bar {
        font-size: 0.8em;
    }
    .bar-item {
        width: 19%;
    }
}

/* --- Style for Chart Source Credit --- */
.chart-source {
    text-align: center;
    font-size: 0.9em;
    margin-bottom: 25px;
    color: #555; /* Muted color for the data source */
    }
.chart-source strong {
    color: #0056b3; /* Your brand color for the credit */
    font-weight: 600;
}
/* ========================================= */
/* === NEW PRO TIP BOX STYLE (Orange Theme) === */
/* ========================================= */
.pro-tip-box-orange {
    margin: 25px 0;
    border-radius: 12px;
    background-color: #fff7ed; /* Light Orange/Cream background */
    border: 1px solid #f97316; /* Orange border */
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.pro-tip-box-orange .pro-tip-header {
    background-color: #f97316; /* Bold Orange Header */
    padding: 12px 20px;
}
.pro-tip-box-orange .pro-tip-title {
    font-weight: 700;
    font-size: 1.1em;
    color: #ffffff; 
    margin: 0;
    line-height: 1.4;
}
.pro-tip-box-orange .pro-tip-content {
    padding: 20px 25px;
    font-size: 0.95em;
    color: var(--text-dark);
}
.pro-tip-box-orange .pro-tip-content p {
    margin: 0;
    line-height: 1.6;
    color: #222; 
}
/* ========================================= */
/* === IMAGE CAPTION STYLES (FIGCAPTION) === */
/* ========================================= */
.article-body figure figcaption {
    /* Ensures the caption is visible, centered, and readable */
    display: block; 
    text-align: center;
    font-size: 0.9em; /* Slightly smaller than body text */
    color: var(--text-light); /* Gray color for subtle look */
    margin-top: 10px; /* Space between image and caption */
    padding: 0 10px;
}


/* ========================================= */
/* === NEW STATS BOX STYLE (.stats-box) - FINAL VERSION === */
/* ========================================= */
.stats-box {
    margin: 30px 0;
    border-radius: 12px;
    background-color: #f7f9fc; /* Light background to visually contain the inner cards */
    border: 2px solid #334155; /* Dark border for emphasis */
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}
.stats-box .stats-header {
    background-color: #334155; /* Dark gray/slate background */
    padding: 15px 20px;
    text-align: center;
}
.stats-box .stats-title {
    font-weight: 700;
    font-size: 1.5em;
    color: #ffffff; /* White text */
    margin: 0;
}
.stats-box .stats-grid {
    display: flex;
    justify-content: space-around;
    align-items: stretch; /* Ensures boxes stretch to same height */
    padding: 20px; /* Increased outer padding */
    gap: 20px; /* Increased gap between boxes */
}
/* This is the corrected inner card style */
.stats-box .stat-item {
    flex: 1;
    text-align: center;
    
    /* NEW: Clear border and background for definition */
    border: 1px solid #e2e2e2; 
    border-radius: 8px;
    background-color: #fff;
    padding: 20px 10px; /* Adjust padding for inner content */
    
    /* Resetting the default dash divider properties */
    border-right: 1px solid #e2e2e2;
}

/* Ensures the last item still has its border defined, but not separated by a dash */
.stats-box .stat-item:last-child {
    /* No need for special border treatment on last-child in this solid box setup */
    border-right: 1px solid #e2e2e2; 
}
.stats-box .stat-number {
    font-weight: 900;
    font-size: 2.2em;
    color: #cc293d; /* Bold Red color for impact */
    line-height: 1.1;
    margin-bottom: 5px;
}
.stats-box .stat-label {
    font-size: 0.9em;
    color: #555;
    line-height: 1.3;
}
.stats-box .stat-source {
    display: block;
    font-size: 0.75em;
    color: #888;
    margin-top: 10px;
    padding: 0 20px 15px 20px;
    text-align: right;
    border-top: 1px solid #f0f9ff;
}
.stats-box .stat-source a {
    color: #334155;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .stats-box .stats-grid {
        flex-direction: column;
        gap: 10px; /* Smaller gap on mobile */
    }
    .stats-box .stat-item {
        border-right: 1px solid #e2e2e2;
        border-bottom: 1px solid #e2e2e2; /* Solid bottom border for stacked mobile view */
    }
    .stats-box .stat-item:last-child {
        border-bottom: 1px solid #e2e2e2; /* Ensure bottom border is present */
    }
}

/* ===========================
   Accessibility fixes
   =========================== */

/* Darker muted text for data source line in stats box */
.stats-box .stat-source {
    color: #4b5563; /* darker slate for better contrast on light bg */
}

/* Make footer links darker and underlined (no color-only links) */
.full-width-footer a {
    color: #0044aa;        /* darker blue for contrast on white */
    text-decoration: underline;
    font-weight: 600;
}

/* Make author links clearly distinguishable, not color-only */
.author-summary a {
    color: #0044aa;
    text-decoration: underline;
}

/* Strengthen orange pro-tip header contrast */
.pro-tip-box-orange .pro-tip-header {
    background-color: #c05621; /* darker orange for white text contrast */
}

.pro-tip-box-orange .pro-tip-title {
    color: #ffffff;        /* keep white text, now on darker orange */
}

/* Author name link: make it clearly a link */
.article-meta a {
    color: #0044aa;           /* darker blue for contrast */
    text-decoration: underline;
    font-weight: 600;         /* a bit bolder so it stands out */
}

.article-meta a:hover,
.article-meta a:focus {
    text-decoration: underline;
}

