/* ========================================
   ARTICLE-SPECIFIC STYLES
   ======================================== */

:root {
    /* Brand palette - these were referenced throughout this file but never
       defined, which left every article hero transparent with white text. */
    --primary: #002B5C;
    --primary-dark: #001a3d;
    --primary-light: #1a5490;
    --accent-gold: #C9A227;
    --accent-red: #A3242B;
    --text-dark: #1f2733;
    --text-body: #3d4756;
    --text-light: #6b7686;
    --border: #e6e9ee;
    --bg-soft: #f8f9fa;

    --article-width: 900px;
    --sidebar-width: 350px;
    --gutter: 40px;
    --line-height-loose: 1.8;
}

/* ========================================
   ARTICLE HERO SECTION
   ======================================== */

.article-hero {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(0, 43, 92, 0.8) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    margin-top: 60px;
}

.article-hero .container {
    max-width: 900px;
}

.article-header {
    max-width: 800px;
    margin: 0 auto;
}

.article-category-badge {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.article-hero h1 {
    font-family: 'Merriweather', serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin: 20px 0 30px;
    color: white;
}

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

.article-meta-hero {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    font-size: 14px;
    opacity: 0.95;
}

.author-info strong {
    font-weight: 600;
}

.date-info time {
    display: block;
}

.read-time-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========================================
   TABLE OF CONTENTS
   ======================================== */

.table-of-contents {
    position: fixed;
    right: 20px;
    top: 150px;
    width: 250px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    font-size: 13px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 100;
}

.table-of-contents h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary);
}

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

.toc-nav li {
    margin: 8px 0;
}

.toc-nav a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s ease;
    padding-left: 10px;
    border-left: 2px solid transparent;
}

.toc-nav a:hover {
    color: var(--primary);
    border-left-color: var(--accent-gold);
    padding-left: 15px;
}

@media (max-width: 1200px) {
    .table-of-contents {
        display: none;
    }
}

/* ========================================
   ARTICLE BODY & LAYOUT
   ======================================== */

.article-body {
    padding: 60px 20px;
    background: white;
}

.article-body .container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
    max-width: 1300px;
}

.article-content {
    flex: 1;
}

.article-sidebar {
    width: 100%;
}

@media (max-width: 1024px) {
    .article-body .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ========================================
   ARTICLE SECTIONS & TEXT
   ======================================== */

.article-section {
    margin-bottom: 50px;
}

.article-section:first-child {
    margin-top: 0;
}

.article-section h2 {
    font-family: 'Merriweather', serif;
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--primary);
    line-height: 1.3;
}

.article-section h3 {
    font-family: 'Merriweather', serif;
    font-size: 20px;
    font-weight: 700;
    margin: 25px 0 15px;
    color: var(--text-dark);
}

.article-section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 18px;
}

.lead-paragraph {
    font-size: 18px;
    line-height: 1.8;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 4px solid var(--accent-gold);
}

.intro-section {
    background: linear-gradient(to right, rgba(212, 175, 55, 0.05), transparent);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

/* ========================================
   LISTS
   ======================================== */

.article-list,
.article-numbered-list {
    margin: 25px 0 35px 30px;
}

.article-list li,
.article-numbered-list li {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 12px;
    color: var(--text-light);
}

.article-list {
    list-style-type: disc;
}

.article-numbered-list {
    list-style-type: decimal;
}

.article-list li:before {
    color: var(--accent-gold);
}

/* ========================================
   BLOCKQUOTES & SPECIAL TEXT
   ======================================== */

.article-quote {
    background: #f8f9fa;
    border-left: 4px solid var(--accent-gold);
    padding: 25px;
    margin: 35px 0;
    border-radius: 4px;
    font-style: italic;
}

.article-quote p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.article-quote footer {
    font-size: 14px;
    color: var(--text-light);
    font-style: normal;
    margin-top: 12px;
}

/* ========================================
   FAQ ITEMS
   ======================================== */

.faq-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.faq-item h3 {
    color: var(--primary);
    font-size: 16px;
    margin: 0 0 12px 0;
}

.faq-item p {
    margin-bottom: 0;
}

/* ========================================
   KEY TAKEAWAYS
   ======================================== */

.key-takeaways {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(196, 30, 58, 0.05));
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    padding: 30px;
    margin: 40px 0;
}

.key-takeaways h3 {
    color: var(--primary);
    margin-top: 0;
}

.key-takeaways ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.key-takeaways li {
    padding: 10px 0 10px 30px;
    position: relative;
    font-size: 15px;
    line-height: 1.6;
}

.key-takeaways li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-red);
    font-weight: bold;
    font-size: 18px;
}

/* ========================================
   AUTHOR BIO
   ======================================== */

.article-author-bio {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin: 60px 0;
}

.author-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 30px;
    align-items: start;
}

.author-avatar {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    border: 2px solid var(--accent-gold);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info-full h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.author-title {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 10px !important;
}

.author-bio-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px !important;
}

.author-credentials {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.credential {
    font-size: 13px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    color: var(--text-dark);
}

@media (max-width: 600px) {
    .author-card {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ARTICLE TAGS
   ======================================== */

.article-tags {
    margin: 40px 0;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.article-tags h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-tag:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

/* ========================================
   ARTICLE CTA INLINE
   ======================================== */

.article-cta-inline {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(0, 43, 92, 0.9) 100%);
    color: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin: 60px 0;
}

.article-cta-inline h3 {
    color: white;
    font-size: 24px;
    margin-bottom: 12px;
}

.article-cta-inline p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}

/* ========================================
   SIDEBAR BOXES
   ======================================== */

.sidebar-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.sidebar-box h4 {
    font-family: 'Merriweather', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-gold);
}

.quick-facts ul {
    list-style: none;
    padding: 0;
}

.quick-facts li {
    font-size: 14px;
    line-height: 1.6;
    padding: 8px 0;
    color: var(--text-light);
}

.quick-facts strong {
    color: var(--primary);
}

/* ========================================
   RELATED ARTICLES SIDEBAR
   ======================================== */

.related-list {
    list-style: none;
    padding: 0;
}

.related-list li {
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid #d0d0d0;
}

.related-list li:last-child {
    border-bottom: none;
}

.related-list a {
    text-decoration: none;
    display: block;
}

.related-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.related-list a:hover .related-title {
    color: var(--accent-gold);
}

.related-category {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   CTA BOX SIDEBAR
   ======================================== */

.cta-box {
    background: linear-gradient(135deg, rgba(0, 43, 92, 0.05), rgba(212, 175, 55, 0.05));
    border: 2px solid var(--accent-gold);
}

.cta-box p {
    font-size: 14px;
    margin-bottom: 15px;
}

.btn-block {
    width: 100%;
}

.small-text {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 12px !important;
}

/* ========================================
   RESOURCES SIDEBAR
   ======================================== */

.resource-links {
    list-style: none;
    padding: 0;
}

.resource-links li {
    margin-bottom: 10px;
}

.resource-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.resource-links a:before {
    content: "→";
    margin-right: 8px;
    color: var(--accent-gold);
}

.resource-links a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

/* ========================================
   RELATED ARTICLES SECTION
   ======================================== */

.related-articles-section {
    padding: 60px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.related-articles-section h2 {
    font-family: 'Merriweather', serif;
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 40px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.related-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.related-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.related-card .related-badge {
    display: inline-block;
    background: var(--accent-gold);
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    margin: 20px 20px 0 20px;
}

.related-card h3 {
    font-size: 18px;
    margin: 15px 20px 12px;
    font-weight: 700;
}

.related-card a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s ease;
}

.related-card a:hover {
    color: var(--accent-gold);
}

.related-card .excerpt {
    font-size: 14px;
    color: var(--text-light);
    padding: 0 20px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.related-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    font-size: 12px;
    color: var(--text-light);
    border-top: 1px solid #f0f0f0;
}

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

@media (max-width: 768px) {
    .article-hero {
        padding: 50px 20px;
    }

    .article-meta-hero {
        gap: 15px;
        font-size: 12px;
    }

    .article-body {
        padding: 40px 20px;
    }

    .article-section h2 {
        font-size: 22px;
        margin: 30px 0 15px;
    }

    .article-sidebar {
        margin-top: 40px;
    }

    .author-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-cta-inline {
        padding: 25px 20px;
    }

    .sidebar-box {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .article-hero h1 {
        font-size: 24px;
    }

    .article-section h2 {
        font-size: 18px;
    }

    .article-meta-hero {
        flex-direction: column;
        gap: 8px;
    }
}


/* Partner Website Banner Styles */
.partner-banner {
    background: linear-gradient(135deg, #002B5C 0%, #1a5490 100%);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 43, 92, 0.15);
}

.partner-banner-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.partner-banner-header h3 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.partner-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.partner-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.partner-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

.partner-name {
    font-weight: 500;
}

.partner-arrow {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.partner-link:hover .partner-arrow {
    opacity: 1;
}

/* Related Articles Inline Section */
.related-articles-inline {
    background-color: #f8f9fa;
    border-left: 4px solid #002B5C;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.related-articles-inline h3 {
    margin-top: 0;
    color: #002B5C;
    font-size: 1.1rem;
}

.related-articles-inline ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-articles-inline li {
    margin-bottom: 0.5rem;
}

.related-articles-inline a {
    color: #1a5490;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.related-articles-inline a:hover {
    color: #002B5C;
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .partner-banner {
        padding: 1rem;
    }

    .partner-link {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .related-articles-inline {
        margin: 1.5rem 0;
        padding: 1rem;
    }
}


/* Breadcrumbs Navigation */
.breadcrumbs {
    background-color: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #1a5490;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: #002B5C;
    text-decoration: underline;
}

.breadcrumb-container .separator {
    color: #999;
    margin: 0 0.5rem;
}

.breadcrumb-container .current {
    color: #666;
    font-weight: 500;
}

/* Social Sharing */
.social-sharing {
    background: white;
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 2rem 0;
    text-align: center;
}

.sharing-label {
    color: #002B5C;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.sharing-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    color: white;
    transition: all 0.3s;
    border: none;
}

.social-btn.facebook {
    background-color: #1877F2;
}

.social-btn.facebook:hover {
    background-color: #165FD8;
    transform: translateY(-3px);
}

.social-btn.twitter {
    background-color: #000000;
}

.social-btn.twitter:hover {
    background-color: #333;
    transform: translateY(-3px);
}

.social-btn.linkedin {
    background-color: #0A66C2;
}

.social-btn.linkedin:hover {
    background-color: #084B9F;
    transform: translateY(-3px);
}

.social-btn.email {
    background-color: #EA4335;
}

.social-btn.email:hover {
    background-color: #D33423;
    transform: translateY(-3px);
}

/* Legal Footer */
.legal-footer {
    background: #f8f9fa;
    padding: 2rem;
    border-top: 1px solid #ddd;
    font-size: 0.85rem;
    color: #666;
    margin-top: 3rem;
}

.legal-footer h4 {
    color: #002B5C;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.legal-footer p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.legal-footer a {
    color: #1a5490;
    text-decoration: none;
}

.legal-footer a:hover {
    text-decoration: underline;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .breadcrumb-container {
        padding: 0 1rem;
        font-size: 0.85rem;
    }

    .breadcrumb-container .separator {
        margin: 0 0.25rem;
    }

    .social-sharing {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .sharing-buttons {
        gap: 0.75rem;
    }

    .social-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}


/* --- shared site navigation --- */
.navbar { background: linear-gradient(135deg,#001a3d 0%,#002B5C 100%); padding: 1rem 0;
          position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,27,61,.25); }
.navbar .nav-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; display: flex;
          justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; }
.navbar .logo { color: #fff; font-size: 1.35rem; font-weight: 700; text-decoration: none;
                white-space: nowrap; }
.navbar .nav-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.navbar .nav-links a { color: rgba(255,255,255,.9); text-decoration: none; font-weight: 500;
                       font-size: .94rem; transition: color .2s; }
.navbar .nav-links a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 768px) {
  .navbar .nav-container { padding: 0 1.2rem; }
  .navbar .nav-links { gap: .85rem; }
  .navbar .nav-links a { font-size: .88rem; }
}


/* ========================================
   LAYOUT FIXES
   The markup uses <article class="article-container"> with .article-hero /
   .article-header directly inside it, but the rules above were written for a
   different wrapper. These rules make both article templates render correctly.
   ======================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-body);
    background: var(--bg-soft);
    line-height: 1.7;
    margin: 0;
}

.article-container {
    display: block;
    max-width: 100%;
    margin: 0;
}

/* the hero no longer needs to clear a fixed navbar */
.article-hero {
    margin-top: 0;
    padding: 3.5rem 2rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
}

/* second article template used .article-header instead of .article-hero */
.article-header {
    max-width: 100%;
    margin: 0;
    padding: 3.5rem 2rem;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
}

.article-header h1 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2.4rem;
    line-height: 1.25;
    margin: 1rem auto 1.2rem;
    max-width: 900px;
    color: #fff;
}

.article-header .article-meta,
.article-header .article-meta-hero {
    display: flex;
    justify-content: center;
    gap: 1.6rem;
    flex-wrap: wrap;
    font-size: .9rem;
    opacity: .92;
}

/* category badge - the markup uses .category-badge, the old CSS only styled
   .article-category-badge */
.category-badge,
.article-category-badge {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--primary-dark);
    padding: .35rem .95rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: .5rem;
}

.article-hero h1 {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.article-hero .article-meta {
    display: flex;
    justify-content: center;
    gap: 1.6rem;
    flex-wrap: wrap;
    font-size: .9rem;
    opacity: .92;
}

/* two-column body: content + sidebar/table of contents */
.article-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 3rem;
    max-width: 1240px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: transparent;
    align-items: start;
}

.article-body > .container {
    display: contents;
}

.article-content {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem;
    min-width: 0;
    order: 1;
}

.toc-wrapper,
.article-sidebar,
.sidebar {
    order: 2;
    position: sticky;
    top: 90px;
    align-self: start;
}

.article-content h2 {
    font-family: 'Merriweather', Georgia, serif;
    color: var(--primary-dark);
    font-size: 1.55rem;
    line-height: 1.3;
    margin: 2.4rem 0 1rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid var(--border);
}

.article-content h2:first-of-type { margin-top: .5rem; }

.article-content h3 {
    color: var(--primary);
    font-size: 1.15rem;
    margin: 1.8rem 0 .7rem;
}

.article-content p {
    margin-bottom: 1.15rem;
    color: var(--text-body);
    white-space: pre-line;
}

.article-content ul,
.article-content ol { margin: 0 0 1.2rem 1.5rem; color: var(--text-body); }
.article-content li { margin-bottom: .5rem; }

.article-content .lead {
    font-size: 1.1rem;
    color: var(--text-dark);
    border-left: 4px solid var(--accent-gold);
    background: #fdfaf0;
    padding: 1.2rem 1.4rem;
    border-radius: 0 5px 5px 0;
    margin-bottom: 2rem;
    white-space: normal;
}

.article-content a { color: var(--primary-light); }

@media (max-width: 1024px) {
    .article-body { grid-template-columns: 1fr; gap: 2rem; }
    .toc-wrapper, .article-sidebar, .sidebar { position: static; order: 3; }
}

@media (max-width: 768px) {
    .article-hero, .article-header { padding: 2.5rem 1.2rem; }
    .article-hero h1, .article-header h1 { font-size: 1.7rem; }
    .article-body { padding: 1.5rem 1rem; }
    .article-content { padding: 1.4rem; }
}

/* the mobile menu button is injected by navigation.js - keep it hidden on
   desktop, where the full link list is already visible */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer;
              padding: .4rem; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff;
                   border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: flex; order: 2; }
    .navbar .nav-links { display: none; width: 100%; order: 3; flex-direction: column;
                         gap: .8rem; padding-top: .9rem; }
    .navbar .nav-links.open { display: flex; }
}

/* table of contents */
.toc-wrapper #toc { background:#fff; border:1px solid var(--border); border-radius:8px;
                    padding:1.4rem 1.5rem; }
.toc-wrapper #toc h3 { font-family:'Merriweather',Georgia,serif; color:var(--primary-dark);
                       font-size:1.05rem; margin:0 0 .9rem; padding-bottom:.6rem;
                       border-bottom:2px solid var(--border); }
#tocList { list-style:none; margin:0; padding:0; font-size:.92rem; }
#tocList li { margin:0 0 .5rem; }
#tocList li.toc-h2 > a { color:var(--primary); font-weight:600; }
#tocList a { color:var(--text-body); text-decoration:none; display:block;
             padding:.15rem 0 .15rem .6rem; border-left:2px solid transparent;
             transition:border-color .2s, color .2s; }
#tocList a:hover { color:var(--primary-light); border-left-color:var(--accent-gold); }
#tocList ul { list-style:none; margin:.4rem 0 .6rem .9rem; padding:0; }
#tocList ul a { font-size:.88rem; color:var(--text-light); }

/* tidy the intro wrapper so the lead paragraph is not double-boxed */
.article-content .intro-section { background:transparent; padding:0; margin-bottom:1.5rem; }

/* ---- second (legacy) article template ---------------------------------- */
/* its markup nests .article-header inside .article-hero > .container, so the
   header must not paint its own gradient on top of the hero's */
.article-hero .article-header {
    background: none;
    padding: 0;
    color: inherit;
}
.article-hero .container { max-width: 900px; margin: 0 auto; }

/* legacy breadcrumb bar (singular class) */
.breadcrumb { background:#fff; border-bottom:1px solid var(--border); padding:.9rem 0;
              font-size:.9rem; }
.breadcrumb .container { max-width:1240px; margin:0 auto; padding:0 2rem; }
.breadcrumb a { color:var(--primary-light); text-decoration:none; }
.breadcrumb a:hover { text-decoration:underline; }

/* the floating table of contents is now a grid cell, not an overlay */
aside.table-of-contents {
    position: sticky; top: 90px; align-self: start; order: 2;
    background:#fff; border:1px solid var(--border); border-radius:8px;
    padding:1.4rem 1.5rem; float:none; width:auto; max-height:none; box-shadow:none;
}
aside.table-of-contents h3, aside.table-of-contents h4 {
    font-family:'Merriweather',Georgia,serif; color:var(--primary-dark);
    font-size:1.05rem; margin:0 0 .9rem; padding-bottom:.6rem;
    border-bottom:2px solid var(--border);
}
aside.table-of-contents .toc-nav ul { list-style:none; margin:0; padding:0; }

.article-section { margin-bottom: 2.2rem; }
.lead-paragraph {
    font-size:1.08rem; color:var(--text-dark);
    border-left:4px solid var(--accent-gold); background:#fdfaf0;
    padding:1.2rem 1.4rem; border-radius:0 5px 5px 0; margin-bottom:1.8rem;
}
.article-quote { border-left:4px solid var(--primary-light); background:var(--bg-soft);
                 margin:1.6rem 0; padding:1.1rem 1.4rem; font-style:italic;
                 color:var(--text-body); border-radius:0 5px 5px 0; }
.faq-item { border:1px solid var(--border); border-radius:6px; padding:1.1rem 1.3rem;
            margin-bottom:.9rem; background:var(--bg-soft); }
.article-list, .article-numbered-list { margin:0 0 1.2rem 1.5rem; }

@media (max-width:1024px) {
    aside.table-of-contents { position:static; order:3; }
}
