/* JSONSort 博客文章样式 · wireframe minimal (黑白灰 + brand-red 单点强调) */

.blog-header {
    border-bottom: 1px solid #000;
}
.blog-category {
    display: inline-flex;
    align-items: center;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
    border: 1px solid #000;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
}
.blog-title {
    color: #000;
    position: relative;
    display: inline-block;
}
.blog-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.25rem;
    width: 3rem;
    height: 3px;
    background: #E53935;
}
.blog-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.25rem;
    font-size: 0.8125rem;
    color: #666;
}
.blog-meta-chip {
    display: inline;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
}
.blog-meta-chip + .blog-meta-chip::before {
    content: "·";
    margin-right: 1.25rem;
    color: #ccc;
}
.blog-meta-chip--update {
    color: #E53935;
}
.blog-lead {
    font-size: 1.0625rem;
    line-height: 1.9;
    color: #333;
    padding-left: 1rem;
    border-left: 2px solid #E53935;
}
.blog-toc {
    border: 1px solid #000;
    border-radius: 1rem;
    background: #fff;
    padding: 1.25rem 1.5rem;
}
.blog-toc-title {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.875rem;
}
.blog-toc ol {
    counter-reset: toc;
    list-style: none;
    padding: 0;
    margin: 0;
}
.blog-toc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.1rem 2rem;
}
@media (min-width: 480px) {
    .blog-toc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .blog-toc-grid { grid-template-columns: repeat(3, 1fr); }
}
.blog-toc li {
    counter-increment: toc;
}
.blog-toc a {
    display: block;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #333;
    padding: 0.3rem 0;
    transition: color 0.15s;
}
.blog-toc a::before {
    content: counter(toc, decimal-leading-zero) ".";
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.6875rem;
    color: #999;
    margin-right: 0.5rem;
}
.blog-toc a:hover,
.blog-toc a.is-active {
    color: #E53935;
}

/* 右侧浮动引导 */
.blog-float-cta {
    position: fixed;
    right: 1.25rem;
    bottom: 5.5rem;
    z-index: 40;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 0.625rem;
}
.blog-float-trigger {
    position: relative;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1.5px solid #000;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.blog-float-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.blog-float-shape {
    position: relative;
    width: 1.125rem;
    height: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-float-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 0.375rem;
    height: 0.375rem;
    background: #E53935;
    border-radius: 50%;
    animation: blog-float-pulse 2.4s ease-in-out infinite;
}
.blog-float-diamond {
    width: 0.625rem;
    height: 0.625rem;
    border: 1.5px solid #000;
    animation: blog-float-wiggle 3s ease-in-out infinite;
}
.blog-float-popup {
    width: 10.5rem;
    padding: 0.75rem 0.875rem 0.875rem;
    border: 1px solid #000;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateX(0.375rem) scale(0.96);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    pointer-events: none;
}
.blog-float-popup-close {
    position: absolute;
    top: 0.35rem;
    right: 0.45rem;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    background: none;
    font-size: 1rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
}
.blog-float-popup-close:hover {
    color: #000;
}
.blog-float-popup-text {
    margin: 0 0 0.625rem;
    padding-right: 1rem;
    font-size: 0.6875rem;
    line-height: 1.55;
    color: #666;
}
.blog-float-popup-link {
    display: block;
    text-align: center;
    padding: 0.4rem 0.75rem;
    font-size: 0.6875rem;
}
.blog-float-cta.is-open .blog-float-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}
@media (hover: hover) {
    .blog-float-cta:hover .blog-float-popup {
        opacity: 1;
        visibility: visible;
        transform: translateX(0) scale(1);
        pointer-events: auto;
    }
}
@media (max-width: 640px) {
    .blog-float-cta {
        right: 0.875rem;
        bottom: 1.25rem;
    }
    .blog-float-popup {
        width: 9.5rem;
    }
}
@keyframes blog-float-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}
@keyframes blog-float-wiggle {
    0%, 100% { transform: rotate(45deg); }
    50% { transform: rotate(52deg); }
}
@media (prefers-reduced-motion: reduce) {
    .blog-float-dot,
    .blog-float-diamond {
        animation: none;
    }
    .blog-float-diamond {
        transform: rotate(45deg);
    }
}

.blog-prose code {
    font-family: 'JetBrains Mono', Menlo, monospace;
}
.blog-prose strong {
    font-weight: 600;
    color: #000;
}
.blog-prose a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.blog-prose a:hover {
    color: #E53935;
}
.blog-prose h2 {
    scroll-margin-top: 7rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}
.blog-prose table th,
.blog-prose table td {
    vertical-align: top;
}
.blog-callout {
    border: 1px solid #000;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    background: #fafafa;
}
.blog-callout--overview h2 {
    border-bottom: none;
    padding-bottom: 0;
}
.blog-table {
    border: 1px solid #000;
    background: #fff;
}
.blog-table thead tr {
    background: #fafafa;
    border-bottom: 1px solid #000;
}
.blog-table thead th {
    font-weight: 600;
    color: #000;
}
.blog-table tbody tr {
    border-bottom: 1px solid #eee;
}
.blog-table tbody tr:last-child {
    border-bottom: none;
}
.blog-table-row--highlight {
    background: #fafafa !important;
}
.blog-table-row--highlight td:first-child {
    font-weight: 600;
}
.blog-inline-code {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.8125rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    color: #000;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
}
.blog-inline-code--plain {
    color: #000;
    background: #f5f5f5;
    border-color: #e5e7eb;
}
.blog-code {
    background: #fafafa;
    color: #000;
    border: 1px solid #000;
}
.blog-code code {
    color: inherit;
    font-family: 'JetBrains Mono', Menlo, monospace;
}
.blog-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}
.blog-list li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.25rem;
    color: #555;
}
.blog-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #E53935;
    font-weight: 600;
}
.blog-steps {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0;
    counter-reset: step;
}
.blog-steps li {
    position: relative;
    padding: 0.65rem 0 0.65rem 2.5rem;
    counter-increment: step;
    border-bottom: 1px solid #eee;
}
.blog-steps li:last-child {
    border-bottom: none;
}
.blog-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #000;
    border: 1px solid #000;
    border-radius: 50%;
}
.blog-faq-item {
    border: 1px solid #000;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fff;
}
.blog-faq-item + .blog-faq-item {
    margin-top: 0.625rem;
}
.blog-faq-item h3 {
    color: #000;
}
.blog-reading {
    border: 1px solid #000;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    background: #fafafa;
}
.blog-reading-list a {
    color: #000;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.blog-reading-list a:hover {
    color: #E53935;
}
.blog-info-card {
    border: 1px solid #000;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fff;
}
.blog-info-card + .blog-info-card {
    margin-top: 0.75rem;
}
.blog-fact-tag {
    display: inline-block;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid #000;
}
.blog-fact-tag--confirmed {
    background: #ECFDF5;
    border-color: #047857;
    color: #047857;
}
.blog-fact-tag--media {
    background: #EFF6FF;
    border-color: #1D4ED8;
    color: #1D4ED8;
}
.blog-fact-tag--rumor {
    background: #FFFBEB;
    border-color: #B45309;
    color: #B45309;
}
.blog-fact-tag--analysis,
.blog-fact-tag--speculation {
    background: #F5F5F5;
    border-color: #666;
    color: #444;
}

html[data-theme="dark"] .blog-header { border-color: #444; }
html[data-theme="dark"] .blog-category {
    color: #aaa;
    border-color: #444;
}
html[data-theme="dark"] .blog-title { color: #f5f5f5; }
html[data-theme="dark"] .blog-meta-row { color: #aaa; }
html[data-theme="dark"] .blog-meta-chip--update { color: #E53935; }
html[data-theme="dark"] .blog-lead { color: #ddd; }
html[data-theme="dark"] .blog-toc {
    background: #111;
    border-color: #444;
}
html[data-theme="dark"] .blog-toc-title { color: #888; }
html[data-theme="dark"] .blog-toc a { color: #ccc; }
html[data-theme="dark"] .blog-toc a::before { color: #666; }
html[data-theme="dark"] .blog-toc a:hover,
html[data-theme="dark"] .blog-toc a.is-active { color: #E53935; }
html[data-theme="dark"] .blog-float-trigger {
    background: #111;
    border-color: #444;
}
html[data-theme="dark"] .blog-float-diamond { border-color: #888; }
html[data-theme="dark"] .blog-float-popup {
    background: #111;
    border-color: #444;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"] .blog-float-popup-text { color: #aaa; }
html[data-theme="dark"] .blog-float-popup-close { color: #666; }
html[data-theme="dark"] .blog-float-popup-close:hover { color: #f5f5f5; }
html[data-theme="dark"] .blog-prose strong { color: #f5f5f5; }
html[data-theme="dark"] .blog-prose a { color: #f5f5f5; }
html[data-theme="dark"] .blog-prose a:hover { color: #E53935; }
html[data-theme="dark"] .blog-prose h2 { border-color: #333; }
html[data-theme="dark"] .blog-callout { background: #161616; border-color: #444; }
html[data-theme="dark"] .blog-table {
    border-color: #444;
    background: #111;
}
html[data-theme="dark"] .blog-table thead tr {
    background: #161616;
    border-color: #444;
}
html[data-theme="dark"] .blog-table thead th { color: #f5f5f5; }
html[data-theme="dark"] .blog-table tbody tr { border-color: #333; }
html[data-theme="dark"] .blog-table-row--highlight { background: #161616 !important; }
html[data-theme="dark"] .blog-inline-code {
    color: #f5f5f5;
    background: #1a1a1a;
    border-color: #444;
}
html[data-theme="dark"] .blog-code {
    background: #111;
    color: #e5e7eb;
    border-color: #444;
}
html[data-theme="dark"] .blog-list li { color: #aaa; }
html[data-theme="dark"] .blog-steps li { border-color: #333; }
html[data-theme="dark"] .blog-steps li::before {
    color: #f5f5f5;
    border-color: #444;
}
html[data-theme="dark"] .blog-faq-item {
    background: #111;
    border-color: #444;
}
html[data-theme="dark"] .blog-faq-item h3 { color: #f5f5f5; }
html[data-theme="dark"] .blog-reading {
    background: #161616;
    border-color: #444;
}
html[data-theme="dark"] .blog-reading-list a { color: #f5f5f5; }
html[data-theme="dark"] .blog-info-card { background: #111; border-color: #444; }
html[data-theme="dark"] .blog-fact-tag--confirmed {
    background: #0f1f18;
    border-color: #047857;
    color: #6EE7B7;
}
html[data-theme="dark"] .blog-fact-tag--media {
    background: #0f1729;
    border-color: #3B82F6;
    color: #93C5FD;
}
html[data-theme="dark"] .blog-fact-tag--rumor {
    background: #241f0d;
    border-color: #B45309;
    color: #FCD34D;
}
html[data-theme="dark"] .blog-fact-tag--analysis,
html[data-theme="dark"] .blog-fact-tag--speculation {
    background: #1a1a1a;
    border-color: #666;
    color: #aaa;
}
