.hidden {
    display: none !important;
}

.detail-loading,
.detail-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 6rem 1rem;
    color: var(--text-secondary, #94a3b8);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(99, 102, 241, .2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.back-link {
    color: #6366f1;
    text-decoration: none;
    font-size: .9rem;
}

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

.report-back-row {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.report-back-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, .35);
    background: rgba(99, 102, 241, .08);
    color: #818cf8;
    font-size: .88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .15s;
}

.report-back-btn:hover {
    background: rgba(99, 102, 241, .18);
    border-color: #6366f1;
    color: #a5b4fc;
}

.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem 5rem;

    overflow-x: hidden;
}

@media (max-width: 640px) {
    .detail-wrap {
        padding: 0 1rem 4rem;
    }
}

.detail-article {
    min-width: 0;
    overflow-x: hidden;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--text-secondary, #64748b);
    padding: 1.5rem 0 0;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary, #64748b);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #6366f1;
}

.report-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 2rem 0 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    margin-bottom: 2.5rem;
}

.report-category-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 6px;
    background: rgba(99, 102, 241, .15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, .3);
    margin-bottom: 1.1rem;
}

.report-title {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.25;
    color: #f0f4ff;
    margin: 0 0 .65rem;
    word-break: keep-all;
    overflow-wrap: break-word;
    letter-spacing: -.02em;
}

.report-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0 0 1.25rem;
    line-height: 1.6;
    word-break: keep-all;
}

@media (max-width: 640px) {
    .report-subtitle {
        font-size: .92rem;
    }
}

.report-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .82rem;
    color: #64748b;
    margin-bottom: .9rem;
}

.report-meta-line .meta-dot {
    opacity: .4;
}

.report-meta-line svg {
    opacity: .6;
}

.report-header-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-self: stretch;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

@media (max-width: 640px) {
    .report-header-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

.report-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.report-tag {
    font-size: .72rem;
    padding: 3px 9px;
    border-radius: 5px;
    background: rgba(99, 102, 241, .08);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, .18);
}

.report-share-group {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.share-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s;
}

.share-icon-btn:hover {
    background: rgba(99, 102, 241, .15);
    border-color: rgba(99, 102, 241, .4);
    color: #818cf8;
}

.share-copy-msg {
    font-size: .78rem;
    color: #34d399;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 2.5rem;
    align-items: start;
}

.detail-layout>* {
    min-width: 0;
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        display: none;
    }
}

.report-summary-box {
    border-left: 3px solid #6366f1;
    background: rgba(99, 102, 241, .06);
    border-radius: 0 10px 10px 0;
    padding: 1.1rem 1.4rem;
    margin-bottom: 2rem;
}

.summary-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    font-weight: 700;
    color: #818cf8;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .6rem;
}

.summary-markdown {
    font-size: .92rem;
    line-height: 1.75;
}

.summary-markdown p {
    margin: 0 0 .55rem;
}

.summary-markdown p:last-child {
    margin-bottom: 0;
}

.summary-markdown ul,
.summary-markdown ol {
    margin: .3rem 0 .55rem;
}

.summary-markdown h1,
.summary-markdown h2,
.summary-markdown h3,
.summary-markdown h4 {
    margin-top: .8rem;
    margin-bottom: .4rem;
    border-bottom: none;
    padding-bottom: 0;
}

.report-thumbnail {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 2rem;
    object-fit: cover;
    max-height: 400px;
    border: 1px solid rgba(255, 255, 255, .07);
}

.markdown-body {
    font-size: .95rem;
    line-height: 1.9;
    color: #cbd5e1;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

@media (max-width: 640px) {
    .markdown-body {
        font-size: .9rem;
        line-height: 1.8;
    }
}

.markdown-body h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 2.5rem 0 1rem;
    color: #f0f4ff;
    letter-spacing: -.02em;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    padding-bottom: .4rem;
}

.markdown-body h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2.2rem 0 .9rem;
    color: #f0f4ff;
    letter-spacing: -.01em;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    padding-bottom: .35rem;
}

.markdown-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1.8rem 0 .7rem;
    color: #e2e8f0;
}

.markdown-body h4 {
    font-size: .98rem;
    font-weight: 600;
    margin: 1.4rem 0 .6rem;
    color: #a5b4fc;
}

.markdown-body p {
    margin: 0 0 1.1rem;
}

.markdown-body strong {
    color: #f0f4ff;
    font-weight: 700;
}

.markdown-body a {
    color: #818cf8;
    text-decoration: underline;
    text-decoration-color: rgba(129, 140, 248, .35);
}

.markdown-body a:hover {
    color: #a5b4fc;
}

.markdown-body pre {
    background: #0d1117;
    border-radius: 8px;
    padding: 1.1rem 1.2rem;
    overflow-x: auto;
    margin: 1.2rem 0;
    border: 1px solid rgba(255, 255, 255, .08);
    max-width: 100%;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
}

.markdown-body code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: .86em;
}

.markdown-body :not(pre)>code {
    background: rgba(99, 102, 241, .12);
    color: #a5b4fc;
    padding: 2px 6px;
    border-radius: 4px;
}

.markdown-body blockquote {
    border-left: 3px solid #6366f1;
    margin: 1rem 0;
    padding: .6rem 1rem;
    background: rgba(99, 102, 241, .05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #94a3b8;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
    font-size: .86rem;
    display: block;
    overflow-x: auto;
}

.markdown-body th {
    background: rgba(99, 102, 241, .12);
    color: #818cf8;
    font-weight: 600;
    padding: .6rem .9rem;
    border: 1px solid rgba(99, 102, 241, .2);
    text-align: left;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .markdown-body th {
        white-space: normal;
        min-width: 80px;
    }
}

.markdown-body td {
    padding: .55rem .9rem;
    border: 1px solid rgba(255, 255, 255, .06);
    color: #cbd5e1;
}

.markdown-body tr:nth-child(even) {
    background: rgba(255, 255, 255, .02);
}

.markdown-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid rgba(255, 255, 255, .07);
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 1.5rem;
    margin: .8rem 0 1rem;
}

.markdown-body li {
    margin-bottom: .35rem;
}

.markdown-body hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin: 2rem 0;
}

.mermaid {
    background: rgba(99, 102, 241, .04);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 10px;
    padding: 1rem;
    margin: 1.2rem 0;
    overflow-x: auto;
}

.detail-sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-card {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.sidebar-title {
    font-size: .75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 1rem;
}

.sidebar-info {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    font-size: .85rem;
}

.sidebar-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}

.sidebar-info-label {
    color: #64748b;
    font-size: .78rem;
}

.sidebar-info-value {
    color: #e2e8f0;
    font-weight: 500;
    font-size: .82rem;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, .06);
    margin: .9rem 0;
}

.sidebar-share {
    display: flex;
    gap: .45rem;
    margin-top: .2rem;
}

.sidebar-share-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s;
}

.sidebar-share-btn:hover {
    background: rgba(99, 102, 241, .15);
    border-color: rgba(99, 102, 241, .4);
    color: #818cf8;
}

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sidebar-tag {
    font-size: .7rem;
    padding: 3px 8px;
    border-radius: 5px;
    background: rgba(99, 102, 241, .08);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, .18);
}

[data-theme="light"] .report-title {
    color: #0f172a;
}

[data-theme="light"] .report-subtitle {
    color: #475569;
}

[data-theme="light"] .report-meta-line {
    color: #64748b;
}

[data-theme="light"] .report-header {
    border-bottom-color: rgba(0, 0, 0, .08);
}

[data-theme="light"] .report-header-bottom {
    border-top-color: rgba(0, 0, 0, .07);
}

[data-theme="light"] .sidebar-card {
    background: #fff;
    border-color: rgba(0, 0, 0, .1);
}

[data-theme="light"] .report-header {
    background: transparent;
    border-bottom-color: rgba(0, 0, 0, .08);
    position: static;

}

[data-theme="light"] .sidebar-info-value {
    color: #0f172a;

}

[data-theme="light"] .sidebar-title {
    color: #475569;
}

[data-theme="light"] .sidebar-divider {
    border-top-color: rgba(0, 0, 0, .08);
}

[data-theme="light"] .sidebar-share-btn {
    border-color: rgba(0, 0, 0, .12);
    background: rgba(0, 0, 0, .03);
    color: #475569;
}

[data-theme="light"] .report-title {
    color: #0f172a;

}

[data-theme="light"] .report-subtitle {
    color: #475569;
}

[data-theme="light"] .report-meta-line {
    color: #64748b;
}

[data-theme="light"] .markdown-body {
    color: #334155;
}

[data-theme="light"] .markdown-body h1,
[data-theme="light"] .markdown-body h2,
[data-theme="light"] .markdown-body h3 {
    color: #0f172a;
    border-bottom-color: rgba(0, 0, 0, .08);
}

[data-theme="light"] .markdown-body pre {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, .08);
}

[data-theme="light"] .markdown-body td {
    color: #334155;
    border-color: rgba(0, 0, 0, .07);
}

[data-theme="light"] .report-summary-box {
    background: rgba(99, 102, 241, .05);
}

[data-theme="light"] .summary-markdown,
[data-theme="light"] .summary-markdown p {
    color: #334155;
}

[data-theme="light"] .share-icon-btn {
    border-color: rgba(0, 0, 0, .12);
    background: rgba(0, 0, 0, .03);
}

[data-theme="light"] .markdown-body strong {
    color: #0f172a;

}

[data-theme="light"] .markdown-body h4 {
    color: #4338ca;
}

[data-theme="light"] .markdown-body a {
    color: #4f46e5;
    text-decoration-color: rgba(79, 70, 229, .4);
}

[data-theme="light"] .markdown-body a:hover {
    color: #3730a3;
}

[data-theme="light"] .markdown-body blockquote {
    background: rgba(99, 102, 241, .05);
    color: #475569;
}

[data-theme="light"] .markdown-body :not(pre)>code {
    background: rgba(99, 102, 241, .08);
    color: #4338ca;
}

[data-theme="light"] .markdown-body pre code {
    color: #1e293b;
}

[data-theme="light"] .markdown-body th {
    background: rgba(99, 102, 241, .08);
    color: #4338ca;
    border-color: rgba(99, 102, 241, .2);
}

[data-theme="light"] .markdown-body tr:nth-child(even) {
    background: rgba(0, 0, 0, .02);
}

[data-theme="light"] .report-summary-box .summary-label {
    color: #4338ca;
}