/* ===== Article (detail) ===== */
.article-content {
    line-height: 1.8;
    font-size: 1.125rem;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid #005A94;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
}

.article-content li {
    margin-bottom: .5rem;
    position: relative;
}

.article-content ul li:before {
    content: "•";
    color: #005A94;
    font-weight: 700;
    display: inline-block;
    width: 1em;
    margin-right: -1em;
}

.article-content blockquote {
    border-right: 4px solid #005A94;
    background: #F7F9FB;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 .5rem .5rem 0;
    font-style: italic;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.article-content th, .article-content td {
    border: 1px solid #e2e8f0;
    padding: .75rem;
    text-align: right;
}

.article-content th {
    background: #005A94;
    color: #fff;
    font-weight: 600;
}

.article-content tr:nth-child(even) {
    background: #f7fafc;
}

/* Chips */
.chip {
    transition: all .2s ease;
}

.chip-active {
    background-color: #005A94;
    color: #fff;
    border-color: transparent;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* TOC */
.toc {
    position: sticky;
    top: 6rem;
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    border: 1px solid #e2e8f0;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: .50rem;
}

.toc a {
    color: #4a5568;
    text-decoration: none;
    transition: color .2s;
    display: block;
    padding: .5rem 0;
    border-right: 3px solid transparent;
}

.toc a:hover {
    color: #0076c5;
}

.toc a.active {
    color: #005A94;
    border-right-color: #005A94;
    font-weight: 600;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    border: 1px solid #e2e8f0;
}

/* Comments */
.comment {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.comment-reply {
    margin-right: 3rem;
    border-right: 2px solid #e2e8f0;
    padding-right: 1rem;
}

/* Forms */
.form-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: .75rem;
    transition: all .2s;
}

.form-input:focus {
    outline: 0;
    border-color: #005A94;
    box-shadow: 0 0 0 3px rgba(0,90,148,.1);
}

.form-label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 600;
    color: #374151;
}

/* Archive cards */
.article-card {
    border: 1px solid #eef2f7;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16,24,40,.08);
}

.article-meta {
    font-size: .825rem;
    color: #6b7280;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 28rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Responsive */
@media (max-width: 1024px) {
    .article-content {
        font-size: 1rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.25rem;
    }

    .comment-reply {
        margin-right: 1.5rem;
    }

    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

@media (max-width: 768px) {
    .toc {
        position: static;
        margin-bottom: 2rem;
    }

    .modal-content {
        padding: 1rem;
    }
}