/**
 * Blog Content Styles
 *
 * Markdown article content styling only.
 * Wrapper class: .blog-article-content
 *
 * For page layout (comments, author bio, navigation), see blog-layout.css
 */

/* ==========================================================================
   BASE
   Wrapper for all blog content.
   Usage: <div class="blog-article-content">...</div>
   ========================================================================== */

.blog-article-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 40px 60px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Optional inner container for card-style posts
   Usage: <div class="blog-article-content"><div class="container">...</div></div>
*/
.blog-article-content .container {
    background: white;
    padding: 40px 60px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ==========================================================================
   TYPOGRAPHY
   Standard heading and text styles.
   Usage: Just use <h2>, <h3>, <h4>, <p>, <ul>, <ol> inside .blog-article-content
   ========================================================================== */

.blog-article-content h2 {
    color: #34495e;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.blog-article-content h3 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.4em;
}

.blog-article-content h4 {
    color: #34495e;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.blog-article-content p {
    margin-bottom: 18px;
    text-align: justify;
    font-size: 1.05em;
}

.blog-article-content strong {
    color: #2c3e50;
}

.blog-article-content a {
    color: #3498db;
    text-decoration: none;
}

.blog-article-content a:hover {
    text-decoration: underline;
}

.blog-article-content ul,
.blog-article-content ol {
    margin-bottom: 18px;
    font-size: 1.05em;
    margin-left: 2em;
    list-style-position: outside;
    padding-left: 1em;
}

.blog-article-content ul {
    list-style-type: disc;
}

.blog-article-content ol {
    list-style-type: decimal;
}

.blog-article-content li {
    margin-bottom: 10px;
}

/* ==========================================================================
   CODE BLOCKS
   ========================================================================== */

.blog-article-content code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.9em;
}

.blog-article-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.blog-article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ==========================================================================
   BLOCKQUOTES
   ========================================================================== */

.blog-article-content blockquote {
    border-left: 3px solid #1a1a1a;
    background: transparent;
    padding: 0 0 0 1.5rem;
    margin: 2rem 0;
    border-radius: 0;
    font-style: italic;
    font-size: 1.25rem;
    color: #6B6B6B;
    line-height: 1.6;
}

/* ==========================================================================
   CAPTIONS
   For images, charts, figures.
   Usage: <p class="caption">Figure 1: Description</p>
   Or:    <figcaption>Description</figcaption>
   ========================================================================== */

.blog-article-content .caption,
.blog-article-content figcaption {
    font-size: 0.85em;
    color: #475569;
    font-style: italic;
    text-align: center;
    margin-top: 4px;
    font-weight: 400;
}

/* Only image-related captions need the inset -- they sit below hero-wide
   <div class="image-container"> blocks that break out of the prose column
   by 60px each side, so the caption pads back in to align with the prose.
   Chart captions (after .chart-card) and other captions stay at prose
   width and read comfortably. */
.blog-article-content .image-container + .caption,
.blog-article-content figure.blog-image figcaption {
    padding: 0 60px;
}

/* ==========================================================================
   CALLOUT BLOCKS
   Highlighted sections for key content.

   .intro - Opening summary/hook
   Usage: <div class="intro">Key takeaway or article summary...</div>

   .highlight - Positive callout (green)
   Usage: <div class="highlight">Important success point...</div>

   .note - Warning/attention callout (yellow)
   Usage: <div class="note">Caveat or important note...</div>
   ========================================================================== */

.blog-article-content .intro {
    font-size: 1.2em;
    color: #475569;
    font-style: italic;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #ecf0f1;
    border-left: 4px solid #3498db;
}

.blog-article-content .highlight {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    padding: 20px;
    margin: 25px 0;
    font-size: 1.15em;
    font-style: italic;
}

.blog-article-content .note {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 25px 0;
    font-size: 1.05em;
}

/* ==========================================================================
   MARKDOWN SHORTCODE CALLOUTS
   Generated by [callout:type]...[/callout] shortcodes
   ========================================================================== */

.blog-callout {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    border-left: 4px solid;
}

.blog-callout .callout-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
}

.blog-callout .callout-content {
    flex: 1;
}

.blog-callout .callout-content p:last-child {
    margin-bottom: 0;
}

.blog-callout-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.blog-callout-info .callout-icon {
    background: #3b82f6;
    color: white;
}

.blog-callout-warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.blog-callout-warning .callout-icon {
    background: #f59e0b;
    color: white;
}

.blog-callout-tip {
    background: #ecfdf5;
    border-left-color: #10b981;
}

.blog-callout-tip .callout-icon {
    background: #10b981;
    color: white;
}

.blog-callout-note {
    background: #f3f4f6;
    border-left-color: #6b7280;
}

.blog-callout-note .callout-icon {
    background: #6b7280;
    color: white;
}

/* ==========================================================================
   CTA (Call to Action)
   Prominent action block with button.
   Usage:
   <div class="cta">
       <p>Ready to try it yourself?</p>
       <a href="/calculator" class="cta-button">Try the Calculator</a>
   </div>
   ========================================================================== */

.blog-article-content .cta {
    background-color: #ecf0f1;
    border-left: 4px solid #2874a6;
    padding: 15px 25px;
    margin: 35px 0;
    border-radius: 8px;
}

.blog-article-content .cta h2 {
    margin-top: 0;
}

.blog-article-content .cta p:last-child {
    margin-bottom: 0;
}

.blog-article-content .cta-button,
.blog-cta-button {
    display: inline-block;
    background-color: #2874a6;
    color: white !important;
    padding: 15px 40px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1em;
    margin: 10px 0;
    text-align: center;
    transition: background-color 0.2s ease;
}

.blog-article-content .cta-button:hover,
.blog-cta-button:hover {
    background-color: #1a5276;
    text-decoration: none;
}

/* Wrapper for standalone CTA buttons - centers them */
.blog-cta-wrapper {
    text-align: center;
    margin: 25px 0;
}

/* CTA Box - Full promotional section with heading, text, and button
   Usage: [ctabox]### Heading\n\nText\n\n[cta:Button url="/"][/ctabox]
*/
.blog-cta-box {
    background: linear-gradient(135deg, #ecf0f1 0%, #d4e6f1 100%);
    padding: 30px 40px;
    margin: 35px 0;
    border-radius: 12px;
    text-align: center;
}

.blog-cta-box h2,
.blog-cta-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1e3a5f;
}

.blog-cta-box p {
    text-align: center;
    margin-bottom: 20px;
    color: #475569;
}

.blog-cta-box .blog-cta-button {
    display: inline-block;
}

/* CTA variants used in legacy blog content */
.blog-article-content .cta-link,
.blog-article-content .cta-small,
.blog-article-content .cta-medium,
.blog-article-content .cta-large {
    text-align: center;
    margin: 25px 0;
}

.blog-article-content .cta-small,
.blog-article-content .cta-medium,
.blog-article-content .cta-large {
    background: linear-gradient(135deg, #ecf0f1 0%, #d4e6f1 100%);
    padding: 25px 35px;
    border-radius: 12px;
}

.blog-article-content .cta-large {
    padding: 35px 45px;
    margin: 40px 0;
}

.blog-article-content .cta-small h3,
.blog-article-content .cta-medium h3,
.blog-article-content .cta-large h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1e3a5f;
}

.blog-article-content .cta-small p,
.blog-article-content .cta-medium p,
.blog-article-content .cta-large p {
    text-align: center;
    margin-bottom: 15px;
    color: #475569;
}

.blog-article-content .cta-small .subtext,
.blog-article-content .cta-medium .subtext,
.blog-article-content .cta-large .subtext {
    font-size: 0.85em;
    color: #6b7280;
    margin-top: 10px;
    margin-bottom: 0;
}

/* ==========================================================================
   IMAGES
   Centered image with optional shadow.
   Usage:
   <div class="image-container">
       <img src="path/to/image.png" alt="Description">
   </div>
   <p class="caption">Figure 1: Description</p>
   ========================================================================== */

.blog-article-content .image-container {
    width: calc(100% + 120px);
    margin: 30px -60px;
    text-align: center;
}

.blog-article-content .image-container img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Markdown shortcode images */
.blog-image {
    display: block;
    width: calc(100% + 120px);
    max-width: none;
    margin: 2rem -60px;
    height: auto;
    border-radius: 8px;
}

figure.blog-image {
    width: calc(100% + 120px);
    margin: 2rem -60px;
}

figure.blog-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

figure.blog-image figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #6B6B6B;
    margin-top: 0.75rem;
    padding: 0 60px;
    font-style: italic;
}

/* ==========================================================================
   CHARTS (Plotly)
   Container for interactive charts.
   Usage:
   <div class="chart-card">
       <div id="figure_1" class="chart-figure"></div>
   </div>
   <p class="caption">Figure 1: Description</p>

   With optional title/subtitle:
   <div class="chart-card">
       <p class="chart-title">Chart Title</p>
       <p class="subtitle">Optional subtitle</p>
       <div id="figure_1" class="chart-figure"></div>
   </div>
   ========================================================================== */

.blog-article-content .chart-card {
    width: calc(100% + 120px);
    margin: 20px -60px 8px -60px;
}

.blog-article-content .chart-card .chart-title {
    margin: 0 0 8px 0;
    padding: 0 60px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.blog-article-content .chart-card .subtitle {
    margin: 0 0 16px 0;
    padding: 0 60px;
    color: #475569;
    font-size: 12px;
    text-align: center;
}

.blog-article-content .chart-card .chart-figure {
    width: 100%;
}

/* Markdown shortcode chart containers */
.blog-chart-container {
    width: calc(100% + 120px);
    margin: 2rem -60px;
    height: 500px;
}

/* Optional metadata footer inside chart card
   Usage: <p class="chart-metadata">Data source: <a href="...">Link</a></p>
*/
.blog-article-content .chart-card .chart-metadata {
    margin-top: 16px;
    padding: 16px 60px 0 60px;
    border-top: 1px solid #e5e7eb;
    font-size: 11px;
    color: #475569;
    text-align: center;
}

.blog-article-content .chart-card .chart-metadata a {
    color: #2563eb;
    text-decoration: none;
}

.blog-article-content .chart-card .chart-metadata a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   CHART CONTROLS
   Interactive buttons for chart filtering/sorting.
   Usage:
   <div class="chart-controls">
       <span class="control-label">Sort by:</span>
       <button class="sort-button active">Value</button>
       <button class="sort-button">Name</button>
   </div>
   ========================================================================== */

.blog-article-content .chart-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.blog-article-content .control-label {
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.blog-article-content .sort-button {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-article-content .sort-button:hover {
    border-color: #3498db;
    color: #3498db;
}

.blog-article-content .sort-button.active {
    background: #2874a6;
    color: white;
    border-color: #2874a6;
}

/* ==========================================================================
   TABLES
   Styled comparison tables with headers and zebra stripes.
   Usage: Standard <table> markup from markdown
   ========================================================================== */

.blog-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.95em;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.blog-article-content th,
.blog-article-content td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.blog-article-content th {
    background-color: #2874a6;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.blog-article-content tbody tr:nth-child(odd) {
    background-color: #f8fafc;
}

.blog-article-content tbody tr:nth-child(even) {
    background-color: white;
}

.blog-article-content tbody tr:hover {
    background-color: #e0f2fe;
}

.blog-article-content td:first-child {
    font-weight: 500;
    color: #1e3a5f;
}

/* Right-align numeric columns (all columns except first) */
.blog-article-content td:not(:first-child) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.blog-article-content th:not(:first-child) {
    text-align: right;
}

.blog-article-content tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   TAKEAWAYS / KEY FINDINGS
   Prominent key findings section with styled list items.
   Usage: [takeaways]...[/takeaways] shortcode
   ========================================================================== */

.blog-takeaways {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    color: #1e3a5f;
    padding: 30px 35px;
    border-radius: 12px;
    margin: 30px 0;
    border-left: 4px solid #2874a6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.blog-takeaways h2,
.blog-takeaways h3 {
    color: #1e3a5f;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4em;
    border-bottom: 2px solid #2874a6;
    padding-bottom: 12px;
}

.blog-takeaways ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.blog-takeaways li {
    position: relative;
    padding: 12px 0 12px 35px;
    border-bottom: 1px solid rgba(40, 116, 166, 0.15);
    font-size: 1.05em;
    line-height: 1.5;
}

.blog-takeaways li:last-child {
    border-bottom: none;
}

.blog-takeaways li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 12px;
    width: 24px;
    height: 24px;
    background: #2874a6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: bold;
}

.blog-takeaways strong {
    color: #1e3a5f;
}

.blog-takeaways a {
    color: #2874a6;
}

.blog-takeaways a:hover {
    color: #1e3a5f;
}

/* ==========================================================================
   REFERENCES (Collapsible)
   Sources and citations section with dropdown/accordion behavior.
   Usage: [references]...[/references] shortcode
   Uses HTML5 <details>/<summary> for native collapsible functionality.
   ========================================================================== */

.blog-references {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 40px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #f59e0b;
    overflow: hidden;
}

.blog-references summary {
    padding: 20px 30px;
    font-size: 1.1em;
    font-weight: 600;
    color: #1e3a5f;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fef3c7;
    border-bottom: 1px solid transparent;
    transition: background-color 0.2s ease;
}

.blog-references summary::-webkit-details-marker {
    display: none;
}

.blog-references summary::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid #d97706;
    border-bottom: 2px solid #d97706;
    transform: rotate(-45deg);
    transition: transform 0.3s ease;
    margin-left: 16px;
    flex-shrink: 0;
}

.blog-references[open] summary::after {
    transform: rotate(45deg);
}

.blog-references summary:hover {
    background-color: #fde68a;
}

.blog-references[open] summary {
    border-bottom: 1px solid #e5e7eb;
}

.blog-references .references-content {
    padding: 24px 30px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-references h2,
.blog-references h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.15em;
    color: #34495e;
}

.blog-references h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1em;
    color: #475569;
    font-weight: 600;
}

.blog-references ul {
    list-style-type: none;
    padding-left: 0;
    margin-left: 0;
    margin-bottom: 16px;
}

.blog-references li {
    padding: 8px 0;
    font-size: 0.95em;
    border-bottom: 1px solid #f1f5f9;
}

.blog-references li:last-child {
    border-bottom: none;
}

.blog-references a {
    color: #2563eb;
    text-decoration: none;
}

.blog-references a:hover {
    text-decoration: underline;
}

.blog-references p {
    margin-bottom: 12px;
    font-size: 0.95em;
    color: #4b5563;
}

/* ==========================================================================
   FAQ ACCORDION
   Expandable Q&A section. Visually mirrors blog-references but uses one
   <details> per question (stacked) with a sky-blue accent so readers can
   distinguish FAQ from References at a glance.
   Usage: [faq]...[/faq] shortcode (questions are H3, answers are prose).
   ========================================================================== */

.blog-faq {
    margin-top: 40px;
}

.blog-faq-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #0ea5e9;
    overflow: hidden;
}

.blog-faq-item summary {
    padding: 16px 24px;
    font-size: 1.05em;
    font-weight: 600;
    color: #1e3a5f;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #e0f2fe;
    border-bottom: 1px solid transparent;
    transition: background-color 0.2s ease;
}

.blog-faq-item summary::-webkit-details-marker {
    display: none;
}

.blog-faq-item summary::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid #0284c7;
    border-bottom: 2px solid #0284c7;
    transform: rotate(-45deg);
    transition: transform 0.3s ease;
    margin-left: 16px;
    flex-shrink: 0;
}

.blog-faq-item[open] summary::after {
    transform: rotate(45deg);
}

.blog-faq-item summary:hover {
    background-color: #bae6fd;
}

.blog-faq-item[open] summary {
    border-bottom: 1px solid #e5e7eb;
}

.blog-faq-item .faq-answer {
    padding: 20px 24px;
    animation: slideDown 0.3s ease-out;
}

.blog-faq-item .faq-answer p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #334155;
    font-size: 0.97em;
}

.blog-faq-item .faq-answer p:last-child {
    margin-bottom: 0;
}

.blog-faq-item .faq-answer a {
    color: #2563eb;
    text-decoration: none;
}

.blog-faq-item .faq-answer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   DISCLAIMER
   End-of-article disclaimer for data sources and legal notice.
   Usage: [disclaimer] shortcode
   ========================================================================== */

.blog-disclaimer {
    margin-top: 40px;
    padding: 16px 20px;
    background-color: #f8f9fa;
    border-left: 3px solid #9ca3af;
    border-radius: 4px;
    font-size: 0.8em;
    color: #6b7280;
    line-height: 1.5;
}

.blog-disclaimer strong {
    color: #4b5563;
}

/* ==========================================================================
   FOOTER
   End-of-article section.
   Usage: <div class="footer">About the author...</div>
   ========================================================================== */

.blog-article-content .footer {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #ddd;
    font-size: 0.95em;
    color: #475569;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1200px) {
    .blog-article-content {
        max-width: 100%;
    }
    .blog-article-content .container {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .blog-article-content .container {
        padding: 20px;
    }

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

    /* Callout boxes stack on mobile */
    .blog-callout {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media print {
    .blog-article-content .chart-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* Mailing List Shortcode */
.blog-email-capture {
    background: linear-gradient(135deg, #0f4c3a 0%, #1a6b50 100%);
    color: white;
    border-radius: 12px;
    padding: 40px;
    margin: 48px 0;
    text-align: center;
}
.blog-email-capture h3 {
    color: white;
    margin: 0 0 16px 0;
    font-size: 1.5rem;
}
.blog-email-capture > p {
    font-size: 1.05rem;
    opacity: 0.95;
    margin-bottom: 24px;
}
.blog-email-capture .email-benefits {
    text-align: left;
    max-width: 500px;
    margin: 16px auto;
    list-style: none;
    padding: 0;
}
.blog-email-capture .email-benefits li {
    padding: 6px 0 6px 28px;
    position: relative;
    color: rgba(255,255,255,0.95);
}
.blog-email-capture .email-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
}
.blog-email-capture .form-row {
    display: flex;
    gap: 12px;
    max-width: 450px;
    margin: 20px auto 0;
    flex-wrap: wrap;
    justify-content: center;
}
.blog-email-capture input[type="email"] {
    flex: 1;
    min-width: 250px;
    padding: 14px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    color: white;
}
.blog-email-capture input[type="email"]::placeholder {
    color: rgba(255,255,255,0.7);
}
.blog-email-capture button {
    background: white;
    color: #0f4c3a;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}
.blog-email-capture button:hover {
    background: #f0f0f0;
}
.blog-email-capture .email-disclaimer {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 16px;
    text-align: center;
}
.blog-email-capture .form-message {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
}
.blog-email-capture .form-message.success {
    background: rgba(255,255,255,0.2);
}
.blog-email-capture .form-message.error {
    background: rgba(255,100,100,0.3);
}

/* Mobile responsive for mailing list */
@media (max-width: 768px) {
    .blog-email-capture {
        padding: 24px 20px;
        margin: 32px 0;
    }
    .blog-email-capture h3 {
        font-size: 1.25rem;
    }
    .blog-email-capture .form-row {
        flex-direction: column;
    }
    .blog-email-capture input[type="email"] {
        min-width: unset;
        width: 100%;
    }
    .blog-email-capture button {
        width: 100%;
    }
}

/* ==========================================================================
   INFOGRAPHIC DOWNLOAD
   Downloadable infographic box for advisors and readers.
   Usage: [infographic pdf="/path/to/file.pdf" title="Infographic Title"]
   ========================================================================== */

.blog-infographic-download {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 28px 32px;
    margin: 32px 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-infographic-download:hover {
    border-color: #64748b;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.15);
}

.blog-infographic-download .infographic-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: #64748b;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.blog-infographic-download .infographic-content {
    flex: 1;
    text-align: center;
}

.blog-infographic-download .infographic-title {
    margin: 0 0 12px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e3a5f;
}

.blog-infographic-download .infographic-button {
    display: inline-block;
    background: #334155;
    color: white !important;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.blog-infographic-download .infographic-button:hover {
    background: #1e293b;
    text-decoration: none;
}

/* Mobile responsive for infographic download */
@media (max-width: 768px) {
    .blog-infographic-download {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    .blog-infographic-download .infographic-icon {
        width: 56px;
        height: 56px;
    }

    .blog-infographic-download .infographic-icon svg {
        width: 32px;
        height: 32px;
    }

    .blog-infographic-download .infographic-button {
        width: 100%;
        text-align: center;
    }
}


/* ==========================================================================
   TABLE OF CONTENTS
   Auto-injected by markdown_utils.inject_toc when a post has 3+ H2s.
   ========================================================================== */

.blog-toc {
    background: #f5f5f0;
    border-left: 4px solid #b08d57;
    padding: 18px 24px 14px;
    margin: 0 0 32px 0;
    border-radius: 0 4px 4px 0;
}

.blog-toc-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b6b6b;
    margin: 0 0 10px 0;
}

.blog-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-toc-list li {
    padding: 4px 0 4px 14px;
    line-height: 1.4;
    position: relative;
}

.blog-toc-list li::before {
    /* Subtle bullet -- avoids fighting with headings that already carry
       their own numbering (e.g. "Part 1", "Part 2"). */
    content: "›";
    color: #b08d57;
    position: absolute;
    left: 0;
    top: 4px;
    font-weight: 600;
}

.blog-toc-list a {
    color: #2c2c2c;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.blog-toc-list a:hover,
.blog-toc-list a:focus {
    border-bottom-color: #b08d57;
}

@media (max-width: 768px) {
    .blog-toc {
        padding: 14px 16px 10px;
        margin-bottom: 24px;
    }
    .blog-toc-title {
        font-size: 0.72rem;
    }
}


/* TOC enhancements: smooth scroll, sticky-header offset, active-section state.
   The IntersectionObserver in detail.html applies .blog-toc-active to the
   currently-visible H2's link.
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

.blog-article-content h2 {
    /* Account for the sticky site header (~64px) so anchor jumps don't
       hide the heading under it. */
    scroll-margin-top: 80px;
}

.blog-toc-list a.blog-toc-active {
    color: #b08d57;
    font-weight: 600;
    border-bottom-color: #b08d57;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
