/* Blog Styles */
/* Note: All CSS variables are defined in style.css and inherited here */

/* Blog Header */
.blog-header {
    padding: 14rem 0 4rem;  /* Unified hero padding across all pages */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
}

.blog-header h1 {
    font-size: clamp(2.25rem, 5vw, 3rem);  /* Unified hero H1 size */
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-header p:not(.category-count):not(.tag-count):not(.new-here-cta) {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.new-here-cta {
    margin-top: 1.25rem;
}

.new-here-cta a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: #2563eb;
    border: none;
    border-radius: 25px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.new-here-cta a:hover {
    background: #1d4ed8;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

/* Blog Thesis (Site Manifesto) */
.blog-thesis {
    font-size: 1.35rem !important;
    font-weight: 500;
    font-style: italic;
    color: var(--text-primary) !important;
    max-width: 700px !important;
    margin: 0 auto 1rem !important;
    line-height: 1.5;
}

/* Anti-Hype Badges */
.blog-badges-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.75rem auto 1rem;
}

.blog-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.75rem auto 1rem !important;
}

.blog-share-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-share-btn:hover {
    background: var(--bg-card);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.blog-share-btn:active {
    transform: translateY(-50%) scale(0.95);
}

@media (max-width: 768px) {
    .blog-share-btn {
        position: static;
        transform: none;
        margin-left: 0.75rem;
    }
}

/* Share Toast Notification */
.share-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-toast.show {
    transform: translateX(-50%) translateY(0);
}

[data-theme="dark"] .share-toast {
    background: #374151;
}

.blog-badges .badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

/* Authority badge - blue/credibility */
.badge-authority {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #2563eb;
}

[data-theme="dark"] .badge-authority {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    color: #60a5fa;
}

/* Anti-hype badge - red/warning */
.badge-anti-hype {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
}

[data-theme="dark"] .badge-anti-hype {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

/* Value badge - green/positive */
.badge-value {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #15803d; /* Green-700: 4.5:1 on white */
}

[data-theme="dark"] .badge-value {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.35);
    color: #4ade80;
}

[data-theme="dark"] .blog-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

@media (max-width: 640px) {
    .blog-header {
        padding: 10rem 0 3rem;  /* Unified mobile hero padding */
    }
}

/* Clickable Category Tags */
a.blog-category {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

a.blog-category:hover {
    text-decoration: underline;
    filter: brightness(0.85);
}

[data-theme="dark"] a.blog-category:hover {
    filter: brightness(1.3);
}

a.blog-category.active {
    font-weight: 600;
}

/* Blog Search Trigger (Opens CMD+K Modal) */
.search-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 400px;
    margin: 1.5rem auto;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-trigger:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-trigger:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .search-trigger {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .search-trigger:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--accent-primary);
}

.search-trigger svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.search-trigger span {
    flex: 1;
    text-align: left;
}

.search-trigger kbd {
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

[data-theme="dark"] .search-trigger kbd {
    background: #334155;
    border-color: #475569;
}

@media (max-width: 640px) {
    .search-trigger kbd {
        display: none;
    }
}

/* Floating Random Button (Mobile) */
.random-fab {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    background: #2563eb;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.random-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.random-fab:active {
    transform: scale(0.95);
    background: #1d4ed8;
}

[data-theme="dark"] .random-fab {
    background: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .random-fab:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .random-fab:active {
    background: #2563eb;
}

/* Only show on mobile/tablet */
@media (max-width: 768px) {
    .random-fab {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Hide when scrolling down, show when scrolling up */
.random-fab.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

/* Legacy Blog Search (keeping for reference, can remove if unused) */
.blog-search {
    max-width: 500px;
    margin: 1.5rem auto;
}

.blog-search .search-label {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Visually hidden but accessible to screen readers and search indexers */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Pagefind UI Overrides */
.pagefind-ui {
    --pagefind-ui-scale: 0.9;
    --pagefind-ui-primary: var(--accent-primary);
    --pagefind-ui-text: var(--text-primary);
    --pagefind-ui-background: var(--bg-card);
    --pagefind-ui-border: var(--border-color);
    --pagefind-ui-border-width: 1px;
    --pagefind-ui-border-radius: 8px;
    --pagefind-ui-font: inherit;
}

.pagefind-ui .pagefind-ui__search-input {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.pagefind-ui .pagefind-ui__search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.pagefind-ui .pagefind-ui__result {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.pagefind-ui .pagefind-ui__result-link {
    color: var(--text-primary);
    font-weight: 600;
}

.pagefind-ui .pagefind-ui__result-link:hover {
    color: var(--accent-primary);
}

.pagefind-ui .pagefind-ui__result-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.pagefind-ui .pagefind-ui__result-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Pagefind metadata display (subtitle, description, keywords, etc.) */
.pagefind-ui .pagefind-ui__result-nested {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.pagefind-ui .pagefind-ui__result-tag {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Result sub-result (metadata values) */
.pagefind-ui .pagefind-ui__result-sub {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.pagefind-ui .pagefind-ui__result-inner {
    color: var(--text-secondary);
}

/* Message styling (e.g., "No results found") */
.pagefind-ui .pagefind-ui__message {
    color: var(--text-secondary);
}

/* Button styling */
.pagefind-ui .pagefind-ui__button {
    background: #2563eb; /* Blue-600 for 4.5:1 contrast */
    color: white;
}

.pagefind-ui .pagefind-ui__button:hover {
    background: var(--accent-secondary);
}

[data-theme="dark"] .pagefind-ui {
    --pagefind-ui-background: rgba(30, 41, 59, 0.9);
    --pagefind-ui-border: #334155;
}

[data-theme="dark"] .pagefind-ui .pagefind-ui__result-tag {
    background: rgba(30, 41, 59, 0.8);
    border-color: #475569;
}

/* Category Navigation */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.category-nav-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0;
}

.category-nav-label:hover {
    color: var(--accent-primary);
}

.category-link {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-link:hover {
    border-color: var(--cat-color, #2563eb);
    filter: brightness(0.85);
}

.category-link.active {
    background: var(--cat-color, #2563eb);
    border-color: var(--cat-color, #2563eb);
    color: white !important;
}

[data-theme="dark"] .category-link {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .category-link:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--cat-color, var(--accent-primary));
    filter: brightness(1.3);
}

[data-theme="dark"] .category-link.active {
    background: var(--cat-color, #2563eb);
    border-color: var(--cat-color, #2563eb);
}

@media (max-width: 640px) {
    .category-nav {
        gap: 0.375rem;
    }

    .category-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Blog Main */
.blog-main {
    padding: 4rem 0;
    min-height: 50vh;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Blog Card */
.blog-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-primary);
}

.blog-card:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary);
}

[data-theme="dark"] .blog-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Blog Card Image */
.blog-card-image {
    display: block;
    aspect-ratio: 400 / 220;
    overflow: hidden;
    background: var(--bg-secondary);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-card-content {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.blog-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    text-decoration: none;
}

[data-theme="dark"] .blog-category {
    filter: brightness(1.5);
}

.blog-category svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.blog-category:hover {
    text-decoration: underline;
}

.blog-date {
    color: var(--text-muted);
    margin-left: auto;
}

.blog-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

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

.blog-card h2 a:hover {
    color: var(--accent-primary);
}

.blog-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.blog-read-more {
    color: var(--accent-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-read-more:hover {
    color: var(--accent-secondary);
}

/* Blog Card Footer */
.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.blog-card-footer .blog-read-time {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.blog-card-footer .blog-read-time svg {
    opacity: 0.6;
    flex-shrink: 0;
}

.blog-card-footer .blog-read-more {
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.blog-card-footer .blog-read-more:hover {
    text-decoration: underline;
}

/* Blog Card Tags */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.blog-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

[data-theme="dark"] .blog-tag {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .blog-tag:hover {
    border-color: var(--accent-primary);
}

/* Article Styles */
.blog-article {
    padding: 6rem 0 4rem;
}

/* Header Title Row (h1 + share btn inline) */
.header-title-row {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-header .header-title-row h1,
.browse-header .header-title-row h1,
.start-here-header .header-title-row h1 {
    margin-bottom: 0;
}

/* Article Breadcrumbs */
/* Breadcrumbs - modern minimal design */
.article-breadcrumbs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.article-breadcrumbs ol {
    display: inline-flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.8rem;
}

[data-theme="dark"] .article-breadcrumbs ol {
    background: #1e293b;
    border-color: #334155;
}

.article-breadcrumbs li {
    display: inline-flex;
    align-items: center;
}

/* Chevron separator */
.article-breadcrumbs li.sep {
    color: #64748b;
    font-size: 1.4em;
    font-weight: 400;
    padding: 0 0.35rem;
    line-height: 1;
}

[data-theme="dark"] .article-breadcrumbs li.sep {
    color: #94a3b8;
}

.article-breadcrumbs a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.article-breadcrumbs a:hover {
    color: var(--accent-primary);
}

.article-breadcrumbs a svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.article-header {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-category svg {
    flex-shrink: 0;
    opacity: 0.8;
}

a.article-category:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.article-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.article-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.article-author {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-author .separator {
    margin: 0 0.25rem;
}

.byline-photo-link {
    display: flex;
    align-items: center;
}

.byline-photo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease;
}

.byline-photo-link:hover .byline-photo {
    border-color: var(--accent-primary);
}

.article-author .author-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.article-author .author-link:hover {
    color: var(--accent-primary);
}

/* Timezone fallback (shown when JS disabled, hidden when JS converts to local time) */
.tz-fallback {
    font-size: 0.85em;
    opacity: 0.7;
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.article-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .article-tag {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .article-tag:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.15);
}

/* Article Share Button (in breadcrumbs) */
.article-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Touch target 44x44 (iOS HIG + Lighthouse) */
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

.article-share-btn:active {
    transform: scale(0.95);
}

[data-theme="dark"] .article-share-btn {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .article-share-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.15);
}

/* Section Share Button (start-here, etc.) */
.section-header-with-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

.section-share-btn:active {
    transform: scale(0.95);
}

[data-theme="dark"] .section-share-btn {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .section-share-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.15);
}

/* Page Share Button (author page, hero sections) */
.page-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    color: #1e40af;
    cursor: pointer;
    transition: color 0.2s ease;
    margin-left: 0.75rem;
    vertical-align: middle;
}

.page-share-btn:hover {
    color: #2563eb; /* Blue-600: 4.56:1 on white */
}

.page-share-btn:active {
    transform: scale(0.95);
}

[data-theme="dark"] .page-share-btn {
    color: #60a5fa;
}

[data-theme="dark"] .page-share-btn:hover {
    color: #93c5fd;
}

/* Icon-only Share Button (category pages, minimal) */
.icon-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin-left: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    vertical-align: middle;
}

.icon-share-btn:hover {
    color: var(--accent-primary);
}

.icon-share-btn:active {
    transform: scale(0.95);
}

/* Article Hero Image */
.article-hero {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.article-hero img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: #ffffff;  /* Always white background */
}

/* Article Content */
.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-content .lead {
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* Update Note - editorial update callout */
.article-content .update-note {
    position: relative;
    margin: 1.5rem 0 2rem 0;
    padding: 1rem 1.25rem 1rem 1rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(245, 158, 11, 0.04) 100%);
    border-left: 3px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-content .update-note::before {
    content: 'UPDATE';
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #92400e; /* Amber-800: 6.5:1 on white */
    margin-bottom: 0.35rem;
}

.article-content .update-note em {
    font-style: normal;
    color: var(--text-body);
}

[data-theme="dark"] .article-content .update-note {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-left-color: #fbbf24;
}

[data-theme="dark"] .article-content .update-note::before {
    color: #fbbf24;
}

/* TL;DR summary card */
/* TL;DR - Collapsible spoiler box */
.article-content .tldr {
    position: relative;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    font-size: 1.05rem;
    line-height: 1.75;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.article-content .tldr::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, #8b5cf6 100%);
    border-radius: 12px 0 0 12px;
}

.article-content .tldr-label {
    display: block;
    padding: 1rem 1.5rem 0.5rem;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--accent-primary);
}

.article-content .tldr-content {
    padding: 0 1.5rem 1.25rem;
    margin: 0;
    color: var(--text-primary);
}

.article-content .tldr-content a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.4rem;
    white-space: nowrap;
}

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

[data-theme="dark"] .article-content .tldr {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(139, 92, 246, 0.12) 100%);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}

/* Companion Article Callout - links contrarian/constructive pairs */
.article-content .companion-callout {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-content .companion-callout:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
    border-color: rgba(34, 197, 94, 0.35);
    transform: translateY(-1px);
}

.article-content .companion-callout::before {
    content: '\2194';  /* ↔ bidirectional arrow */
    font-size: 1.25rem;
    color: #15803d; /* Green-700: 4.5:1 on white */
    flex-shrink: 0;
}

.article-content .companion-callout .companion-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #15803d; /* Green-700: 4.5:1 on white */
    display: block;
    margin-bottom: 0.15rem;
}

.article-content .companion-callout .companion-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
}

.article-content .companion-callout .companion-arrow {
    margin-left: auto;
    color: #15803d; /* Green-700: 4.5:1 on white */
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.article-content .companion-callout:hover .companion-arrow {
    transform: translateX(3px);
}

[data-theme="dark"] .article-content .companion-callout {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
    border-color: rgba(34, 197, 94, 0.25);
}

[data-theme="dark"] .article-content .companion-callout:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.article-content h2 {
    font-size: 1.75rem;
    margin: 3.5rem 0 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.article-content h3 {
    font-size: 1.35rem;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
}

.article-content p {
    color: var(--text-primary);
    line-height: 1.85;
    margin-bottom: 1.75rem;
    letter-spacing: 0.01em;
}

.article-content ul,
.article-content ol {
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.article-content strong {
    color: var(--text-primary);
}

/* Links in article body - underline for accessibility (WCAG 1.4.1) */
.article-content p a,
.article-content li a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.article-content p a:hover,
.article-content li a:hover {
    color: var(--accent-secondary);
    text-decoration-thickness: 2px;
}

.article-content blockquote {
    border: none;
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    background: linear-gradient(90deg, rgba(var(--accent-primary-rgb, 59, 130, 246), 0.08) 0%, transparent 100%);
    border-radius: 0 8px 8px 0;
    position: relative;
}

.article-content blockquote::before,
.article-content blockquote::after {
    display: none;
}

.article-content blockquote p {
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* Business Impact callout for non-technical readers */
.article-content .business-impact {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border-left: 4px solid #22c55e;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.article-content .business-impact strong {
    color: #15803d;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[data-theme="dark"] .article-content .business-impact {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
    border-left-color: #4ade80;
}

[data-theme="dark"] .article-content .business-impact strong {
    color: #4ade80;
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

/* The Bottom Line section - distinctive closing */
.article-content .bottom-line {
    margin-top: 3.5rem;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    position: relative;
}

.article-content .bottom-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary) 0%, #8b5cf6 100%);
    border-radius: 16px 16px 0 0;
}

.article-content .bottom-line h2 {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

[data-theme="dark"] .article-content .bottom-line {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.25);
}

/* Action Toolkit (Monday Morning Checklist) */
.article-content .action-toolkit {
    background: var(--bg-secondary, #f8fafc);
    border-left: 4px solid var(--accent-primary, #3b82f6);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.article-content .action-toolkit h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--accent-primary, #3b82f6);
    font-size: 1.1rem;
}

.article-content .action-toolkit-intro {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary, #64748b);
    font-style: italic;
}

.article-content .action-toolkit ul {
    margin: 0;
    padding-left: 1.25rem;
}

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

.article-content .action-toolkit li:last-child {
    margin-bottom: 0;
}

.article-content .action-toolkit strong {
    color: var(--text-primary);
}

[data-theme="dark"] .article-content .action-toolkit {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--accent-primary, #60a5fa);
}

[data-theme="dark"] .article-content .action-toolkit-intro {
    color: var(--text-secondary, #94a3b8);
}

/* Action Toolkit - Type Variants (WCAG-compliant colors on white) */
.action-toolkit--checklist {
    border-color: #2563eb;  /* Blue-600 - actionable tasks */
}
.action-toolkit--checklist h3 { color: #2563eb; }

.action-toolkit--questions {
    border-color: #7c3aed;  /* Violet-600 - inquiry/reflection */
}
.action-toolkit--questions h3 { color: #7c3aed; }

.action-toolkit--patterns {
    border-color: #b45309;  /* Amber-700 - warning/observation */
}
.action-toolkit--patterns h3 { color: #b45309; }

.action-toolkit--observations {
    border-color: #059669;  /* Emerald-600 - insights/discovery */
}
.action-toolkit--observations h3 { color: #059669; }

.action-toolkit--warning {
    border-color: #b45309;  /* Amber-700 - caution/alert */
}
.action-toolkit--warning h3 { color: #b45309; }

.action-toolkit--tip {
    border-color: #15803d;  /* Green-700 - helpful advice */
}
.action-toolkit--tip h3 { color: #15803d; }

.action-toolkit--note {
    border-color: #0369a1;  /* Sky-700 - informational */
}
.action-toolkit--note h3 { color: #0369a1; }

.action-toolkit--danger {
    border-color: #dc2626;  /* Red-600 - critical warning */
}
.action-toolkit--danger h3 { color: #dc2626; }

.action-toolkit--success {
    border-color: #059669;  /* Emerald-600 - positive outcome */
}
.action-toolkit--success h3 { color: #059669; }

[data-theme="dark"] .action-toolkit--checklist {
    background: rgba(59, 130, 246, 0.08);
    border-color: #60a5fa;
}
[data-theme="dark"] .action-toolkit--checklist h3 { color: #60a5fa; }

[data-theme="dark"] .action-toolkit--questions {
    background: rgba(139, 92, 246, 0.08);
    border-color: #a78bfa;
}
[data-theme="dark"] .action-toolkit--questions h3 { color: #a78bfa; }

[data-theme="dark"] .action-toolkit--patterns {
    background: rgba(245, 158, 11, 0.08);
    border-color: #fbbf24;
}
[data-theme="dark"] .action-toolkit--patterns h3 { color: #fbbf24; }

[data-theme="dark"] .action-toolkit--observations {
    background: rgba(16, 185, 129, 0.08);
    border-color: #34d399;
}
[data-theme="dark"] .action-toolkit--observations h3 { color: #34d399; }

[data-theme="dark"] .action-toolkit--warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: #fbbf24;
}
[data-theme="dark"] .action-toolkit--warning h3 { color: #fbbf24; }

[data-theme="dark"] .action-toolkit--tip {
    background: rgba(34, 197, 94, 0.08);
    border-color: #4ade80;
}
[data-theme="dark"] .action-toolkit--tip h3 { color: #4ade80; }

[data-theme="dark"] .action-toolkit--note {
    background: rgba(14, 165, 233, 0.08);
    border-color: #38bdf8;
}
[data-theme="dark"] .action-toolkit--note h3 { color: #38bdf8; }

[data-theme="dark"] .action-toolkit--danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: #f87171;
}
[data-theme="dark"] .action-toolkit--danger h3 { color: #f87171; }

[data-theme="dark"] .action-toolkit--success {
    background: rgba(16, 185, 129, 0.08);
    border-color: #34d399;
}
[data-theme="dark"] .action-toolkit--success h3 { color: #34d399; }

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.article-content th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-weight: 600;
}

.article-content td {
    color: var(--text-primary);
}

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

/* Sources Section */
.sources-section {
    margin-top: 3rem;
    padding: 2rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
}

.sources-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px 12px 0 0;
}

.sources-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sources-section h3::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
}

.sources-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sources-section li {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
    transition: all 0.2s ease;
}

.sources-section li:hover {
    background: rgba(59, 130, 246, 0.08);
    border-left-color: var(--accent-secondary);
}

.sources-section li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.5;
    display: block;
    transition: color 0.2s ease;
}

.sources-section li a:hover {
    color: var(--accent-primary);
}

[data-theme="dark"] .sources-section {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .sources-section li {
    background: rgba(15, 23, 42, 0.5);
}

[data-theme="dark"] .sources-section li:hover {
    background: rgba(59, 130, 246, 0.12);
}

/* Mid-Article Callout (contextual CTA within article body) */
.mid-article-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 2.5rem 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-left: 3px solid var(--accent-primary);
    border-radius: 8px;
}

.mid-article-callout p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.mid-article-callout .callout-cta {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    background: #2563eb; /* Blue-600 for 4.5:1 contrast */
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mid-article-callout .callout-cta:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

[data-theme="dark"] .mid-article-callout {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.06) 100%);
    border-color: rgba(59, 130, 246, 0.25);
}

@media (max-width: 640px) {
    .mid-article-callout {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Article CTA */
.article-cta {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    margin-top: 4rem;
}

.article-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.article-cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Article Navigation */
.article-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: stretch;
    max-width: 800px;
    margin: 4rem auto 0;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.article-nav > * {
    min-width: 0;
}

.article-nav a {
    text-decoration: none;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.article-nav a:hover {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, var(--bg-secondary, #f8fafc) 0%, rgba(59, 130, 246, 0.1) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.article-nav a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.article-nav a:focus:not(:focus-visible) {
    outline: none;
}

[data-theme="dark"] .article-nav a:hover {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.15) 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Placeholder for missing prev/next */
.nav-placeholder {
    visibility: hidden;
}

.nav-prev {
    text-align: left;
    justify-self: stretch;
}

.nav-next {
    text-align: right;
    justify-self: stretch;
}

.nav-all {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem 1.5rem;
    min-width: 120px;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.nav-prev .nav-label::before {
    content: "\2190 ";
}

.nav-next .nav-label::after {
    content: " \2192";
}

.nav-title {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-all .nav-label {
    color: var(--accent-primary);
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 0;
}

.nav-all .nav-label::before,
.nav-all .nav-label::after {
    content: none;
}

.nav-all .nav-icon {
    color: var(--accent-primary);
    font-size: 1.5rem;
    line-height: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .article-header,
    .article-hero,
    .article-content,
    .related-articles,
    .article-reply {
        max-width: 100%;
        padding: 0 0.75rem;
    }

    /* Tables: horizontal scroll on mobile */
    .article-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        position: relative;
        /* Right edge shadow hint for scroll */
        box-shadow: inset -20px 0 20px -20px rgba(0, 0, 0, 0.15);
    }

    /* Scroll hint label above table */
    .article-content table::before {
        content: '← swipe to scroll →';
        display: block;
        text-align: center;
        font-size: 0.7rem;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--text-muted);
        padding: 0.4rem 0.75rem;
        background: var(--bg-secondary);
        border-radius: 4px 4px 0 0;
        border: 1px solid var(--border-color);
        border-bottom: none;
        margin-bottom: 0;
    }

    .article-content th,
    .article-content td {
        padding: 0.75rem 1rem;
        white-space: normal;
        min-width: 100px;
    }

    /* First column sticky for tables */
    .article-content th:first-child,
    .article-content td:first-child {
        position: sticky;
        left: 0;
        background: var(--bg-card);
        z-index: 1;
    }

    .article-content thead th:first-child {
        background: var(--bg-secondary);
        z-index: 2;
    }

    /* Full-width breakout for visual elements */
    .article-content .tldr,
    .article-content .action-toolkit,
    .article-content .companion-card,
    .article-content .companion-callout,
    .article-content blockquote {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        border-radius: 0;
    }

    /* Reduce padding on mobile for max content width */
    .article-content .tldr-label {
        padding: 0.75rem 1rem 0.4rem;
    }

    .article-content .tldr-content {
        padding: 0 1rem 1rem;
    }

    .article-content .action-toolkit {
        padding: 1rem 1rem 1rem 1.25rem;
    }

    .article-content blockquote {
        padding: 1rem 1rem 1rem 1.25rem;
    }

    .article-content blockquote p {
        font-size: 1.15rem;
    }

    .article-content .companion-callout {
        padding: 1rem;
    }

    .article-cta {
        padding: 2rem;
    }

    .article-nav {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-placeholder {
        display: none;
    }

    .nav-prev,
    .nav-next {
        width: 100%;
    }

    .nav-prev {
        order: 2;
    }

    .nav-next {
        order: 3;
        text-align: left;
    }

    .nav-next .nav-label::after {
        content: none;
    }

    .nav-next .nav-label::before {
        content: "\2192 ";
    }

    .nav-all {
        order: 1;
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem 1.5rem;
    }

    .nav-all .nav-icon {
        order: -1;
    }
}

/* Related Articles Section */
.related-articles {
    max-width: 800px;
    margin: 4rem auto 0;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.related-articles h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
}

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

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--bg-primary, #ffffff) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.related-card:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.related-card:focus:not(:focus-visible) {
    outline: none;
}

[data-theme="dark"] .related-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.related-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    font-weight: 500;
}

.related-card h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

.related-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary, #8b5cf6));
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Dark mode support for blog */
/* Dark mode variables inherited from style.css */
[data-theme="dark"] {
    --bg-card: rgba(30, 41, 59, 0.8);
}

[data-theme="dark"] .blog-card,
[data-theme="dark"] .related-card,
[data-theme="dark"] .article-cta {
    background: rgba(30, 41, 59, 0.8);
    border-color: #334155;
}

[data-theme="dark"] .article-content blockquote {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, transparent 100%);
    border-color: var(--accent-primary);
}

[data-theme="dark"] .article-content table {
    background: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .article-content th {
    background: rgba(255, 255, 255, 0.05);
}

/* Dark mode mobile table scroll shadow */
@media (max-width: 768px) {
    [data-theme="dark"] .article-content table {
        box-shadow: inset -20px 0 20px -20px rgba(0, 0, 0, 0.4);
    }
}

[data-theme="dark"] .related-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-articles {
        padding: 0 1rem;
        padding-top: 2rem;
    }

    .article-comments {
        padding: 2rem 1rem 0;
    }
}

/* Privacy Page Styles */
.privacy-header {
    padding: 14rem 0 4rem;  /* Unified hero padding across all pages */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
}

[data-theme="dark"] .privacy-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.privacy-header h1 {
    font-size: clamp(2.25rem, 5vw, 3rem);  /* Unified hero H1 size */
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.privacy-header .last-updated {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 24px;
}

.privacy-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.privacy-content h2:first-child {
    margin-top: 0;
}

.privacy-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.privacy-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.privacy-content li {
    margin-bottom: 0.5rem;
}

.privacy-content strong {
    color: var(--text-primary);
}

.privacy-content a {
    color: var(--accent-primary);
}

.privacy-content a:hover {
    color: var(--accent-secondary);
}

@media (max-width: 640px) {
    .privacy-header {
        padding: 10rem 0 3rem;  /* Unified mobile hero padding */
    }
}

/* Disclosures page — card grid for entity registry.
   FTC 16 CFR 255: registry must be scannable and unambiguous about relationship type. */
.disclosures-page .disclosures-lede {
    font-size: 1.05rem;
    color: var(--text-primary);
    border-left: 3px solid var(--accent-primary);
    padding-left: 1rem;
    margin-bottom: 2rem;
}
.disclosures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 2.5rem;
}
.disclosure-card {
    padding: 1.1rem 1.25rem;
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-left: 3px solid #94a3b8;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
}
.disclosure-card__tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 0.6rem 0;
}
.disclosure-card__name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.02rem;
    margin: 0 0 0.4rem 0;
}
.disclosure-card p:last-child {
    margin: 0;
    color: var(--text-secondary);
}
.disclosure-card--current {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), rgba(245, 158, 11, 0.02));
}
.disclosure-card--current .disclosure-card__tag {
    background: rgba(245, 158, 11, 0.15);
    color: #92400e;
}
[data-theme="dark"] .disclosure-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .disclosure-card__tag { color: #94a3b8; background: rgba(148, 163, 184, 0.15); }
[data-theme="dark"] .disclosure-card--current {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.03));
}
[data-theme="dark"] .disclosure-card--current .disclosure-card__tag { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }

/* In-article editor disclosure callout — placed near the top per FTC clear-and-conspicuous rule. */
.article-content .disclosure-note {
    position: relative;
    margin: 1.5rem 0 2rem 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.07) 0%, rgba(217, 70, 239, 0.04) 100%);
    border-left: 3px solid #a855f7;
    border-radius: 0 8px 8px 0;
    /* Body parity, not smaller. The FTC's clear-and-conspicuous test compares
       a disclosure's size against the claim it qualifies; this sits directly
       above a 1.3rem lead, so 0.9rem made it the smallest text on first
       screen. Contrast measures 7.72:1 (WCAG AAA), so size was the one weak
       axis. Do not shrink this to reclaim vertical space. */
    font-size: 1rem;
    line-height: 1.65;
}
.article-content .disclosure-note::before {
    content: 'EDITOR DISCLOSURE';
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #6b21a8;
    margin-bottom: 0.35rem;
}
.article-content .disclosure-note p { margin: 0; color: var(--text-body); }
.article-content .disclosure-note p + p { margin-top: 0.5rem; }
.article-content .disclosure-note a { color: var(--accent-primary); text-decoration: underline; }
[data-theme="dark"] .article-content .disclosure-note {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(217, 70, 239, 0.05) 100%);
    border-left-color: #c084fc;
}
[data-theme="dark"] .article-content .disclosure-note::before { color: #d8b4fe; }

/* Subscribe Section */
.subscribe-section {
    padding: 60px 24px;
    background: var(--bg-secondary, #f8fafc);
}

[data-theme="dark"] .subscribe-section {
    background: #1e293b;
}

.subscribe-box {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 32px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.subscribe-content {
    flex: 1;
    min-width: 0;
}

[data-theme="dark"] .subscribe-box {
    background: #0f172a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.subscribe-content h2 {
    font-size: 1.4rem;
    color: var(--text-primary, #1e293b);
    margin: 0 0 6px 0;
}

.subscribe-content p {
    font-size: 0.95rem;
    color: var(--text-secondary, #64748b);
    margin: 0;
}

.subscribe-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

/* End-of-article inline newsletter CTA — see partials/newsletter-cta.html */
.newsletter-cta {
    margin: 2.5rem 0 1.5rem;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-left: 3px solid var(--accent-primary, #3b82f6);
    border-radius: 8px;
    background: var(--bg-secondary, #f8fafc);
}

[data-theme="dark"] .newsletter-cta {
    background: #111827;
    border-color: #334155;
    border-left-color: var(--accent-primary, #3b82f6);
}

.newsletter-cta-lead {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 0.35rem;
    line-height: 1.4;
}

.newsletter-cta-sub {
    font-size: 0.9rem;
    color: var(--text-secondary, #64748b);
    margin: 0 0 1rem;
}

.newsletter-cta-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-cta-form input[type="email"] {
    flex: 1 1 220px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #1e293b);
}

[data-theme="dark"] .newsletter-cta-form input[type="email"] {
    background: #0f172a;
    border-color: #334155;
}

.newsletter-cta-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.newsletter-cta-form button {
    padding: 11px 22px;
    border: 0;
    border-radius: 6px;
    background: var(--accent-primary, #3b82f6);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: filter 0.15s;
}

.newsletter-cta-form button:hover { filter: brightness(0.95); }
.newsletter-cta-form button:disabled { opacity: 0.6; cursor: not-allowed; }

.newsletter-cta-status {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    min-height: 1.2em;
}

.newsletter-cta-status.success { color: #16a34a; }
.newsletter-cta-status.error   { color: #dc2626; }

.subscribe-form-wrapper .subscribe-alt {
    width: auto;
    text-align: right;
}

.subscribe-form {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.subscribe-form input[type="email"] {
    padding: 12px 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #1e293b);
    width: 220px;
    -webkit-appearance: none;
    appearance: none;
}

[data-theme="dark"] .subscribe-form input[type="email"] {
    background: #1e293b;
    border-color: #334155;
}

.subscribe-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.subscribe-form input[type="email"]::placeholder {
    color: var(--text-muted, #94a3b8);
    opacity: 1;
}

.subscribe-form input[type="email"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.subscribe-form button {
    padding: 12px 24px;
    background: #2563eb; /* Blue-600 for 4.5:1 contrast */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

.subscribe-form button:hover {
    background: var(--accent-hover, #2563eb);
    transform: translateY(-1px);
}

.subscribe-form button:active {
    transform: translateY(0);
}

.subscribe-form button:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.subscribe-form button:focus:not(:focus-visible) {
    outline: none;
}

.subscribe-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .subscribe-box {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
        gap: 24px;
    }

    .subscribe-content {
        flex: none;
    }

    .subscribe-form-wrapper {
        width: 100%;
        align-items: center;
    }

    .subscribe-form-wrapper .subscribe-alt {
        text-align: center;
    }

    .subscribe-form {
        width: 100%;
        flex-direction: column;
    }

    .subscribe-form input[type="email"] {
        width: 100%;
    }

    .subscribe-form button {
        width: 100%;
    }
}

.subscribe-alt {
    margin-top: 0;
    font-size: 0.85rem;
    color: var(--text-muted, #94a3b8);
}

.subscribe-alt a {
    color: var(--accent-primary, #3b82f6);
    text-decoration: none;
}

.subscribe-alt a:hover {
    text-decoration: underline;
}

/* ===================================
   Load More Card (in-grid pagination)
   =================================== */
/* Use .blog-card.load-more-card for higher specificity over .blog-card base */
.blog-card.load-more-card {
    border: 2px dashed var(--border-color);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}

.blog-card.load-more-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .blog-card.load-more-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.load-more-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 400 / 220;
    overflow: hidden;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    background: var(--bg-secondary);
}

.blog-card.load-more-card:hover .load-more-card-image {
    opacity: 1;
}

.load-more-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.load-more-card-content {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.load-more-card-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.load-more-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.load-more-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.load-more-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-top: auto;
    padding-top: 0.5rem;
}

.load-more-card-cta svg {
    transition: transform 0.2s ease;
}

.blog-card.load-more-card:hover .load-more-card-cta svg {
    transform: translateY(2px);
}

.blog-card.load-more-card.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

/* Mobile: ensure load-more card image fills properly */
@media (max-width: 768px) {
    .load-more-card-image {
        aspect-ratio: 400 / 220;
    }

    .load-more-card-content {
        padding: 0.875rem 1rem 1rem;
    }
}

.browse-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.browse-links .archive-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.browse-links .archive-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

[data-theme="dark"] .browse-links .archive-link {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .browse-links .archive-link:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

/* Tag Chips Container - Collapsible */
.tag-chips-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    max-width: 800px;
}

.tag-chips-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    flex-shrink: 0;
    padding-top: 0.4rem;
}

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

.tag-chips-visible {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tag-chips-hidden {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-chips-hidden.expanded {
    display: flex;
}

.tag-chip {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tag-chip:hover {
    background: #2563eb; /* Blue-600 for 4.5:1 contrast */
    border-color: #2563eb;
    color: white;
}

.tag-show-more {
    padding: 0.4rem 0.85rem;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 9999px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-show-more:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tag-show-more[aria-expanded="true"] {
    border-style: solid;
    background: var(--bg-card);
}

[data-theme="dark"] .tag-chip {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .tag-chip:hover {
    background: #2563eb; /* Blue-600 for 4.5:1 contrast */
    border-color: #2563eb;
}

[data-theme="dark"] .tag-show-more {
    border-color: #334155;
}

@media (max-width: 640px) {
    .tag-chips-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ===================================
   Numbered Pagination (category/tag pages)
   =================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-prev,
.pagination-next {
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-prev:hover,
.pagination-next:hover {
    background: #2563eb; /* Blue-600 for 4.5:1 contrast */
    color: white;
    border-color: var(--accent-primary);
}

.pagination-prev.disabled,
.pagination-next.disabled {
    color: var(--text-muted);
    pointer-events: none;
    opacity: 0.5;
}

.pagination-pages {
    display: flex;
    gap: 0.5rem;
}

.pagination-pages a,
.pagination-pages .pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-pages a {
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.pagination-pages a:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.pagination-current {
    background: #2563eb; /* Blue-600 for 4.5:1 contrast */
    color: white;
}

@media (max-width: 640px) {
    .pagination {
        flex-wrap: wrap;
    }

    .pagination-pages {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }
}

/* Archive Link */
.archive-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.archive-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.archive-link a:hover {
    color: var(--accent-primary);
}

/* ===================================
   Category & Tag Pages
   =================================== */
/* Breadcrumbs in section headers - center as inline group */
.category-header .article-breadcrumbs,
.tag-header .article-breadcrumbs,
.archive-header .article-breadcrumbs,
.browse-header .article-breadcrumbs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

/* Prevent section breadcrumbs from stretching full width */
.category-header .container,
.tag-header .container,
.archive-header .container,
.browse-header .container {
    text-align: center;
}

.category-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0.75rem auto 0;
    line-height: 1.6;
}

.category-count,
.tag-count {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Category icon in header */
.category-header h1,
.browse-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 0 auto;
}

.category-icon-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.category-icon-large svg {
    width: 36px;
    height: 36px;
    stroke: currentColor;
    stroke-width: 1.5;
}

@media (max-width: 768px) {
    .category-icon-large svg {
        width: 28px;
        height: 28px;
    }
}

/* Category & Tag Index Pages (browse all) */
.browse-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.browse-card {
    flex: 0 1 calc(33.333% - 1rem);
    min-width: 280px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.browse-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .browse-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.browse-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.browse-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 8px;
    flex-shrink: 0;
}

.browse-card-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.5;
}

.browse-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.browse-card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.browse-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.browse-card-count {
    font-weight: 500;
}

.browse-card-arrow {
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.browse-card:hover .browse-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Tag cloud for tag index */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    justify-content: center;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.tag-cloud-item:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.tag-cloud-item .tag-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

/* Scale tag size by popularity */
.tag-cloud-item.tag-large {
    font-size: 1rem;
    padding: 0.6rem 1.25rem;
}

.tag-cloud-item.tag-medium {
    font-size: 0.9rem;
}

.tag-cloud-item.tag-small {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

[data-theme="dark"] .tag-cloud-item {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .tag-cloud-item .tag-count {
    background: rgba(51, 65, 85, 0.6);
}

/* Tag groups for organized tag index */
.tag-groups {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.tag-group {
    text-align: center;
}

.tag-group-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tag-group-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.tag-group .tag-cloud {
    margin-top: 0;
}

/* Browse page header variant */
.browse-header {
    padding: 12rem 0 4rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
}

[data-theme="dark"] .browse-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.browse-header h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.browse-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ===================================
   Archive Page
   =================================== */

.archive-main {
    padding: 4rem 0;
    min-height: 50vh;
}

/* Archive Toolbar (hidden without JS) */
.archive-toolbar {
    display: none;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    position: sticky;
    top: 72px;
    z-index: 10;
}

.archive-toolbar.js-active {
    display: flex;
}

.archive-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.archive-filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--cat-color, var(--text-muted));
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--cat-color, var(--accent-primary));
    border-color: var(--cat-color, var(--accent-primary));
    color: #fff;
}

.cat-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.filter-btn.active .cat-icon {
    color: #fff !important;
}

.archive-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.archive-sort {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
}

.expand-collapse-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.expand-collapse-btn:hover {
    color: var(--text-primary);
}

.archive-status {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: none;
}

.archive-status.js-active {
    display: block;
}

/* Collapsible Year Sections */
details.archive-year {
    margin-bottom: 2rem;
}

details.archive-year > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-primary);
    margin-bottom: 1.25rem;
}

details.archive-year > summary::-webkit-details-marker {
    display: none;
}

details.archive-year > summary h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.archive-year .article-count {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.chevron {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

details.archive-year[open] > summary .chevron {
    transform: rotate(90deg);
}

.archive-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Enriched Article Cards */
.archive-item {
    display: grid;
    grid-template-columns: 4px 1fr;
    gap: 0;
    align-items: stretch;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.archive-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.archive-item.hidden {
    display: none;
}

.archive-year.year-hidden {
    display: none;
}

.archive-cat-bar {
    display: block;
    width: 4px;
    min-height: 100%;
    border-radius: 4px 0 0 4px;
}

.archive-item-content {
    padding: 0.875rem 1.25rem;
}

.archive-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.archive-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.archive-title {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1.4;
    display: block;
    transition: color 0.2s ease;
}

.archive-title:hover {
    color: var(--accent-primary);
}

.archive-category {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    white-space: nowrap;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

a.archive-category:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.archive-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.archive-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.archive-read-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Archive Responsive */
@media (max-width: 640px) {
    .archive-toolbar {
        flex-direction: column;
        align-items: stretch;
        top: 60px;
    }

    .archive-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .archive-controls {
        justify-content: space-between;
    }

    .archive-sort {
        flex: 1;
    }

    .archive-subtitle {
        display: none;
    }

    .archive-item-content {
        padding: 0.75rem 1rem;
    }
}

/* Archive Dark Mode */
[data-theme="dark"] .archive-item {
    background: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .archive-item:hover {
    background: rgba(30, 41, 59, 0.8);
}

[data-theme="dark"] .archive-toolbar {
    background: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .archive-sort {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(148, 163, 184, 0.2);
}

/* ===================================
   Author Block (in articles) - Compact
   =================================== */
a.article-author-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-top: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

a.article-author-block:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.04);
}

.author-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

a.article-author-block:hover .author-photo {
    border-color: var(--accent-primary);
}

.author-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.author-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

a.article-author-block:hover .author-name {
    color: var(--accent-primary);
}

.author-sep {
    color: var(--text-muted);
}

.author-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

[data-theme="dark"] a.article-author-block {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] a.article-author-block:hover {
    background: rgba(59, 130, 246, 0.08);
}

[data-theme="dark"] .author-photo {
    border-color: #475569;
}

/* ===================================
   About Page
   =================================== */
.about-hero {
    position: relative;
    padding: 16rem 0 4rem;  /* Extra padding to visually align with other pages (has photo layout) */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Subtle blueprint grid overlay */
.about-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

[data-theme="dark"] .about-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .about-hero::before {
    background-image:
        linear-gradient(rgba(96, 165, 250, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, 0.06) 1px, transparent 1px);
}

.about-hero-content {
    position: relative;  /* Ensure content stays above grid */
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.about-hero-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

[data-theme="dark"] .about-hero-photo {
    border-color: #334155;
}

.about-hero-text h1 {
    font-size: clamp(2.25rem, 5vw, 3rem);  /* Unified hero H1 size */
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.about-hero-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.about-hero-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .about-hero {
        padding: 11rem 0 3rem;  /* Extra padding to visually align (has photo layout) */
    }

    .about-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .about-hero-photo {
        width: 140px;
        height: 140px;
    }

    .about-hero-links {
        justify-content: center;
    }
}

.about-main {
    padding: 4rem 0;
}

.about-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 3.5rem;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-primary);
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-section a {
    color: var(--accent-primary);
    text-decoration: none;
}

.about-section a:hover {
    text-decoration: underline;
}

.about-work-grid {
    display: grid;
    gap: 1.5rem;
}

.about-work-item {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.about-work-item h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.about-work-item h3 a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.about-work-item p {
    font-size: 0.95rem;
    margin: 0;
}

[data-theme="dark"] .about-work-item {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

.about-roles,
.about-patents {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-roles li,
.about-patents li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-roles li:last-child,
.about-patents li:last-child {
    border-bottom: none;
}

.about-roles strong {
    color: var(--text-primary);
}

.about-roles a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.about-cta-section {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(139, 92, 246, 0.03) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.about-cta-section h2 {
    border-bottom: none;
    padding-bottom: 0;
}

.about-cta-section p {
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

[data-theme="dark"] .about-cta-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

/* Operating Principles Section */
.about-principles .principles-intro {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

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

.principle-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.principle-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.principle-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.principle-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

[data-theme="dark"] .principle-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .principle-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 640px) {
    .principles-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Start Here Page
   =================================== */
.start-here-header {
    padding: 14rem 0 4rem;  /* Unified hero padding across all pages */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
}

[data-theme="dark"] .start-here-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.start-here-header h1 {
    font-size: clamp(2.25rem, 5vw, 3rem);  /* Unified hero H1 size */
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.start-here-tagline {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.start-here-hook {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 700px;
}

.start-here-header p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.start-here-main {
    padding: 4rem 0;
}

.reading-tracks {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.reading-track {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: border-color 0.2s ease;
}

.reading-track:hover {
    border-color: var(--accent-primary);
}

[data-theme="dark"] .reading-track {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

.track-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.track-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.track-icon {
    flex-shrink: 0;
    color: var(--accent-primary);
}

.track-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.track-roast {
    font-style: italic;
    color: var(--text-muted);
}

.track-articles {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: track-item;
}

.track-articles li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0;
    padding-left: 2.5rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.track-articles li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.track-articles li::before {
    counter-increment: track-item;
    content: counter(track-item);
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb; /* Blue-600 for 4.5:1 contrast */
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50%;
}

.track-articles li a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.track-articles li a:hover {
    color: var(--accent-primary);
}

.track-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Start Track Button */
.track-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.track-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-primary);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.track-start-btn:hover {
    background: var(--accent-primary-hover, #1d4ed8);
    transform: translateX(3px);
}

.track-start-btn svg {
    transition: transform 0.15s ease;
}

.track-start-btn:hover svg {
    transform: translateX(3px);
}

.track-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.track-time svg {
    opacity: 0.7;
}

@media (max-width: 480px) {
    .track-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .track-start-btn {
        width: 100%;
        justify-content: center;
    }
}

.start-here-cta {
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.start-here-cta p {
    color: var(--text-secondary);
}

.start-here-cta a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.start-here-cta a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .start-here-header {
        padding: 10rem 0 3rem;  /* Unified mobile hero padding */
    }

    .reading-track {
        padding: 1.5rem;
    }

    .track-articles li {
        padding-left: 2rem;
    }

    .track-articles li::before {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }
}

/* Start Here - Enhanced Sections */
.start-here-hook {
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 650px;
}

/* Audience Section */
.start-here-audience {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.start-here-audience h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.audience-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audience-list li {
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.5;
}

.audience-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 600;
}

.audience-list li strong {
    color: var(--text-primary);
}

[data-theme="dark"] .start-here-audience {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

/* Must-Read Section */
.start-here-must-read {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.start-here-must-read h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

.must-read-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.must-read-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.must-read-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.must-read-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.must-read-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb; /* Blue-600 for 4.5:1 contrast with white */
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50%;
}

.must-read-content h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.must-read-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.must-read-why {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
}

[data-theme="dark"] .must-read-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .must-read-card:hover {
    border-color: var(--accent-primary);
}

/* About Section */
.start-here-about {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.start-here-about .about-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.about-photo-inline {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-header h2 {
    font-size: 1.4rem;
    margin: 0;
    color: var(--text-primary);
}

.about-header .author-name {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.about-text p strong {
    color: var(--text-primary);
}

.start-here-about .about-stats {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 1.5rem;
    padding: 1.25rem 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.30);
}

.start-here-about .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.start-here-about .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1;
}

.start-here-about .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.35rem;
}

/* Legacy classes for backward compatibility */
.about-intro {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.about-intro h2 {
    margin: 0;
    font-size: 1.4rem;
}

.about-intro p {
    margin: 0;
    color: var(--text-secondary);
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-text p strong {
    color: var(--text-primary);
}

.about-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.about-link:hover {
    text-decoration: underline;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    text-align: center;
    min-width: 140px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

[data-theme="dark"] .start-here-about .about-content {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .start-here-about .about-stats {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.25);
}

/* Services Section */
.start-here-services {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.start-here-services h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.start-here-services > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.03);
    border-radius: 8px;
}

.service-item strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.service-item span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.services-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.services-link:hover {
    text-decoration: underline;
}

[data-theme="dark"] .start-here-services {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .service-item {
    background: rgba(59, 130, 246, 0.08);
}

/* Reading Tracks Section */
.start-here-tracks {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.start-here-tracks h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

.tracks-intro {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Newsletter Section */
.start-here-newsletter {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.newsletter-content {
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.newsletter-content > p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto 1rem;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.newsletter-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.newsletter-note a {
    color: var(--accent-primary);
    text-decoration: none;
}

.newsletter-note a:hover {
    text-decoration: underline;
}

[data-theme="dark"] .newsletter-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(59, 130, 246, 0.12) 100%);
    border-color: #334155;
}

/* Browse Section */
.start-here-browse {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.start-here-browse h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.start-here-browse .browse-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.browse-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.browse-link:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.browse-title {
    font-weight: 600;
    color: var(--text-primary);
}

.browse-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

[data-theme="dark"] .browse-link {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

/* Contact Section */
.start-here-contact {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
}

.start-here-contact h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.start-here-contact p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .start-here-about .about-content {
        padding: 1.5rem;
    }

    .about-intro {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .about-intro h2 {
        font-size: 1.25rem;
    }

    .about-photo-inline {
        width: 80px;
        height: 80px;
    }

    .about-text {
        text-align: center;
    }

    .start-here-about .about-stats {
        flex-direction: row;
        justify-content: space-around;
        padding: 1rem 0.5rem;
    }

    .start-here-about .stat-number {
        font-size: 1.5rem;
    }

    .start-here-about .stat-label {
        font-size: 0.65rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .start-here-browse .browse-links {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

/* ===================================
   Direct Reply CTA Section
   =================================== */
.article-reply {
    max-width: 800px;
    margin: 4rem auto 0;
    padding: 2.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-radius: 12px;
}

.article-reply h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.article-reply p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.95rem;
}

.article-reply .btn {
    display: inline-block;
}

/* Dark mode support */
[data-theme="dark"] .article-reply {
    border-top-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(99, 102, 241, 0.08) 100%);
}

/* ===== Sticky Table of Contents ===== */
/* Only shown on desktop for articles with 5+ sections */

.article-toc {
    display: none; /* Hidden by default, shown by JS for long articles */
    position: fixed;
    top: 120px;
    left: max(16px, calc((100vw - 1400px) / 2));
    width: 220px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding: 1rem 0;
    z-index: 50;
    transition: opacity 0.2s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color, #e2e8f0) transparent;
}

.article-toc::-webkit-scrollbar {
    width: 4px;
}

.article-toc::-webkit-scrollbar-track {
    background: transparent;
}

.article-toc::-webkit-scrollbar-thumb {
    background: var(--border-color, #e2e8f0);
    border-radius: 2px;
}

.article-toc::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted, #94a3b8);
}

.article-toc.visible {
    display: block;
}

.article-toc-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

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

.article-toc-item {
    margin: 0;
    padding: 0;
}

.article-toc-link {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
}

.article-toc-link:hover {
    color: var(--text-primary);
    border-left-color: var(--border-color);
}

.article-toc-link.active {
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    font-weight: 500;
}

/* Hide TOC on smaller screens */
@media (max-width: 1400px) {
    .article-toc {
        display: none !important;
    }
}

/* Dark mode TOC */
[data-theme="dark"] .article-toc-link:hover {
    border-left-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .article-toc-link.active {
    border-left-color: var(--accent-primary);
}

/* ===================================
   Optional Visual Elements (Opt-in)
   Articles CAN use these, not required
   =================================== */

/* Callout Box - Highlighted insight with green accent */
.article-content .callout-box {
    position: relative;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-left: 4px solid #22c55e;
    border-radius: 0 10px 10px 0;
}

.article-content .callout-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: #15803d;
}

[data-theme="dark"] .article-content .callout-box h4 {
    color: #4ade80;
}

.article-content .callout-box p {
    margin: 0;
    color: var(--text-primary);
}

.article-content .callout-box p:not(:last-child) {
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .article-content .callout-box {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(16, 185, 129, 0.06) 100%);
    border-color: rgba(34, 197, 94, 0.3);
    border-left-color: #22c55e;
}

/* Stat Highlight - Large statistic with citation */
.article-content .stat-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    margin: 2.5rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
}

.article-content .stat-highlight .stat-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.article-content .stat-highlight .stat-label {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.article-content .stat-highlight .stat-source {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-content .stat-highlight .stat-source a {
    color: var(--text-muted);
    text-decoration: underline;
}

.article-content .stat-highlight .stat-source a:hover {
    color: var(--accent-primary);
}

[data-theme="dark"] .article-content .stat-highlight {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

/* Featured Title - For important titles like patents, product names */
.article-content .featured-title {
    display: block;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(99, 102, 241, 0.04) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.5;
}

.article-content .featured-title::before {
    content: "📜";
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-style: normal;
}

.article-content .featured-title.no-icon::before {
    display: none;
}

[data-theme="dark"] .article-content .featured-title {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.06) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Definition - Inline term definition */
.article-content .definition {
    display: inline;
    border-bottom: 1px dashed var(--text-muted);
    cursor: help;
}

.article-content .definition-block {
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 8px 8px 0;
}

.article-content .definition-block .term {
    font-weight: 600;
    color: var(--text-primary);
}

.article-content .definition-block .meaning {
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

[data-theme="dark"] .article-content .definition-block {
    background: rgba(99, 102, 241, 0.1);
}

/* ============================================
   Code Block Styling - Modern Minimal Design
   Inspired by: One Dark Pro, GitHub Dark
   ============================================ */

/* Inline code */
.article-content code {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
    font-size: 0.85em;
    font-weight: 450;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.10) 100%);
    color: #6366f1;
    padding: 0.15em 0.45em;
    border-radius: 5px;
    border: 1px solid rgba(99, 102, 241, 0.30);
    white-space: nowrap;
}

[data-theme="dark"] .article-content code {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.12) 100%);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.25);
}

/* Code blocks */
.article-content pre {
    position: relative;
    background: linear-gradient(180deg, #0a0e14 0%, #131920 100%);
    border-radius: 12px;
    padding: 0;
    margin: 2rem 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.08);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.15),
        0 2px 4px -1px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Code block header bar */
.article-content pre::before {
    content: '';
    display: block;
    height: 38px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    padding: 0 1rem;
}

/* Window dots decoration */
.article-content pre::after {
    content: '';
    position: absolute;
    top: 13px;
    left: 16px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow:
        20px 0 0 #f59e0b,
        40px 0 0 #22c55e;
}

.article-content pre code {
    display: block;
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e2e8f0;
    background: none;
    padding: 1.25rem 1.5rem 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: pre;
    border: none;
}

/* Custom scrollbar for code blocks */
.article-content pre code::-webkit-scrollbar {
    height: 8px;
}

.article-content pre code::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.article-content pre code::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 4px;
}

.article-content pre code::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.35);
}

/* Syntax highlighting handled by Prism.js (loaded conditionally) */
/* See /css/prism-custom.0c417812.css for token colors */

/* Diagram Box - ASCII art and visual diagrams */
.article-content .diagram-box {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow-x: auto;
}

[data-theme="dark"] .article-content .diagram-box {
    background: rgba(30, 41, 59, 0.5);
    border-color: #334155;
}

.article-content .ascii-diagram {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    white-space: pre;
}

/* ============================================
   Content Block Styles: Napkin, Notepad, Paper
   Visual containers for different content types
   ============================================ */

/* Napkin - informal ideas, rough sketches, quick thoughts */
.article-content .napkin {
    position: relative;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 4px;
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    font-family: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #78350f;
    box-shadow:
        2px 3px 8px rgba(0, 0, 0, 0.12),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
    transform: rotate(-0.5deg);
    border: none;
}

.article-content .napkin::before {
    content: '💡';
    position: absolute;
    top: -12px;
    right: 16px;
    font-size: 1.5rem;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.2));
}

/* Napkin code/emphasis styling */
.article-content .napkin code {
    background: rgba(120, 53, 15, 0.1);
    color: #92400e;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
}

.article-content .napkin strong {
    color: #451a03;
    text-decoration: underline;
    text-decoration-style: wavy;
    text-decoration-color: rgba(120, 53, 15, 0.4);
}

[data-theme="dark"] .article-content .napkin {
    background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
    color: #fef3c7;
    box-shadow:
        2px 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .article-content .napkin code {
    background: rgba(254, 243, 199, 0.15);
    color: #fde68a;
}

[data-theme="dark"] .article-content .napkin strong {
    color: #fef3c7;
}

/* Notepad - structured notes, lined paper feel */
.article-content .notepad {
    position: relative;
    background:
        repeating-linear-gradient(
            transparent,
            transparent 27px,
            #c9bdb0 27px,
            #c9bdb0 28px
        ),
        linear-gradient(180deg, #fffbf5 0%, #faf5ef 100%);
    border-left: 4px solid #ef4444;
    border-radius: 0 8px 8px 0;
    padding: 1.5rem 1.75rem 1.5rem 2.5rem;
    margin: 2rem 0;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.75rem; /* Matches line spacing */
    color: #1e293b;
    box-shadow:
        3px 3px 10px rgba(0, 0, 0, 0.08),
        -1px 0 0 rgba(0, 0, 0, 0.02);
}

/* Red margin line */
.article-content .notepad::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(239, 68, 68, 0.3);
}

/* Hole punches decoration */
.article-content .notepad::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #f1f5f9;
    border-radius: 50%;
    box-shadow:
        0 -40px 0 #f1f5f9,
        0 40px 0 #f1f5f9;
}

.article-content .notepad code {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
}

.article-content .notepad strong {
    color: #0f172a;
}

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

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

[data-theme="dark"] .article-content .notepad {
    background:
        repeating-linear-gradient(
            transparent,
            transparent 27px,
            rgba(148, 163, 184, 0.15) 27px,
            rgba(148, 163, 184, 0.15) 28px
        ),
        linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    border-left-color: #dc2626;
    box-shadow:
        3px 3px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .article-content .notepad::before {
    background: rgba(220, 38, 38, 0.4);
}

[data-theme="dark"] .article-content .notepad::after {
    background: #334155;
    box-shadow:
        0 -40px 0 #334155,
        0 40px 0 #334155;
}

[data-theme="dark"] .article-content .notepad code {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
}

[data-theme="dark"] .article-content .notepad strong {
    color: #f8fafc;
}

/* Paper - clean, formal, whiteboard-style */
.article-content .paper {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03),
        0 10px 20px -5px rgba(0, 0, 0, 0.05);
}

/* Subtle fold corner */
.article-content .paper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 24px 24px 0;
    border-color: transparent #e2e8f0 transparent transparent;
}

.article-content .paper code {
    background: #f1f5f9;
    color: #475569;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
}

.article-content .paper strong {
    color: #0f172a;
}

.article-content .paper h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #1e293b;
    border-bottom: 2px solid #94a3b8;
    padding-bottom: 0.5rem;
}

[data-theme="dark"] .article-content .paper {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    color: #cbd5e1;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.2),
        0 2px 4px -1px rgba(0, 0, 0, 0.1),
        0 10px 20px -5px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .article-content .paper::after {
    border-color: transparent #475569 transparent transparent;
}

[data-theme="dark"] .article-content .paper code {
    background: rgba(51, 65, 85, 0.8);
    color: #94a3b8;
}

[data-theme="dark"] .article-content .paper strong {
    color: #f1f5f9;
}

[data-theme="dark"] .article-content .paper h4 {
    color: #f1f5f9;
    border-bottom-color: #475569;
}

.article-content .paper pre {
    background: #f8fafc;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    box-shadow: none;
    color: #334155;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

[data-theme="dark"] .article-content .paper pre {
    background: rgba(15, 23, 42, 0.6);
    border-color: #475569;
    color: #cbd5e1;
}

/* Content block variants - can add class="napkin idea" etc */
.article-content .napkin.sketch::before { content: '✏️'; }
.article-content .napkin.idea::before { content: '💡'; }
.article-content .napkin.warning::before { content: '⚠️'; }
.article-content .napkin.question::before { content: '🤔'; }

/* Terminal - command-line output, retro green-on-black */
.article-content .terminal {
    position: relative;
    background: #0a0a0a;
    border-radius: 8px;
    padding: 0;
    margin: 2rem 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #22c55e;
    border: 1px solid #1a1a1a;
    overflow: hidden;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Terminal title bar */
.article-content .terminal::before {
    content: 'terminal';
    display: block;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    color: #666;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #222;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-content .terminal pre {
    margin: 0;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    box-shadow: none;
    color: inherit;
    overflow-x: auto;
    max-width: 100%;
    white-space: pre;
    word-break: normal;
}

.article-content .terminal pre::before,
.article-content .terminal pre::after {
    display: none;
}

.article-content .terminal pre code {
    color: #22c55e;
    background: transparent;
    padding: 0;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

/* Terminal prompt styling */
.article-content .terminal .prompt { color: #3b82f6; }
.article-content .terminal .output { color: #94a3b8; text-shadow: none; }
.article-content .terminal .error { color: #ef4444; }
.article-content .terminal .success { color: #22c55e; }

/* Blueprint - architecture diagrams, technical drawings */
.article-content .blueprint {
    position: relative;
    background:
        linear-gradient(rgba(147, 197, 253, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 197, 253, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, #1e3a5f 0%, #172554 100%);
    background-size: 20px 20px, 20px 20px, 100% 100%;
    border: 2px solid #3b82f6;
    border-radius: 4px;
    padding: 2rem;
    margin: 2rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e0f2fe;
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.article-content .blueprint::before {
    content: 'BLUEPRINT';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.65rem;
    color: rgba(191, 219, 254, 0.4);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.article-content .blueprint code {
    background: rgba(255, 255, 255, 0.1);
    color: #93c5fd;
    padding: 0.1em 0.3em;
    border-radius: 2px;
}

.article-content .blueprint strong {
    color: #ffffff;
}

.article-content .blueprint h4 {
    color: #60a5fa;
    margin-top: 0;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

.article-content .blueprint pre {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    color: #e0f2fe;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-align: left;
    white-space: pre;
}

.article-content .blueprint pre::before,
.article-content .blueprint pre::after {
    display: none;
}

/* Chalkboard - teaching moments, explanations */
.article-content .chalkboard {
    position: relative;
    background: linear-gradient(180deg, #1a3d2e 0%, #0f2419 100%);
    border: 8px solid #5d4037;
    border-radius: 4px;
    padding: 2rem 2.5rem;
    margin: 2rem 0;
    font-family: 'Caveat', 'Segoe Script', cursive;
    font-size: 1.35rem;
    line-height: 1.8;
    color: #e8f5e9;
    box-shadow:
        inset 0 0 80px rgba(0, 0, 0, 0.4),
        0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Chalk dust effect */
.article-content .chalkboard::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent 100%);
}

.article-content .chalkboard code {
    background: rgba(255, 255, 255, 0.1);
    color: #a5d6a7;
    padding: 0.1em 0.3em;
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75em;
}

.article-content .chalkboard strong {
    color: #ffeb3b;
    text-decoration: underline;
}

.article-content .chalkboard em {
    color: #81d4fa;
}

/* Post-it / Sticky Note - quick reminders */
.article-content .postit {
    position: relative;
    background: linear-gradient(180deg, #fef08a 0%, #fde047 100%);
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 320px;
    font-family: 'Caveat', 'Segoe Script', cursive;
    font-size: 1.25rem;
    line-height: 1.5;
    color: #422006;
    transform: rotate(1deg);
    box-shadow:
        3px 3px 8px rgba(0, 0, 0, 0.15),
        0 0 1px rgba(0, 0, 0, 0.1);
}

/* Sticky tape effect */
.article-content .postit::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 60px;
    height: 20px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.article-content .postit strong {
    color: #1c1917;
    text-decoration: underline;
}

.article-content .postit.pink {
    background: linear-gradient(180deg, #fda4af 0%, #fb7185 100%);
    color: #4c0519;
}

.article-content .postit.blue {
    background: linear-gradient(180deg, #93c5fd 0%, #60a5fa 100%);
    color: #1e3a5f;
}

.article-content .postit.green {
    background: linear-gradient(180deg, #86efac 0%, #4ade80 100%);
    color: #14532d;
}

/* Receipt - cost breakdowns, itemized lists */
.article-content .receipt {
    position: relative;
    background: #fffef5;
    border: 1px dashed #a3a3a3;
    border-radius: 0;
    padding: 1.5rem 1.25rem;
    margin: 2rem auto;
    max-width: 360px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Perforated top edge */
.article-content .receipt::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 8px,
        #fffef5 8px,
        #fffef5 16px
    );
}

.article-content .receipt .line-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px dotted #e5e5e5;
}

.article-content .receipt .total {
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 2px solid #374151;
    font-weight: 700;
    font-size: 0.9rem;
}

.article-content .receipt strong {
    color: #111827;
}

[data-theme="dark"] .article-content .receipt {
    background: #1a1a1a;
    border-color: #404040;
    color: #d4d4d4;
}

[data-theme="dark"] .article-content .receipt::before {
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 8px,
        #1a1a1a 8px,
        #1a1a1a 16px
    );
}

[data-theme="dark"] .article-content .receipt .line-item {
    border-bottom-color: #333;
}

[data-theme="dark"] .article-content .receipt .total {
    border-top-color: #d4d4d4;
}

/* Data Tables - enhanced styling */
.article-content .data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    margin: 1.5rem 0 2rem;
    border: 1px solid var(--border-color);
}

.article-content .data-table th,
.article-content .data-table td {
    padding: 0.875rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.article-content .data-table th {
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.article-content .data-table td {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.article-content .data-table tr:last-child td {
    border-bottom: none;
}

.article-content .data-table tr:hover td {
    background: rgba(59, 130, 246, 0.04);
}

[data-theme="dark"] .article-content .data-table {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

[data-theme="dark"] .article-content .data-table th {
    background: rgba(59, 130, 246, 0.12);
}

[data-theme="dark"] .article-content .data-table tr:hover td {
    background: rgba(59, 130, 246, 0.08);
}

/* ===================================
   Evidence/Receipts Block
   Consolidated primary sources section
   =================================== */
.article-content .sources-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    border-radius: 0 12px 12px 0;
}

.article-content .sources-block h3 {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    font-weight: 700;
}

.article-content .sources-block ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-content .sources-block li {
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-content .sources-block li:last-child {
    border-bottom: none;
}

.article-content .sources-block li a {
    display: block;
    padding: 0.65rem 0.75rem;
    margin: 0 -0.75rem;
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s ease;
}

.article-content .sources-block li a:hover {
    background: rgba(59, 130, 246, 0.06);
}

.article-content .sources-block li a .source-title {
    font-weight: 600;
}

.article-content .sources-block li a:hover .source-title {
    color: var(--accent-primary);
    text-decoration: underline;
}

.article-content .sources-block li a .source-desc {
    color: var(--text-secondary);
}

.article-content .sources-block .evidence-note {
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

[data-theme="dark"] .article-content .sources-block {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
    border-left-color: var(--accent-primary);
}

[data-theme="dark"] .article-content .sources-block li a:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* ===================================
   Decision Matrix
   Quick assessment tables for decision articles
   =================================== */
.article-content .decision-matrix {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.06) 0%, rgba(16, 185, 129, 0.03) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    border-radius: 12px;
}

.article-content .decision-matrix h3 {
    margin: 0 0 1.25rem 0;
    font-size: 1.1rem;
    color: #15803d;
    font-weight: 600;
}

.article-content .decision-matrix table {
    width: 100%;
    margin: 0;
    background: transparent;
}

.article-content .decision-matrix th,
.article-content .decision-matrix td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(34, 197, 94, 0.15);
}

.article-content .decision-matrix th {
    background: rgba(34, 197, 94, 0.08);
    color: #166534;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.article-content .decision-matrix tr:last-child td {
    border-bottom: none;
}

.article-content .decision-matrix .verdict-yes {
    color: #15803d;
    font-weight: 600;
}

.article-content .decision-matrix .verdict-no {
    color: #dc2626;
    font-weight: 600;
}

.article-content .decision-matrix .verdict-maybe {
    color: #92400e; /* Amber-800: 6.5:1 on white */
    font-weight: 600;
}

.article-content .decision-matrix .matrix-caption {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
    text-align: center;
}

[data-theme="dark"] .article-content .decision-matrix {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .article-content .decision-matrix h3 {
    color: #4ade80;
}

[data-theme="dark"] .article-content .decision-matrix th {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
}

[data-theme="dark"] .article-content .decision-matrix .verdict-yes {
    color: #4ade80;
}

[data-theme="dark"] .article-content .decision-matrix .verdict-no {
    color: #f87171;
}

[data-theme="dark"] .article-content .decision-matrix .verdict-maybe {
    color: #fbbf24;
}

/* ===================================
   Stat Visuals
   Simple bar charts for data visualization
   =================================== */
.stat-visual {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.stat-bar-container {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.stat-bar-label {
    min-width: 180px;
    width: 180px;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-bar {
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    transition: width 0.5s ease;
    max-width: 100%;
}

.stat-bar-baseline {
    background: linear-gradient(90deg, #10b981, #34d399);
    color: white;
}

.stat-bar-slower {
    background: linear-gradient(90deg, #ef4444, #f87171);
    color: white;
}

.stat-bar-faster {
    background: linear-gradient(90deg, #2563eb, #3b82f6); /* Darker gradient for contrast */
    color: white;
}

.stat-bar-value {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Width utility classes for stat bars */
.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-33 { width: 33%; }
.w-38 { width: 38%; }
.w-40 { width: 40%; }
.w-41 { width: 41%; }
.w-55 { width: 55.6%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-84 { width: 84%; }
.w-100 { width: 100%; }
.w-119 { width: 119%; }

.stat-caption,
.chart-caption {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0;
    font-style: italic;
}

[data-theme="dark"] .stat-visual {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ===================================
   Mini Case Study
   Compact problem → result blocks
   =================================== */
.case-study-mini {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.case-study-mini h4 {
    font-size: 1rem;
    color: var(--accent-primary);
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.case-study-mini p {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.case-study-mini p:last-child {
    margin-bottom: 0;
}

.case-study-mini strong {
    color: var(--text-primary);
}

[data-theme="dark"] .case-study-mini {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}

/* ============================================
   Code Block Copy Button
   ============================================ */

.article-content pre {
    position: relative;
}

.code-copy-btn {
    position: absolute;
    top: 46px; /* Below 38px title bar + 8px padding */
    right: 0.75rem;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.article-content pre:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
}

.code-copy-btn.copied {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
}

.code-copy-btn svg {
    width: 16px;
    height: 16px;
}

/* Light mode adjustments */
[data-theme="light"] .code-copy-btn,
:root:not([data-theme="dark"]) .code-copy-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .code-copy-btn:hover,
:root:not([data-theme="dark"]) .code-copy-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Mobile: always show copy button */
@media (max-width: 768px) {
    .code-copy-btn {
        opacity: 0.7;
    }
}

/* ===================================
   Key Knowledge / Featured Article
   =================================== */
.key-knowledge {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.key-knowledge-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.key-knowledge-label svg {
    width: 14px;
    height: 14px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .featured-card:hover {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

.featured-card-image {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
}

.featured-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.featured-card:hover .featured-card-image img {
    transform: scale(1.03);
}

.featured-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.featured-card h3 {
    font-size: 1.5rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

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

.featured-card h3 a:hover {
    color: var(--accent-primary);
}

.featured-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.featured-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.featured-card-cta:hover {
    opacity: 0.8;
}

.featured-card-cta svg {
    transition: transform 0.2s ease;
}

.featured-card:hover .featured-card-cta svg {
    transform: translateX(4px);
}

.featured-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.featured-card-meta .blog-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent-primary);
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.featured-card-meta .blog-category:hover {
    opacity: 0.8;
}

.featured-card-meta .blog-category svg {
    width: 14px;
    height: 14px;
}

.featured-card-meta .blog-date {
    color: var(--text-muted);
}

.featured-card .blog-tags {
    margin: 0.75rem 0 0 0;
}

.featured-card .blog-read-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.featured-card .blog-read-time svg {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .featured-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .featured-card h3 {
        font-size: 1.25rem;
    }

    .featured-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ===================================
   Category Pills (Discovery Toolbar)
   =================================== */
.category-pills-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.category-pills-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-pill:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.category-pill.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.category-pill svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.category-pill-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.25rem;
}

.category-pill:hover .category-pill-count {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
}

[data-theme="dark"] .category-pill {
    background: rgba(30, 41, 59, 0.6);
    border-color: #475569;
}

[data-theme="dark"] .category-pill-count {
    background: rgba(51, 65, 85, 0.8);
}

@media (max-width: 640px) {
    .category-pills-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .category-pill {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   Video Link Component
   Usage: <a href="..." class="video-link" target="_blank" rel="noopener">
            <span class="video-icon">▶</span>
            <span class="video-info">
              <span class="video-title">Video Title</span>
              <span class="video-meta">YouTube · 1:23</span>
            </span>
          </a>
   ========================================================================== */

.video-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    padding-right: 2.5rem;
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
    margin: 1rem 0;
    position: relative;
}

.video-link::after {
    content: "↗";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1rem;
    color: var(--text-muted, #9ca3af);
    opacity: 0.5;
    transition: all 0.15s;
}

.video-link:hover::after {
    opacity: 1;
    color: var(--accent-primary, #2563eb);
}

[data-theme="dark"] .video-link::after {
    color: #64748b;
}

[data-theme="dark"] .video-link:hover::after {
    color: #60a5fa;
}

.video-link:hover {
    background: var(--bg-tertiary, #f1f5f9);
    border-color: var(--border-hover, #cbd5e1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .video-link {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .video-link:hover {
    background: #334155;
    border-color: #475569;
}

.video-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #dc2626;
    color: white;
    border-radius: 8px;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.video-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.video-title {
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

[data-theme="dark"] .video-title {
    color: #f1f5f9;
}

.video-meta {
    font-size: 0.85rem;
    color: var(--text-muted, #6b7280);
}

[data-theme="dark"] .video-meta {
    color: #94a3b8;
}

/* ===================================
   Essential Reading (Field Manual page 1)
   =================================== */
.essential-reading {
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.essential-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.essential-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
}

.essential-guide-link {
    font-size: 0.9rem;
    color: var(--accent-primary);
    text-decoration: none;
    white-space: nowrap;
}

.essential-guide-link:hover {
    text-decoration: underline;
}

.essential-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.essential-card {
    display: block;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid #6b7280;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.4s ease;
}

.essential-card.is-swapping-out {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.essential-card.is-swapping-in {
    animation: essentialSwapIn 0.6s ease forwards;
}

@keyframes essentialSwapIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.essential-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.essential-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.essential-card h3 {
    font-size: 1rem;
    line-height: 1.35;
    margin: 0 0 0.4rem;
    color: var(--text-primary);
}

.essential-card p {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: 0;
}

[data-theme="dark"] .essential-card {
    background: rgba(30, 41, 59, 0.5);
    border-color: #334155;
}

[data-theme="dark"] .essential-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 900px) {
    .essential-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .essential-grid {
        grid-template-columns: 1fr;
    }
    .essential-header {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ===== Read Indicators ===== */

/* Blog cards: JS swaps "Read article →" text to "✓ Read" / "↻ Continue reading →" */
.blog-card.is-read {
    opacity: 0.8;
}
.blog-card.is-read .blog-read-more {
    color: #16a34a;
    font-weight: 600;
}
.blog-card.is-reading .blog-read-more {
    color: #2563eb;
    font-weight: 600;
}

/* Archive items: small indicator after meta */
.archive-item.is-read .archive-item-meta::after {
    content: "\2713";
    font-size: 0.7rem;
    font-weight: 700;
    color: #16a34a;
    margin-left: 0.5rem;
    flex-shrink: 0;
}
.archive-item.is-reading .archive-item-meta::after {
    content: "\21BB";
    font-size: 0.7rem;
    font-weight: 700;
    color: #2563eb;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

/* Essential cards: indicator circle, top-right */
.essential-card.is-read {
    position: relative;
}
.essential-card.is-read::after {
    content: "\2713";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: #16a34a;
    border-radius: 50%;
    line-height: 1;
}
.essential-card.is-reading {
    position: relative;
}
.essential-card.is-reading::after {
    content: "\21BB";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: #2563eb;
    border-radius: 50%;
    line-height: 1;
}

/* Featured section: badge top-right */
.latest-article.is-read .featured-card {
    position: relative;
}
.latest-article.is-read .featured-card::after {
    content: "\2713 You've read this";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.latest-article.is-reading .featured-card {
    position: relative;
}
.latest-article.is-reading .featured-card::after {
    content: "\21BB Continue reading";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Dark mode */
[data-theme="dark"] .blog-card.is-read .blog-read-more {
    color: #4ade80;
}
[data-theme="dark"] .blog-card.is-reading .blog-read-more {
    color: #60a5fa;
}
[data-theme="dark"] .archive-item.is-read .archive-item-meta::after,
[data-theme="dark"] .latest-article.is-read .featured-card::after {
    color: #4ade80;
}
[data-theme="dark"] .archive-item.is-reading .archive-item-meta::after,
[data-theme="dark"] .latest-article.is-reading .featured-card::after {
    color: #60a5fa;
}
[data-theme="dark"] .essential-card.is-read::after {
    background: #16a34a;
}
[data-theme="dark"] .essential-card.is-reading::after {
    background: #2563eb;
}
[data-theme="dark"] .latest-article.is-read .featured-card::after {
    background: rgba(74, 222, 128, 0.1);
}
[data-theme="dark"] .latest-article.is-reading .featured-card::after {
    background: rgba(96, 165, 250, 0.1);
}

/* ===== Continue Reading Banner ===== */

.continue-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    font-size: 0.85rem;
    animation: continueBannerIn 0.3s ease;
}

.continue-banner .continue-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.continue-banner .continue-btn:hover {
    background: #1d4ed8;
}

.continue-banner .continue-dismiss {
    background: none;
    border: none;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
    line-height: 1;
}
.continue-banner .continue-dismiss:hover {
    color: var(--text-primary, #111);
}

.continue-banner-out {
    animation: continueBannerOut 0.3s ease forwards;
}

@keyframes continueBannerIn {
    from { opacity: 0; transform: translateX(-50%) translateY(1rem); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes continueBannerOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(1rem); }
}

/* ─────────────────────────────────────────────────────────────────
   Article in-line carousel (2026-05-23 launch)
   Reuses the LinkedIn slide PNGs as a swipeable visual summary inside
   the article. Native CSS scroll-snap is the foundation. The 2026
   ::scroll-marker / ::scroll-button pseudo-elements give zero-JS dots
   and prev/next on Chromium; JS in /js/carousel.a00431d0.js handles lightbox +
   slide counter + IntersectionObserver fallback for older browsers.
   Accessibility: aria-roledescription="carousel" on parent, per-slide
   alt text, focusable track, prefers-reduced-motion respected.
   ───────────────────────────────────────────────────────────────── */

.article-carousel {
    /* Pop out of the article reading column for visual emphasis */
    --carousel-bg: var(--bg-secondary, #f8fafc);
    --carousel-border: var(--border-color, #e2e8f0);
    --carousel-text: var(--text-primary, #0f172a);
    --carousel-muted: var(--text-secondary, #64748b);
    --carousel-accent: var(--accent-primary, #2563eb);
    --carousel-slide-w: min(82vw, 540px);

    margin: 3rem -1rem;
    padding: 1.5rem 0 1.25rem;
    background: var(--carousel-bg);
    border: 1px solid var(--carousel-border);
    border-radius: 14px;
    position: relative;
    isolation: isolate;
}

[data-theme="dark"] .article-carousel {
    --carousel-bg: #0a1220;
    --carousel-border: #1e293b;
    --carousel-text: #f1f5f9;
    --carousel-muted: #94a3b8;
}

.article-carousel .carousel-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 1rem;
    padding: 0 max(1rem, calc((100% - var(--carousel-slide-w)) / 2));
    scrollbar-width: none;
    /* Scroll-driven CSS: enables ::scroll-marker pseudo-elements per slide */
    scroll-marker-group: after;
}
.article-carousel .carousel-track::-webkit-scrollbar { display: none; }

/* Flex-item + snap-target — applied to the <picture> wrapper since
   that's the direct child of the flex track. Sizing was previously
   on .carousel-slide (the inner img) which is NOT the flex item and
   was therefore ignored, breaking both layout and snap-to-slide. */
.article-carousel .carousel-track > picture {
    flex: 0 0 var(--carousel-slide-w);
    width: var(--carousel-slide-w);
    aspect-ratio: 1080 / 1350;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    background: #0d1117;
    border: 1px solid var(--carousel-border);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    box-shadow: 0 4px 18px -8px rgba(0, 0, 0, 0.25);
    filter: brightness(0.92);
}
.article-carousel .carousel-track > picture > .carousel-slide {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* clicks target the picture wrapper, not the img */
}
.article-carousel .carousel-track > picture:hover,
.article-carousel .carousel-track > picture:focus-visible {
    transform: translateY(-2px) scale(1.005);
    filter: brightness(1);
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.32);
    outline: 2px solid var(--carousel-accent);
    outline-offset: 4px;
}

/* ── Native 2026 pseudo-element controls (Chromium 130+, Edge) ── */
/* These give us indicator dots + prev/next buttons with zero JS.
   Browsers that don't support them just don't render them; the
   scroll-snap track + JS fallback still work. */
.article-carousel .carousel-track::scroll-marker-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem 0.25rem;
}
.article-carousel .carousel-slide::scroll-marker {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--carousel-muted);
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
    cursor: pointer;
    border: 0;
}
.article-carousel .carousel-slide::scroll-marker:hover {
    opacity: 0.7;
    transform: scale(1.2);
}
.article-carousel .carousel-slide::scroll-marker:target-current {
    background: var(--carousel-accent);
    opacity: 1;
    transform: scale(1.4);
}
.article-carousel .carousel-track::scroll-button(left),
.article-carousel .carousel-track::scroll-button(right) {
    position: absolute;
    top: 40%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    border: 0;
    cursor: pointer;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}
.article-carousel:hover .carousel-track::scroll-button(left),
.article-carousel:hover .carousel-track::scroll-button(right),
.article-carousel:focus-within .carousel-track::scroll-button(left),
.article-carousel:focus-within .carousel-track::scroll-button(right) {
    opacity: 1;
}
/* Deliberately NOT generated. Native scroll buttons scroll by a page rather
   than exactly one slide, and they used to render stacked underneath the JS
   nav because the @supports guard below tested an unparsable bare
   ::scroll-button. One click could then travel two slides. The JS nav is now
   the single prev/next implementation on every engine; leaving content unset
   keeps these pseudo-elements from being generated at all. */
.article-carousel .carousel-track::scroll-button(left),
.article-carousel .carousel-track::scroll-button(right) {
    content: none;
}
.article-carousel .carousel-track::scroll-button(*):disabled {
    opacity: 0;
    pointer-events: none;
}

/* ── JS-driven fallback dots (for browsers without ::scroll-marker) ── */
.article-carousel .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0 0.25rem;
}
.article-carousel .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--carousel-muted);
    opacity: 0.4;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
}
.article-carousel .carousel-dot:hover { opacity: 0.7; transform: scale(1.2); }
.article-carousel .carousel-dot[aria-current="true"] {
    background: var(--carousel-accent);
    opacity: 1;
    transform: scale(1.4);
}
/* Hide JS-fallback dots when native scroll-markers are supported */
@supports selector(::scroll-marker) {
    .article-carousel .carousel-dots { display: none; }
}

/* ── JS-driven prev/next (fallback) ── */
.article-carousel .carousel-nav {
    position: absolute;
    top: 40%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 0.5rem;
    pointer-events: none;
    z-index: 2;
}
.article-carousel .carousel-nav button {
    pointer-events: auto;
    /* Sized down from the lightbox 56x56 so the buttons fit inside the
       in-article carousel without crowding the slide. SVG chevrons
       inherit currentColor for the stroke. */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border: 0;
    cursor: pointer;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.15s ease, background 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}
.article-carousel .carousel-nav button svg { width: 22px; height: 22px; }
.article-carousel:hover .carousel-nav button,
.article-carousel:focus-within .carousel-nav button { opacity: 1; }
.article-carousel .carousel-nav button:hover {
    transform: scale(1.06);
    background: rgba(37, 99, 235, 0.85);
}
.article-carousel .carousel-nav button:disabled { opacity: 0 !important; pointer-events: none; }
/* No @supports gate here on purpose: the JS nav is the only prev/next UI. */

/* ── Slide counter pill ── */
.article-carousel .carousel-counter {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(15, 23, 42, 0.85);
    color: #f1f5f9;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
    z-index: 2;
    font-variant-numeric: tabular-nums;
}

/* ── Caption ── */
.article-carousel .carousel-caption {
    color: var(--carousel-muted);
    font-size: 0.9rem;
    text-align: center;
    margin: 0.75rem auto 0;
    max-width: 36rem;
    padding: 0 1rem;
    line-height: 1.5;
}

/* ── Lightbox (native <dialog>) ── */
.carousel-lightbox {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    margin: 0;
    color: #fff;
    overflow: hidden;
}
.carousel-lightbox::backdrop {
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(8px);
}
.carousel-lightbox .lightbox-inner {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    width: 100%;
}
.carousel-lightbox .lightbox-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #cbd5e1;
    font-size: 0.9rem;
}
.carousel-lightbox .lightbox-close {
    background: transparent;
    border: 0;
    color: #f1f5f9;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
}
.carousel-lightbox .lightbox-close:hover { background: rgba(255,255,255,0.08); }
.carousel-lightbox .lightbox-image {
    display: grid;
    place-items: center;
    padding: 0 1rem;
    overflow: hidden;
}
.carousel-lightbox .lightbox-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.7);
}
.carousel-lightbox .lightbox-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
}
.carousel-lightbox .lightbox-controls button {
    background: rgba(255,255,255,0.08);
    color: #f1f5f9;
    border: 1px solid rgba(255,255,255,0.14);
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.carousel-lightbox .lightbox-controls button:hover { background: rgba(255,255,255,0.14); }
.carousel-lightbox .lightbox-controls button:active { transform: scale(0.96); }
.carousel-lightbox .lightbox-controls button:disabled { opacity: 0.35; pointer-events: none; }

/* ── Reduced-motion: strip animation, keep functional snapping ── */
@media (prefers-reduced-motion: reduce) {
    .article-carousel .carousel-track { scroll-behavior: auto; }
    .article-carousel .carousel-slide {
        transition: none;
        filter: none;
    }
    .article-carousel .carousel-dot { transition: none; }
    .carousel-lightbox::backdrop { backdrop-filter: none; }
}

/* ── Compact on narrow screens ── */
@media (max-width: 540px) {
    .article-carousel {
        margin: 2rem -1rem;
        padding: 1rem 0 0.75rem;
        --carousel-slide-w: 88vw;
    }
    .article-carousel .carousel-counter {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 0.72rem;
    }
}

/* Homepage featured carousel — sits below .featured-grid in .editorial-featured.
   data-homepage="1" tags the figure so JS/CSS can vary behavior if needed. */
.editorial-featured .featured-carousel {
  margin-top: 2.5rem;
  max-width: 100%;
}
.carousel-caption .carousel-article-link {
  color: var(--accent-primary, #2563eb);
  font-weight: 600;
  text-decoration: none;
}
.carousel-caption .carousel-article-link:hover {
  text-decoration: underline;
}

/* ============================================================
   <rp-carousel> web component additions (2026-05-23)
   Light DOM, so all selectors are global. Naming is namespaced
   with .carousel-* to avoid collisions.
   ============================================================ */

/* Custom element root — no display swap on :not(:defined) since the
   inner <figure> renders fine standalone. */
rp-carousel { display: block; }

/* Visible-when-active slide caption (in addition to figcaption).
   Hidden by default; revealed inside the lightbox where it lives
   below the image. */
.lightbox-stage {
    position: relative;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    touch-action: none; /* allow our pinch handlers to receive 2-finger gestures */
    cursor: grab;
}
.lightbox-stage[data-zoomed] { cursor: move; }
.lightbox-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.05s linear;
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox-caption {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.45;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    text-align: center;
    max-width: 70ch;
    align-self: center;
}
.lightbox-caption[hidden] { display: none; }
.lightbox-zoom-reset {
    background: rgba(255,255,255,0.08);
    color: #f1f5f9;
    border: 1px solid rgba(255,255,255,0.16);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}
.lightbox-zoom-reset:hover { background: rgba(255,255,255,0.16); }

/* CSS Overflow Level 5 / interactivity (2026) — make off-screen slides
   inert by default, only let the snapped slide receive focus/input.
   @supports guards older browsers (falls back to JS focus management). */
@supports (interactivity: inert) {
    .article-carousel .carousel-slide {
        interactivity: inert;
    }
    @container scroll-state(snapped: x) {
        .article-carousel .carousel-slide {
            interactivity: auto;
        }
    }
}

/* Print stylesheet — when user prints the article, render slides as a
   static vertical stack so they're all visible on paper. Hide all the
   interactive chrome (dots, nav, counter, lightbox triggers). */
@media print {
    .article-carousel .carousel-track {
        display: block;
        overflow: visible;
        scroll-snap-type: none;
        height: auto;
        padding: 0;
    }
    .article-carousel .carousel-slide,
    .article-carousel picture {
        width: 100% !important;
        height: auto !important;
        max-width: 480px;
        margin: 0 auto 1rem;
        display: block;
        break-inside: avoid;
    }
    .article-carousel .carousel-counter,
    .article-carousel .carousel-dots,
    .article-carousel .carousel-nav,
    .carousel-lightbox {
        display: none !important;
    }
    .article-carousel .carousel-caption {
        text-align: left;
        font-style: italic;
        color: #444;
    }
}

/* ============================================================
   <rp-carousel> web component additions (2026-05-23)
   ============================================================ */
rp-carousel { display: block; }

.lightbox-stage {
    position: relative;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    touch-action: none;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-stage[data-zoomed] { cursor: move; }
.lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.05s linear;
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox-caption {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.45;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    text-align: center;
    max-width: 70ch;
    align-self: center;
}
.lightbox-caption[hidden] { display: none; }
.lightbox-zoom-reset {
    background: rgba(255,255,255,0.08);
    color: #f1f5f9;
    border: 1px solid rgba(255,255,255,0.16);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}
.lightbox-zoom-reset:hover { background: rgba(255,255,255,0.16); }

@supports (interactivity: inert) {
    .article-carousel .carousel-slide { interactivity: inert; }
    @container scroll-state(snapped: x) {
        .article-carousel .carousel-slide { interactivity: auto; }
    }
}

@media print {
    .article-carousel .carousel-track {
        display: block;
        overflow: visible;
        scroll-snap-type: none;
        height: auto;
        padding: 0;
    }
    .article-carousel .carousel-slide,
    .article-carousel picture {
        width: 100% !important;
        height: auto !important;
        max-width: 480px;
        margin: 0 auto 1rem;
        display: block;
        break-inside: avoid;
    }
    .article-carousel .carousel-counter,
    .article-carousel .carousel-dots,
    .article-carousel .carousel-nav,
    .carousel-lightbox {
        display: none !important;
    }
    .article-carousel .carousel-caption {
        text-align: left;
        font-style: italic;
        color: #444;
    }
}

/* ============================================================
   Lightbox redesign (2026-05-23) — distraction-free layout.
   - Stage fills the full dialog
   - Prev/Next as floating arrow buttons left/right, vertically centered
   - Counter + close top corners (subtle)
   - Caption + zoom-reset bottom corners
   - All chrome auto-hides on desktop after 2.5s of mouse inactivity;
     reappears on mousemove. Touch always shows chrome.
   ============================================================ */
.carousel-lightbox {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    padding: 0;
    border: 0;
    background: rgba(2, 6, 23, 0.96);
    color: #f1f5f9;
    margin: 0;
    overflow: hidden;
    position: fixed;
    inset: 0;
}
.carousel-lightbox::backdrop {
    background: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(12px);
}

/* The stage IS the dialog canvas — image fills available space */
.carousel-lightbox .lightbox-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}
.carousel-lightbox .lightbox-stage[data-zoomed] { cursor: move; }
.carousel-lightbox .lightbox-stage img {
    max-width: 92vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.05s linear;
    user-select: none;
    -webkit-user-drag: none;
    /* Subtle glow lifts the image off the dark bg without competing */
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
    border-radius: 4px;
}

/* Top-corner chrome */
.carousel-lightbox .lightbox-counter {
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
    z-index: 2;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(241, 245, 249, 0.7);
    background: rgba(15, 23, 42, 0.7);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    pointer-events: none;
}
.carousel-lightbox .lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    border: 0;
    color: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background 0.15s ease, transform 0.15s ease;
}
.carousel-lightbox .lightbox-close:hover {
    background: rgba(220, 38, 38, 0.85);
    transform: scale(1.05);
}
.carousel-lightbox .lightbox-close svg { width: 20px; height: 20px; }

/* Prev / Next arrows — overlay image, vertically centered */
.carousel-lightbox .lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    border: 0;
    color: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    backdrop-filter: blur(10px);
    transition:
        background 0.15s ease,
        transform 0.15s ease,
        opacity 0.25s ease;
}
.carousel-lightbox .lightbox-arrow:hover {
    background: rgba(37, 99, 235, 0.85);
    transform: translateY(-50%) scale(1.06);
}
.carousel-lightbox .lightbox-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.carousel-lightbox .lightbox-arrow:disabled:hover {
    background: rgba(15, 23, 42, 0.65);
    transform: translateY(-50%);
}
.carousel-lightbox .lightbox-arrow svg { width: 26px; height: 26px; }
.carousel-lightbox .lightbox-prev { left: 1.5rem; }
.carousel-lightbox .lightbox-next { right: 1.5rem; }

/* Caption + zoom-reset on bottom corners */
.carousel-lightbox .lightbox-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    max-width: min(72ch, 88vw);
    padding: 0.6rem 1.1rem;
    background: rgba(15, 23, 42, 0.7);
    color: rgba(241, 245, 249, 0.92);
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: center;
    border-radius: 10px;
    backdrop-filter: blur(8px);
}
.carousel-lightbox .lightbox-caption[hidden] { display: none; }
.carousel-lightbox .lightbox-zoom-reset {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    background: rgba(15, 23, 42, 0.7);
    border: 0;
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 0.85rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.carousel-lightbox .lightbox-zoom-reset:hover { background: rgba(15, 23, 42, 0.9); }
.carousel-lightbox .lightbox-zoom-reset svg { width: 16px; height: 16px; }

/* Auto-hide chrome on desktop. JS adds .chrome-hidden after inactivity;
   reverses on mousemove. Touch devices never hide (JS detects pointerType). */
.carousel-lightbox.chrome-hidden .lightbox-counter,
.carousel-lightbox.chrome-hidden .lightbox-close,
.carousel-lightbox.chrome-hidden .lightbox-arrow,
.carousel-lightbox.chrome-hidden .lightbox-caption,
.carousel-lightbox.chrome-hidden .lightbox-zoom-reset {
    opacity: 0;
    pointer-events: none;
}
.carousel-lightbox.chrome-hidden .lightbox-stage { cursor: none; }
.carousel-lightbox.chrome-hidden .lightbox-stage[data-zoomed] { cursor: move; }

/* Respect reduced-motion: drop transitions, keep fade quick */
@media (prefers-reduced-motion: reduce) {
    .carousel-lightbox .lightbox-arrow,
    .carousel-lightbox .lightbox-close,
    .carousel-lightbox .lightbox-counter,
    .carousel-lightbox .lightbox-caption,
    .carousel-lightbox .lightbox-zoom-reset {
        transition: none;
    }
}

/* Mobile: arrows slightly smaller, caption near bottom */
@media (max-width: 640px) {
    .carousel-lightbox .lightbox-arrow { width: 48px; height: 48px; }
    .carousel-lightbox .lightbox-prev { left: 0.5rem; }
    .carousel-lightbox .lightbox-next { right: 0.5rem; }
    .carousel-lightbox .lightbox-caption {
        bottom: 0.75rem;
        font-size: 0.85rem;
        padding: 0.5rem 0.85rem;
    }
    .carousel-lightbox .lightbox-zoom-reset {
        bottom: auto;
        top: 1rem;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.78rem;
    }
}

/* Carousel "expand" button — floats on the centered slide so mouse
   users have a one-click path to the lightbox (clicks on slides
   center/switch them, never zoom). Hidden until carousel is hovered. */
.article-carousel .carousel-expand-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.15s ease, transform 0.15s ease;
    backdrop-filter: blur(8px);
}
.article-carousel .carousel-expand-btn svg { width: 18px; height: 18px; }
.article-carousel:hover .carousel-expand-btn,
.article-carousel:focus-within .carousel-expand-btn { opacity: 1; }
.article-carousel .carousel-expand-btn:hover {
    background: rgba(37, 99, 235, 0.9);
    transform: scale(1.06);
}

/* Lightbox slide transition (2026-05-23) — directional slide-in.
   The frame element wraps the img so the slide transform doesn't collide
   with the img's zoom/pan transform. 220ms ease-out matches PhotoSwipe /
   Apple Photos. Honors prefers-reduced-motion (JS bypasses transition). */
.carousel-lightbox .lightbox-img-frame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.22s ease-out, opacity 0.18s ease-out;
    will-change: transform, opacity;
}
.carousel-lightbox .lightbox-img-frame.is-exiting-left {
    transform: translateX(-105%);
    opacity: 0;
}
.carousel-lightbox .lightbox-img-frame.is-exiting-right {
    transform: translateX(105%);
    opacity: 0;
}
.carousel-lightbox .lightbox-img-frame.is-entering-from-right {
    transform: translateX(105%);
    opacity: 0;
}
.carousel-lightbox .lightbox-img-frame.is-entering-from-left {
    transform: translateX(-105%);
    opacity: 0;
}
.carousel-lightbox .lightbox-img-frame.is-snap {
    transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
    .carousel-lightbox .lightbox-img-frame {
        transition: none !important;
    }
}
