/* =============================================================================
 * 电磁学理论速查 · 独立页面样式
 * 复用 style.css 的 .page-hero / .section-head / .site-nav / .site-footer / .stats-bar
 * 本文件只放理论板块专属样式，便于后续独立维护。
 * ========================================================================== */

.lr-empty {
    padding: 4rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ------------------------------ 理论速查 ------------------------------ */

.lr-theory {
    margin-top: 0;
    padding-top: 0;
}

.theory-timeline {
    position: relative;
    margin-top: 1.25rem;
}

.theory-timeline::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 104px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    opacity: 0.35;
}

.theory-item {
    position: relative;
    padding-left: 148px;
    margin-bottom: 1.25rem;
}

.theory-year {
    position: absolute;
    left: 0;
    top: 18px;
    width: 88px;
    text-align: right;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--primary);
}

.theory-node {
    position: absolute;
    left: 98px;
    top: 22px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 4px var(--bg);
}

.theory-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.theory-card.is-open {
    border-color: rgba(37, 99, 235, 0.32);
    box-shadow: var(--shadow-md);
}

.theory-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 1.15rem 1.35rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--text);
    font: inherit;
}

.theory-title {
    font-weight: 600;
    font-size: 1.08rem;
}

.theory-en {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.theory-chevron {
    margin-left: auto;
    display: flex;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.theory-chevron svg { width: 20px; height: 20px; }

.theory-card.is-open .theory-chevron { transform: rotate(180deg); }

.theory-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.theory-card.is-open .theory-body {
    max-height: 1800px;
    opacity: 1;
}

.theory-body-inner {
    padding: 0 1.35rem 1.35rem;
}

.theory-intro-block {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border);
}

.th-intro-proposers {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 0 0 auto;
}

.th-intro-proposer {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.th-proposer-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.th-proposer-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.th-lifespan {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.th-photo {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    overflow: hidden;
    flex: 0 0 auto;
}

.th-photo.has-img { background: none; }

.th-initial { position: relative; z-index: 1; }

.th-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.theory-intro-text {
    flex: 1 1 auto;
    margin: 0;
    line-height: 1.75;
    color: var(--text);
    font-size: 0.98rem;
}

.theory-detail {
    margin: 0 0 1.1rem;
    line-height: 1.85;
    color: var(--text);
    font-size: 0.95rem;
}

.theory-detail p { margin: 0 0 0.8rem; }
.theory-detail p:last-child { margin-bottom: 0; }

.theory-formula {
    font-family: Cambria, Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 10px;
    padding: 0.9rem 1.05rem;
    margin: 0 0 0.6rem;
    overflow-x: auto;
    font-size: 0.98rem;
    line-height: 2;
    color: var(--text);
}

.theory-formula b { color: var(--primary); }

.theory-formula-note {
    margin: 0 0 1rem;
    line-height: 1.75;
    color: var(--text);
    font-size: 0.9rem;
}

.theory-wpt {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 10px;
    padding: 0.85rem 1.05rem;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text);
}

.theory-wpt-tag {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: var(--lr-done, #10b981);
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
    letter-spacing: 0.03em;
    margin-top: 0.1rem;
}

.is-hidden { display: none !important; }

.lr-theory-source {
    margin-top: 1.5rem;
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--text-muted);
}
.lr-theory-source a { color: var(--primary); }

@media (max-width: 640px) {
    .theory-timeline::before { left: 9px; }
    .theory-item { padding-left: 34px; }
    .theory-year {
        position: static;
        width: auto;
        text-align: left;
        margin-bottom: 0.4rem;
    }
    .theory-node { left: 3px; top: 5px; width: 12px; height: 12px; }
    .theory-head { padding: 1rem; }
    .theory-body-inner { padding: 0 1rem 1rem; }
    .theory-title { font-size: 1rem; }
    .theory-intro-block {
        flex-direction: column;
        gap: 0.9rem;
    }
    .th-intro-proposers {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.8rem 1rem;
    }
    .th-photo { width: 46px; height: 46px; }
    .theory-formula { font-size: 0.92rem; }
}
