/* ============================================================
   SpinMac CN — Blog Article Detail Page Styles
   Design: light editorial layout + blue accent (matches blog.css)
   Path from article HTML: ../../css/article.css
   ============================================================ */

:root {
    --tc-blue:       #0052D9;
    --tc-blue-dark:  #003399;
    --tc-blue-pale:  #7eb3ff;
    --tc-blue-soft:  #e8f0ff;
    --tc-dark:       #1A1C1F;
    --tc-gray-bg:    #F4F5F7;
    --tc-text-main:  #111111;
    --tc-text-muted: #7A828A;
    --tc-border:     #E8EBEF;

    --font-family: 'Inter', "PingFang SC", "Microsoft YaHei",
                   -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --max-width:   1240px;
    --nav-height:  64px;
}

body {
    font-family: var(--font-family);
    color: var(--tc-text-main);
    background: #fff;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

main { display: block; }

.post-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed { opacity: 1; transform: none; }

/* ---- Reading progress ---- */
.read-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    z-index: 1001;
    background: linear-gradient(90deg, var(--tc-blue), var(--tc-blue-pale));
    width: 0%;
    transition: width 0.1s linear;
}

/* ============================================================
   MASTHEAD — light header band (distinct from listing dark hero)
   ============================================================ */
.post-masthead {
    padding: calc(var(--nav-height) + 56px) 0 48px;
    background: linear-gradient(180deg, var(--tc-gray-bg) 0%, #fff 100%);
    border-bottom: 1px solid var(--tc-border);
}

.post-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--tc-text-muted);
    margin-bottom: 28px;
}
.post-breadcrumb a {
    color: var(--tc-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.post-breadcrumb a:hover { color: var(--tc-blue); }
.post-breadcrumb .bc-current { color: var(--tc-text-main); font-weight: 500; }

.post-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: var(--tc-blue-soft);
    color: var(--tc-blue-dark);
    border: 1px solid rgba(0, 82, 217, 0.15);
}

.post-date-inline {
    font-size: 13px;
    color: var(--tc-text-muted);
}

.post-masthead h1 {
    font-size: clamp(1.75rem, 3.2vw, 2.45rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--tc-text-main);
    max-width: 820px;
    margin-bottom: 20px;
}

.post-lead {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--tc-text-muted);
    max-width: 720px;
    margin-bottom: 28px;
}

.post-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    color: var(--tc-text-muted);
}
.post-meta-bar .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.post-meta-bar svg { flex-shrink: 0; opacity: 0.7; }

.tag-pill {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 500;
    background: var(--tc-gray-bg);
    border: 1px solid var(--tc-border);
    color: var(--tc-text-muted);
}

/* ============================================================
   BODY LAYOUT
   ============================================================ */
.post-body-section {
    padding: 56px 0 72px;
}

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

@media (min-width: 1080px) {
    .post-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 56px;
    }
}

/* ============================================================
   ARTICLE TYPOGRAPHY
   ============================================================ */
.article-content {
    font-size: 1rem;
    line-height: 1.9;
    color: #333;
    min-width: 0;
    overflow-wrap: break-word;
}

.article-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--tc-text-main);
    margin: 48px 0 16px;
    padding-left: 14px;
    border-left: 3px solid var(--tc-blue);
    line-height: 1.35;
}

.article-content h3 {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--tc-text-main);
    margin: 32px 0 12px;
}

.article-content p { margin-bottom: 18px; }
.article-content strong { color: var(--tc-text-main); font-weight: 600; }
.article-content a {
    color: var(--tc-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.article-content a:hover { color: var(--tc-blue-dark); }

.article-content code {
    font-family: "SF Mono", "Fira Code", Consolas, monospace;
    font-size: 0.88em;
    background: var(--tc-gray-bg);
    border: 1px solid var(--tc-border);
    border-radius: 3px;
    padding: 2px 6px;
    color: var(--tc-blue-dark);
}

.article-content pre {
    background: var(--tc-dark);
    border-radius: 4px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 24px 0;
    border-left: 3px solid var(--tc-blue);
}
.article-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.86rem;
    line-height: 1.7;
}

.article-content ul,
.article-content ol {
    margin: 16px 0 20px;
    padding-left: 1.5em;
}
.article-content li { margin-bottom: 6px; }
.article-content li::marker { color: var(--tc-blue); }

/* ---- Callout boxes ---- */
.callout {
    border-left: 3px solid var(--tc-blue);
    background: var(--tc-blue-soft);
    padding: 16px 20px;
    margin: 28px 0;
    border-radius: 0 4px 4px 0;
}
.callout.tip {
    border-color: #10b981;
    background: #ecfdf5;
}
.callout.warning {
    border-color: #ef4444;
    background: #fef2f2;
}

.callout-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tc-blue-dark);
    margin-bottom: 8px;
}
.callout.tip .callout-title { color: #059669; }
.callout.warning .callout-title { color: #dc2626; }
.callout p { margin: 0; font-size: 0.94rem; }

/* ---- Metric row ---- */
.metric-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 28px 0;
}
.metric-card {
    padding: 20px 16px;
    text-align: center;
    background: var(--tc-gray-bg);
    border: 1px solid var(--tc-border);
    border-radius: 4px;
}
.metric-val,
.metric-card .m-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--tc-blue);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.metric-label,
.metric-card .m-label {
    display: block;
    font-size: 12px;
    color: var(--tc-text-muted);
    margin-top: 6px;
    font-weight: 500;
}

/* ---- Step list ---- */
.step-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.step-item {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
    background: var(--tc-gray-bg);
    border: 1px solid var(--tc-border);
    border-radius: 4px;
}
.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--tc-blue);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.step-body { flex: 1; min-width: 0; }
.step-body strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--tc-text-main);
}
.step-body p { margin: 0; font-size: 0.9rem; color: var(--tc-text-muted); line-height: 1.7; }

/* ---- Data table ---- */
.data-table-wrap {
    overflow-x: auto;
    margin: 28px 0;
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    -webkit-overflow-scrolling: touch;
}
.data-table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table thead tr { background: var(--tc-dark); }
.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--tc-border); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:nth-child(even) { background: var(--tc-gray-bg); }
.data-table tbody td {
    padding: 12px 16px;
    color: #444;
    vertical-align: top;
    line-height: 1.55;
}
.data-table .highlight-val {
    font-weight: 700;
    color: var(--tc-blue);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.post-aside {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 1080px) {
    .post-aside { position: sticky; top: calc(var(--nav-height) + 24px); }
}

.panel-card {
    background: #fff;
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    padding: 22px 20px;
}

.toc-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--tc-text-muted);
    margin-bottom: 14px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 2px;
    font-size: 13px;
    color: var(--tc-text-muted);
    text-decoration: none;
    font-weight: 400;
    line-height: 1.45;
    transition: background 0.18s ease, color 0.18s ease;
}
.toc-link:hover { background: var(--tc-gray-bg); color: var(--tc-blue); }
.toc-link.active {
    background: var(--tc-blue-soft);
    color: var(--tc-blue-dark);
    font-weight: 600;
}
.toc-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--tc-blue);
    opacity: 0.55;
    min-width: 20px;
    flex-shrink: 0;
}

/* Sidebar CTA */
.sidebar-cta {
    border-radius: 4px;
    overflow: hidden;
    background: var(--tc-dark);
    border: 1px solid rgba(0, 82, 217, 0.25);
}
.sidebar-cta-inner { padding: 24px 20px; }
.sidebar-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tc-blue-pale);
    margin-bottom: 12px;
}
.sidebar-cta h3 {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 10px;
}
.sidebar-cta p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.65;
    margin-bottom: 16px;
}
.sidebar-cta .feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-cta .feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}
.feature-check {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(0, 82, 217, 0.35);
    flex-shrink: 0;
    position: relative;
}
.feature-check::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 2px;
    width: 4px;
    height: 7px;
    border: solid var(--tc-blue-pale);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
.price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 16px;
}
.price-val {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}
.price-unit {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}
.btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 2px;
    font-weight: 600;
    font-size: 14px;
    background: var(--tc-blue);
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
}
.btn-cta:hover { background: var(--tc-blue-dark); color: #fff; }

/* ============================================================
   ARTICLE END CTA
   ============================================================ */
.article-cta-section {
    margin-top: 56px;
    border-radius: 4px;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1628 0%, var(--tc-dark) 100%);
    border: 1px solid rgba(0, 82, 217, 0.2);
    position: relative;
}
.article-cta-inner {
    position: relative;
    z-index: 1;
    padding: 44px 40px;
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}
.article-cta-inner > div:first-child { flex: 1; min-width: 260px; }

.article-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--tc-blue-pale);
    margin-bottom: 14px;
}
.article-cta-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tc-blue);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.article-cta-inner h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 14px;
}
.article-cta-inner > div:first-child > p {
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.8;
    margin-bottom: 24px;
}
.cta-price-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 24px;
}
.cta-price-val {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
}
.cta-price-unit {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}
.cta-btn-group { display: flex; flex-wrap: wrap; gap: 12px; }

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 2px;
    font-weight: 600;
    font-size: 15px;
    background: var(--tc-blue);
    color: #fff !important;
    text-decoration: none !important;
    transition: background 0.2s ease;
}
.btn-cta-primary:hover { background: var(--tc-blue-dark); color: #fff !important; }

.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 15px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.btn-cta-secondary:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.06);
}

.cta-spec-card {
    min-width: 220px;
    padding: 24px 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cta-spec-card .spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 13px;
}
.cta-spec-card .spec-row:last-child { border-bottom: none; }
.cta-spec-card .spec-label { color: rgba(255, 255, 255, 0.45); }
.cta-spec-card .spec-val { color: #fff; font-weight: 600; }
.cta-spec-card .spec-val.highlight { color: var(--tc-blue-pale); }

/* ============================================================
   FLOATING CTA
   ============================================================ */
.floating-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 260px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--tc-dark);
    border: 1px solid rgba(0, 82, 217, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.floating-cta.visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.floating-cta-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.floating-cta-close:hover { background: rgba(255, 255, 255, 0.15); }
.floating-cta-inner { padding: 20px 18px; }
.floating-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tc-blue-pale);
    margin-bottom: 10px;
}
.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tc-blue);
    animation: pulse-dot 2s ease-in-out infinite;
}
.floating-cta h4 {
    font-size: 0.92rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}
.fc-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 12px;
}
.fc-price-val {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}
.fc-price-unit {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}
.fc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 2px;
    font-weight: 600;
    font-size: 13px;
    background: var(--tc-blue);
    color: #fff !important;
    text-decoration: none !important;
    margin-bottom: 10px;
    transition: background 0.2s ease;
}
.fc-btn:hover { background: var(--tc-blue-dark); color: #fff !important; }
.fc-features { display: flex; flex-wrap: wrap; gap: 5px; }
.fc-feature-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.45);
}

/* ============================================================
   RELATED ARTICLES
   ============================================================ */
.related-section {
    padding: 64px 0 80px;
    background: var(--tc-gray-bg);
    border-top: 1px solid var(--tc-border);
}
.section-head {
    max-width: 560px;
    margin: 0 auto 40px;
    text-align: center;
}
.section-head .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--tc-blue);
    margin-bottom: 12px;
}
.section-head .eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tc-blue);
}
.section-head h2 {
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--tc-text-main);
}
.section-head p {
    font-size: 0.95rem;
    color: var(--tc-text-muted);
    line-height: 1.7;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 640px) {
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .related-grid { grid-template-columns: repeat(3, 1fr); }
}

.clean-card {
    background: #fff;
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.clean-card:hover {
    box-shadow: 0 8px 28px rgba(0, 82, 217, 0.08);
    transform: translateY(-3px);
}

.related-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.related-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.related-card-body .cat-chip {
    align-self: flex-start;
    margin-bottom: 10px;
    font-size: 11px;
}
.related-card h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 8px;
    color: var(--tc-text-main);
}
.related-card h3 a {
    color: inherit;
    text-decoration: none;
}
.related-card h3 a:hover { color: var(--tc-blue); }
.related-card p {
    font-size: 13px;
    color: var(--tc-text-muted);
    line-height: 1.65;
    flex: 1;
    margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .post-wrap { padding: 0 20px; }
    .post-masthead { padding-top: calc(var(--nav-height) + 32px); }
    .post-body-section { padding: 40px 0 56px; }
    .article-content h2 { font-size: 1.22rem; margin-top: 36px; }
    .article-content pre { padding: 14px 16px; }
    .metric-row { grid-template-columns: 1fr 1fr; }
    .article-cta-inner { padding: 32px 24px; gap: 28px; }
    .cta-spec-card { width: 100%; min-width: 0; }
    .floating-cta {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .pulse-dot { animation: none; }
}
