/* ── Reading progress ── */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #1D1D1F 0%, #2997FF 100%);
    z-index: 60;
    transition: width 0.1s linear;
}

/* ── Article page shell ── */
.site-article-main {
    position: relative;
    z-index: 10;
    padding-top: 5.5rem;
    padding-bottom: 0;
    flex: 1;
}

.site-article-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    font-size: 12px;
    font-weight: 500;
    color: #6A6A6F;
    margin-bottom: 2rem;
}

.site-article-breadcrumb a {
    color: #4B4B50;
    text-decoration: none;
    transition: color 0.2s;
}

.site-article-breadcrumb a:hover { color: #1D1D1F; }

.site-article-breadcrumb i {
    font-size: 0.75rem;
    color: #D2D2D7;
}

.site-article-breadcrumb span {
    color: #1D1D1F;
    font-weight: 600;
}

/* ── Hero header ── */
.site-article-hero {
    max-width: 48rem;
    margin-bottom: 2.5rem;
}

.site-article-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1.25rem;
}

.site-article-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: #1D1D1F;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-article-meta-item {
    font-size: 12px;
    font-weight: 500;
    color: #6A6A6F;
}

.site-article-meta-dot {
    color: #D2D2D7;
    font-size: 10px;
}

.site-article-title {
    font-family: "Outfit", sans-serif;
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    color: #1D1D1F;
    margin-bottom: 1rem;
}

.site-article-deck {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.7;
    color: #2C2C2E;
    max-width: 40rem;
}

/* ── Layout: article + sidebar ── */
.site-article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
    padding-bottom: 4rem;
}

@media (min-width: 1024px) {
    .site-article-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 4rem;
    }
}

/* ── Article body card ── */
.site-article-body {
    background: #fff;
    border: 1px solid #E8E8ED;
    border-radius: 1.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.site-article-body-accent {
    height: 3px;
    background: linear-gradient(90deg, #1D1D1F 0%, #2997FF 100%);
}

.site-article-body-inner {
    padding: 2rem 1.75rem;
}

@media (min-width: 768px) {
    .site-article-body-inner {
        padding: 2.5rem 3rem;
    }
}

/* ── Prose ── */
.article-body h2 {
    scroll-margin-top: 7rem;
    font-family: "Outfit", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1D1D1F !important;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.article-body h3 {
    font-family: "Outfit", sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1D1D1F !important;
    margin-bottom: 0.375rem;
}

.article-body p {
    font-size: 0.9375rem;
    line-height: 1.85;
    color: #2C2C2E;
    margin-bottom: 1rem;
    font-weight: 400;
}

.article-body strong {
    color: #1D1D1F;
    font-weight: 600;
}

.article-body a {
    color: #2997FF;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(41, 151, 255, 0.25);
    transition: border-color 0.2s;
}

.article-body a:hover {
    border-bottom-color: #2997FF;
}

.article-body ul,
.article-body ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-body section {
    margin-bottom: 2.5rem;
}

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

/* Lead block */
.article-lead {
    background: linear-gradient(145deg, #F5F5F7 0%, #FFFFFF 100%);
    border: 1px solid #E8E8ED;
    border-radius: 1.25rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    font-size: 0.9375rem;
    color: #2C2C2E;
    line-height: 1.75;
    font-weight: 400;
}

/* Topic tags row */
.article-body .site-article-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.article-body .site-article-topic {
    font-size: 11px;
    font-weight: 600;
    color: #4B4B50;
    background: #F5F5F7;
    border: 1px solid #E8E8ED;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
}

/* Section numbers */
.article-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    background: #1D1D1F;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
    flex-shrink: 0;
}

.article-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #1D1D1F;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #E8E8ED;
    background: #fff;
}

.data-table thead tr {
    background: #F5F5F7;
}

.data-table th {
    padding: 0.75rem 1rem;
    font-weight: 700;
    text-align: left;
    color: #1D1D1F;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-top: 1px solid #E8E8ED;
    color: #2C2C2E;
    font-weight: 500;
}

.data-table tbody tr:hover {
    background: rgba(41, 151, 255, 0.04);
}

.article-body .overflow-x-auto {
    margin-bottom: 1.25rem;
}

/* Info cards in content */
.article-body .rounded-xl.border,
.article-body .article-card-box {
    border-radius: 1rem !important;
    border: 1px solid #E8E8ED !important;
    background: #F5F5F7 !important;
    padding: 1.25rem !important;
}

.article-body .grid.sm\:grid-cols-2 {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .article-body .grid.sm\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Checklist items */
.article-body li.flex.gap-2,
.article-body li.flex.gap-3 {
    display: flex;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: #2C2C2E;
    line-height: 1.7;
    font-weight: 400;
}

.article-body li.flex.gap-2 span:first-child,
.article-body li.flex.gap-3 span:first-child {
    color: #2997FF;
    font-weight: 800;
    flex-shrink: 0;
}

.article-body ol.space-y-3 li {
    margin-bottom: 0.75rem;
}

/* FAQ */
.article-body details,
.article-faq details {
    border-radius: 1rem;
    border: 1px solid #E8E8ED;
    background: #F5F5F7;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.article-body details summary,
.article-faq summary {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1D1D1F;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-body details summary::-webkit-details-marker,
.article-faq summary::-webkit-details-marker {
    display: none;
}

.article-body details p,
.article-faq details p {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.article-body details svg {
    color: #D2D2D7;
    transition: transform 0.2s;
}

.article-body details[open] svg {
    transform: rotate(180deg);
}

/* Summary box */
.article-body .rounded-xl.p-5 {
    border-radius: 1.25rem !important;
    padding: 1.5rem !important;
    background: linear-gradient(145deg, #F5F5F7 0%, #FFFFFF 100%) !important;
    border: 1px solid #E8E8ED !important;
    color: #2C2C2E;
    font-weight: 400;
}

/* CTA block */
.article-cta {
    background: #1D1D1F;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: #fff;
    margin-top: 2rem;
}

.article-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(41, 151, 255, 0.15) 0%, transparent 55%);
    pointer-events: none;
}

.article-cta .cta-eyebrow {
    color: #D1D1D6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    position: relative;
}

.article-cta .cta-title {
    font-family: "Outfit", sans-serif;
    color: #fff;
    font-size: clamp(1.25rem, 3vw, 1.625rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    position: relative;
}

.article-cta .cta-desc {
    color: #D1D1D6;
    font-size: 0.875rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.article-cta a {
    text-decoration: none;
    border: none;
}

.article-cta .cta-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3rem;
    padding: 0 1.75rem;
    background: #fff;
    color: #1D1D1F;
    font-size: 13px;
    font-weight: 700;
    border-radius: 9999px;
    transition: transform 0.25s, box-shadow 0.25s;
}

.article-cta .cta-btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    color: #1D1D1F;
}

.article-cta .cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3rem;
    padding: 0 1.75rem;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s;
}

.article-cta .cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.article-cta .flex {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 640px) {
    .article-cta .flex {
        flex-direction: row;
    }
}

/* Back link */
.site-article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-size: 13px;
    font-weight: 600;
    color: #4B4B50;
    text-decoration: none;
    transition: color 0.2s, gap 0.2s;
}

.site-article-back:hover {
    color: #1D1D1F;
    gap: 0.625rem;
}

/* ── Sidebar ── */
.site-article-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .site-article-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        position: sticky;
        top: 6rem;
    }
}

.site-article-panel {
    background: #fff;
    border: 1px solid #E8E8ED;
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.site-article-panel-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #636366;
    margin-bottom: 1rem;
}

.site-article-toc {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.toc-link,
.site-article-toc-link {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 12px;
    font-weight: 500;
    color: #4B4B50;
    text-decoration: none;
    border-radius: 0.625rem;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.toc-link:hover,
.site-article-toc-link:hover {
    color: #1D1D1F;
    background: #F5F5F7;
}

.toc-link.active,
.site-article-toc-link.is-active {
    color: #1D1D1F;
    font-weight: 600;
    background: rgba(41, 151, 255, 0.08);
    border-left-color: #2997FF;
}

.site-article-info dl {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.site-article-info dt {
    font-size: 11px;
    font-weight: 500;
    color: #6A6A6F;
}

.site-article-info dd {
    font-size: 12px;
    font-weight: 600;
    color: #1D1D1F;
}

.site-article-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-article-sidebar-cta {
    display: block;
    text-align: center;
    padding: 0.875rem 1rem;
    background: #1D1D1F;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s;
}

.site-article-sidebar-cta:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Mobile TOC toggle */
.site-article-toc-mobile {
    display: block;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .site-article-toc-mobile { display: none; }
}

.site-article-toc-mobile summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: #fff;
    border: 1px solid #E8E8ED;
    border-radius: 1rem;
    font-size: 13px;
    font-weight: 600;
    color: #1D1D1F;
    cursor: pointer;
    list-style: none;
}

.site-article-toc-mobile summary::-webkit-details-marker {
    display: none;
}

.site-article-toc-mobile .site-article-toc {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #E8E8ED;
    border-radius: 1rem;
}

/* Legacy class aliases */
.article-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: #1D1D1F;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── Bottom purchase bar ── */
#blog-purchase-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

#blog-purchase-bar.is-visible {
    transform: translateY(0);
}

#blog-purchase-bar.is-hidden-permanently {
    display: none;
}

.blog-purchase-bar-inner {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 1rem 1rem;
    pointer-events: auto;
}

@media (min-width: 640px) {
    .blog-purchase-bar-inner {
        padding-bottom: 1.5rem;
    }
}

.blog-purchase-bar-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #E8E8ED;
    border-radius: 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (min-width: 640px) {
    .blog-purchase-bar-card {
        align-items: center;
        padding: 1.25rem 1.5rem;
        gap: 1rem;
    }
}

#blog-purchase-bar.is-visible .blog-purchase-bar-inner {
    animation: purchase-bar-in 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes purchase-bar-in {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.blog-purchase-bar-icon {
    display: none;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #1D1D1F 0%, #2997FF 100%);
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 8px 20px rgba(41, 151, 255, 0.25);
}

@media (min-width: 640px) {
    .blog-purchase-bar-icon { display: flex; }
}

.blog-purchase-bar-copy {
    flex: 1;
    min-width: 0;
}

.blog-purchase-bar-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2997FF;
    margin-bottom: 0.2rem;
}

.blog-purchase-bar-title {
    font-family: "Outfit", sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #1D1D1F;
    line-height: 1.35;
    margin-bottom: 0.15rem;
}

.blog-purchase-bar-sub {
    display: none;
    font-size: 0.75rem;
    color: #4B4B50;
    line-height: 1.4;
}

@media (min-width: 640px) {
    .blog-purchase-bar-sub { display: block; }
}

.blog-purchase-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.blog-purchase-bar-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.125rem;
    background: #1D1D1F;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.blog-purchase-bar-cta:hover {
    color: #fff;
    transform: scale(1.03);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.blog-purchase-bar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: #8A8A8F;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.blog-purchase-bar-close:hover {
    color: #1D1D1F;
    background: rgba(29, 29, 31, 0.06);
}

/* ── Mobile floating purchase button ── */
#blog-purchase-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1rem;
    z-index: 40;
    transition: opacity 0.3s;
}

#blog-purchase-float a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #1D1D1F;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s, box-shadow 0.2s;
}

#blog-purchase-float a:hover {
    color: #fff;
    transform: scale(1.04);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

@media (min-width: 1024px) {
    #blog-purchase-float { display: none; }
}
