:root {
    --rd-primary: #5c94eb;
    --rd-primary-dark: #4a7fd1;
    --rd-primary-light: rgba(92,148,235,.12);
    --rd-accent: #fa943d;
    --rd-accent-light: rgba(250,148,61,.12);
    --rd-green: #198754;
    --rd-red: #dc3545;
    --rd-purple: #a78bfa;
    --rd-text: #111827;
    --rd-text-muted: #6b7280;
    --rd-bg: #f6f7fb;
    --rd-surface: #ffffff;
    --rd-border: #e6e8ef;
    --rd-radius: 14px;
    --rd-shadow: 0 2px 8px rgba(0,0,0,0.06);
    --rd-shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--rd-bg);
    color: var(--rd-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--rd-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.blog-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rd-border);
}
.blog-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.blog-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--rd-primary);
    text-decoration: none;
    letter-spacing: -.5px;
}
.blog-nav-brand:hover { text-decoration: none; }
.blog-nav-logo-text { letter-spacing: -.5px; }
.blog-nav-logo-dot { color: var(--rd-accent); }
.blog-nav-logo {
    position: relative;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.blog-nav-logo-core {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--rd-primary);
    box-shadow: 0 0 8px rgba(92,148,235,.4);
}
.blog-nav-logo-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(92,148,235,.2);
    animation: blogOrbitSpin 3s linear infinite;
}
.blog-nav-logo-satellite {
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rd-accent);
    box-shadow: 0 0 6px rgba(250,148,61,.5);
}
@keyframes blogOrbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.blog-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.blog-nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--rd-text-muted);
    transition: color .15s;
}
.blog-nav-links a:hover,
.blog-nav-links a.active {
    color: var(--rd-primary);
    text-decoration: none;
}
.blog-nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--rd-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s;
}
.blog-nav-cta:hover { background: var(--rd-primary-dark); color: #fff; text-decoration: none; }

.reading-progress {
    position: fixed;
    top: 56px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a7fd4 0%, #6b9fef 35%, #8b7ce0 65%, #c48550 85%, #e09045 100%);
    width: 0%;
    z-index: 99;
    transition: width .1s linear;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.blog-hero {
    padding: 48px 0 32px;
}
.blog-hero-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.blog-hero-sub {
    font-size: 16px;
    color: var(--rd-text-muted);
    max-width: 560px;
}
.blog-hero-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.blog-hero-editor-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    background: var(--rd-bg);
    border: 1px solid var(--rd-border);
    color: var(--rd-text-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: all .15s;
    flex-shrink: 0;
}
.blog-hero-editor-btn:hover {
    border-color: var(--rd-primary);
    color: var(--rd-primary);
    background: var(--rd-primary-light);
    text-decoration: none;
}

.blog-search {
    position: relative;
    max-width: 480px;
    margin-top: 24px;
}
.blog-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--rd-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--rd-surface);
    transition: border-color .2s, box-shadow .2s;
}
.blog-search input:focus {
    outline: none;
    border-color: var(--rd-primary);
    box-shadow: 0 0 0 3px var(--rd-primary-light);
}
.blog-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rd-text-muted);
    font-size: 18px;
    line-height: 1;
}

.blog-cats {
    display: flex;
    gap: 8px;
    padding: 16px 0 24px;
    overflow-x: auto;
    scrollbar-width: none;
}
.blog-cats::-webkit-scrollbar { display: none; }
.blog-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--rd-border);
    background: var(--rd-surface);
    color: var(--rd-text-muted);
    white-space: nowrap;
    transition: all .2s;
}
.blog-cat:hover { border-color: var(--rd-primary); color: var(--rd-primary); }
.blog-cat.active {
    background: var(--rd-primary);
    border-color: var(--rd-primary);
    color: #fff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 48px;
}

.blog-card {
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: var(--rd-radius);
    overflow: hidden;
    transition: box-shadow .35s, transform .35s;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    will-change: transform;
}
.blog-card:hover {
    box-shadow: var(--rd-shadow-lg);
}
.blog-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 320 / 180;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rd-bg);
}
.blog-card-img .card-scene {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.blog-card-img .card-icon-fallback { width: 48px; height: 48px; opacity: 0.4; }
.blog-card-img::after {
    display: none;
}
.blog-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
    width: fit-content;
    letter-spacing: 0.3px;
}
.tag-guide     { background: #dbeafe; color: #1d4ed8; }
.tag-advanced  { background: #ede9fe; color: #6d28d9; }
.tag-case      { background: #d1fae5; color: #065f46; }
.tag-news      { background: #fee2e2; color: #991b1b; }
.tag-tool      { background: #fef3c7; color: #92400e; }
.tag-review    { background: #fce7f3; color: #9d174d; }

.blog-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--rd-text);
}
.blog-card-title a { color: inherit; }
.blog-card-title a:hover { color: var(--rd-primary); text-decoration: none; }
.blog-card-excerpt {
    font-size: 13.5px;
    color: var(--rd-text-muted);
    line-height: 1.55;
    flex: 1;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--rd-border);
    font-size: 12px;
    color: var(--rd-text-muted);
}
.blog-card-meta svg,
.blog-card-meta i {
    width: 13px;
    height: 13px;
    font-size: 13px;
    vertical-align: -2px;
    margin-right: 3px;
}

.blog-card.featured {
    grid-column: span 2;
    flex-direction: row;
}
.blog-card.featured .blog-card-img {
    width: 320px;
    height: auto;
    min-height: 200px;
    aspect-ratio: 320 / 180;
    flex-shrink: 0;
    border-radius: var(--rd-radius) 0 0 var(--rd-radius);
}
.blog-card.featured .blog-card-body { padding: 28px; }
.blog-card.featured .blog-card-title { font-size: 22px; }
.blog-card.featured .blog-card-excerpt { font-size: 14px; }

.blog-sidebar-cta {
    background: linear-gradient(135deg, var(--rd-primary), #417bd8);
    border-radius: var(--rd-radius);
    padding: 28px 24px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
}
.blog-sidebar-cta h4 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.blog-sidebar-cta p { font-size: 13px; opacity: 0.9; margin-bottom: 16px; line-height: 1.5; }
.blog-sidebar-cta .btn-cta {
    display: inline-block;
    padding: 10px 24px;
    background: #fff;
    color: var(--rd-primary);
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: transform .2s;
}
.blog-sidebar-cta .btn-cta:hover { transform: translateY(-1px); text-decoration: none; }

.blog-breadcrumbs {
    padding: 20px 0 0;
    font-size: 13px;
    color: var(--rd-text-muted);
}
.blog-breadcrumbs a { color: var(--rd-text-muted); }
.blog-breadcrumbs a:hover { color: var(--rd-primary); }
.blog-breadcrumbs .sep { margin: 0 6px; opacity: 0.5; }

.article-header {
    padding: 24px 0 32px;
    max-width: 760px;
}
.article-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 14px;
    margin-bottom: 14px;
}
.article-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: var(--rd-text-muted);
    flex-wrap: wrap;
}
.article-meta svg,
.article-meta i {
    width: 14px;
    height: 14px;
    font-size: 14px;
    vertical-align: -2px;
    margin-right: 4px;
}
.article-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 48px;
    padding-bottom: 64px;
}

.article-content {
    max-width: 760px;
    font-size: 16px;
    line-height: 1.75;
    color: #1f2937;
}
.article-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 16px;
    padding-top: 8px;
    scroll-margin-top: 72px;
}
.article-content h3 {
    font-size: 19px;
    font-weight: 600;
    margin: 32px 0 12px;
    scroll-margin-top: 72px;
}
.article-content p { margin: 0 0 18px; }
.article-content ul,
.article-content ol {
    margin: 0 0 18px;
    padding-left: 24px;
}
.article-content li { margin-bottom: 6px; }
.article-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 20px 0;
}
.article-content blockquote {
    border-left: 4px solid var(--rd-primary);
    background: var(--rd-primary-light);
    padding: 16px 20px;
    border-radius: 0 10px 10px 0;
    margin: 20px 0;
    font-style: italic;
    color: #374151;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.article-content th,
.article-content td {
    padding: 10px 14px;
    border: 1px solid var(--rd-border);
    text-align: left;
}
.article-content th {
    background: var(--rd-bg);
    font-weight: 600;
}
.article-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}
.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
}
.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-cta {
    background: linear-gradient(135deg, var(--rd-primary-light) 0%, rgba(139,124,224,.06) 50%, rgba(250,148,61,.04) 100%);
    border: 1px solid rgba(92,148,235,.2);
    border-radius: var(--rd-radius);
    padding: 24px 28px;
    margin: 32px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}
.article-cta-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--rd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.article-cta-icon svg { width: 24px; height: 24px; color: #fff; }
.article-cta-text { flex: 1; }
.article-cta-text strong { display: block; font-size: 15px; margin-bottom: 4px; }
.article-cta-text span { font-size: 13.5px; color: var(--rd-text-muted); }
.article-cta .btn-try {
    display: inline-block;
    padding: 10px 20px;
    background: var(--rd-primary);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    white-space: nowrap;
    transition: background .2s;
}
.article-cta .btn-try:hover { background: var(--rd-primary-dark); text-decoration: none; }

.article-toc {
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
}
.article-toc-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rd-text-muted);
    margin-bottom: 14px;
}
.article-toc-list {
    list-style: none;
    padding: 0;
    border-left: 2px solid var(--rd-border);
}
.article-toc-list li {
    margin: 0;
}
.article-toc-list a {
    display: block;
    padding: 5px 0 5px 16px;
    font-size: 13px;
    color: var(--rd-text-muted);
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: all .15s;
    line-height: 1.4;
}
.article-toc-list a:hover {
    color: var(--rd-primary);
    text-decoration: none;
}
.article-toc-list a.active {
    color: var(--rd-primary);
    border-left-color: var(--rd-primary);
    font-weight: 600;
}
.article-toc-list a.toc-h3 {
    padding-left: 28px;
    font-size: 12.5px;
}

.blog-related {
    border-top: 1px solid var(--rd-border);
    padding: 48px 0;
}
.blog-related-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}
.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-footer {
    background: #111827;
    color: #9ca3af;
    padding: 32px 0;
    font-size: 13px;
    text-align: center;
}
.blog-footer a { color: #d1d5db; }
.blog-footer a:hover { color: #fff; }

@media (max-width: 900px) {
    .blog-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .blog-card.featured { grid-column: span 2; flex-direction: column; }
    .blog-card.featured .blog-card-img { width: 100%; min-height: 180px; border-radius: var(--rd-radius) var(--rd-radius) 0 0; }
    .article-layout { grid-template-columns: 1fr; gap: 24px; }
    .article-toc { display: none; }
    .article-title { font-size: 28px; }
    .blog-related-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (max-width: 600px) {
    .blog-nav-links { display: none; }
    .blog-nav-inner { padding: 0 14px; height: 48px; }
    .blog-nav-brand { font-size: 18px; gap: 6px; }
    .blog-nav-logo { width: 24px; height: 24px; }
    .blog-nav-logo-core { width: 12px; height: 12px; }
    .blog-nav-logo-satellite { width: 6px; height: 6px; top: -2px; }
    .blog-nav-cta { padding: 6px 12px; font-size: 11px; border-radius: 6px; }
    .reading-progress { top: 48px; }

    .blog-container { padding: 0 14px; }

    .blog-hero { padding: 20px 0 12px; }
    .blog-hero-title { font-size: 22px; margin-bottom: 4px; }
    .blog-hero-sub { font-size: 13px; line-height: 1.45; }
    .blog-hero-row { gap: 8px; }
    .blog-hero-editor-btn { padding: 5px 10px; font-size: 11px; border-radius: 6px; gap: 4px; }
    .blog-hero-editor-btn svg { width: 12px; height: 12px; }

    .blog-search { margin-top: 12px; max-width: 100%; }
    .blog-search input { padding: 9px 12px 9px 36px; font-size: 13px; border-radius: 8px; }
    .blog-search-icon { left: 11px; width: 16px; height: 16px; }

    .blog-cats { padding: 10px 0 14px; gap: 5px; }
    .blog-cat { padding: 5px 10px; font-size: 11px; border-radius: 16px; gap: 4px; }
    .blog-cat svg, .blog-cat i { width: 12px; height: 12px; font-size: 12px; }

    .blog-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 24px; }

    .blog-card { border-radius: 10px; }
    .blog-card-img { aspect-ratio: 16 / 10; }
    .blog-card-body { padding: 10px 10px 12px; }
    .blog-card-tag { font-size: 9px; padding: 2px 6px; margin-bottom: 5px; border-radius: 8px; letter-spacing: 0; }
    .blog-card-title { font-size: 13px; margin-bottom: 4px; line-height: 1.3; }
    .blog-card-excerpt { font-size: 11px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .blog-card-meta { margin-top: 6px; padding-top: 6px; font-size: 10px; gap: 8px; }
    .blog-card-meta svg, .blog-card-meta i { width: 11px; height: 11px; font-size: 11px; margin-right: 2px; }


    .blog-card.featured { grid-column: span 2; flex-direction: row; }
    .blog-card.featured .blog-card-img {
        width: 120px;
        min-height: 0;
        aspect-ratio: 1 / 1;
        border-radius: 10px 0 0 10px;
        flex-shrink: 0;
    }
    .blog-card.featured .blog-card-body { padding: 10px 12px; }
    .blog-card.featured .blog-card-title { font-size: 14px; }
    .blog-card.featured .blog-card-excerpt { font-size: 11px; -webkit-line-clamp: 2; }

    .blog-breadcrumbs { padding: 10px 0 0; font-size: 11px; }
    .blog-breadcrumbs .sep { margin: 0 4px; }

    .article-header { padding: 12px 0 16px; }
    .article-tag { font-size: 10px; padding: 3px 8px; margin-bottom: 8px; border-radius: 10px; }
    .article-title { font-size: 21px; margin-bottom: 10px; line-height: 1.25; }
    .article-meta { font-size: 11px; gap: 10px; }
    .article-meta svg { width: 13px; height: 13px; }

    .article-content { font-size: 14.5px; line-height: 1.65; }
    .article-content h2 { font-size: 19px; margin: 24px 0 10px; }
    .article-content h3 { font-size: 16px; margin: 20px 0 8px; }
    .article-content p { margin-bottom: 14px; }
    .article-content ul,
    .article-content ol { padding-left: 20px; margin-bottom: 14px; }
    .article-content li { margin-bottom: 4px; }
    .article-content blockquote { padding: 10px 14px; margin: 14px 0; font-size: 13.5px; border-radius: 0 8px 8px 0; }
    .article-content table { font-size: 12px; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .article-content th,
    .article-content td { padding: 7px 8px; white-space: nowrap; }
    .article-content pre { padding: 12px; font-size: 12px; border-radius: 8px; margin: 14px 0; }
    .article-content img { border-radius: 8px; margin: 14px 0; }

    .article-cta { flex-direction: column; text-align: center; padding: 20px 16px; gap: 12px; margin: 20px 0; border-radius: 10px; align-items: center; }
    .article-cta-icon { width: 40px; height: 40px; border-radius: 10px; }
    .article-cta-icon svg, .article-cta-icon i { width: 20px; height: 20px; font-size: 20px; }
    .article-cta-text { flex: none; }
    .article-cta-text strong { font-size: 14px; margin-bottom: 6px; }
    .article-cta-text span { font-size: 12.5px; line-height: 1.5; }
    .article-cta .btn-try { padding: 10px 24px; font-size: 13px; border-radius: 8px; }

    .article-layout { padding-bottom: 32px; }

    .blog-sidebar-cta { padding: 16px; border-radius: 10px; }
    .blog-sidebar-cta h4 { font-size: 15px; margin-bottom: 6px; }
    .blog-sidebar-cta p { font-size: 12px; margin-bottom: 12px; }
    .blog-sidebar-cta .btn-cta { padding: 8px 16px; font-size: 13px; }

    .blog-related { padding: 24px 0; }
    .blog-related-title { font-size: 17px; margin-bottom: 12px; }
    .blog-related-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

    .blog-footer { padding: 20px 0; font-size: 11px; }
}
