/* ==========================================================================
   CALCULOVER TOPICS STYLESHEET (assets/css/topics.css)
   Consolidated styles for all topic concept pages (/topics/<slug>/)
   ========================================================================== */

.brand-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.article-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.article-breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.article-breadcrumb a {
    color: var(--text-dim, #8888aa);
    text-decoration: none;
    transition: color 0.15s ease;
}

.article-breadcrumb a:hover {
    color: var(--gold, #FFD700);
}

.article-breadcrumb .sep {
    color: #444;
}

.article-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    width: fit-content;
}

.badge--finance {
    background: rgba(123, 44, 191, 0.2);
    color: #c084fc;
    border: 1px solid rgba(123, 44, 191, 0.3);
}

.badge--health {
    background: rgba(189, 0, 255, 0.15);
    color: #e879f9;
    border: 1px solid rgba(189, 0, 255, 0.25);
}

.badge--business {
    background: rgba(0, 123, 255, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(0, 123, 255, 0.25);
}

.badge--construction {
    background: rgba(0, 209, 193, 0.15);
    color: #2dd4bf;
    border: 1px solid rgba(0, 209, 193, 0.25);
}

.badge--math {
    background: rgba(0, 243, 255, 0.15);
    color: #67e8f9;
    border: 1px solid rgba(0, 243, 255, 0.25);
}

.badge--daily {
    background: rgba(255, 215, 0, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(255, 215, 0, 0.25);
}

.badge--environment {
    background: rgba(163, 230, 53, 0.15);
    color: #a3e635;
    border: 1px solid rgba(163, 230, 53, 0.25);
}

.badge--legal {
    background: rgba(251, 113, 133, 0.15);
    color: #fb7185;
    border: 1px solid rgba(251, 113, 133, 0.25);
}

.badge--tools {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.article-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 1rem;
}

.article-title span {
    color: var(--gold, #FFD700);
}

.article-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted, #666);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 2.5rem 0;
}

.article-body {
    color: var(--text-dim, #8888aa);
    line-height: 1.75;
    font-size: 1rem;
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 2.5rem 0 0.75rem;
    scroll-margin-top: 5rem;
}

.article-body h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e2f0;
    margin: 1.75rem 0 0.5rem;
}

.article-body strong {
    color: #fff;
}

.article-body a {
    color: #00f3ff;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.article-body a:hover {
    color: var(--gold, #FFD700);
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.25rem 1.5rem;
}

.article-body ul li,
.article-body ol li {
    margin-bottom: 0.4rem;
}

/* Callouts & Formula Boxes */
.callout {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--gold, #FFD700);
    border-radius: 0 10px 10px 0;
    padding: 1.1rem 1.4rem;
    margin: 1.75rem 0;
}

.callout-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold, #FFD700);
    margin-bottom: 0.4rem;
}

.callout p {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    color: var(--text-dim, #8888aa);
}

.formula-box {
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #00f3ff;
    margin: 1.25rem 0;
    overflow-x: auto;
}

/* Table of Contents */
.guide-toc {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0 2.25rem;
}

.guide-toc__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold, #FFD700);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.guide-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.guide-toc__list li {
    margin: 0;
    padding: 0;
}

.guide-toc__list a {
    color: var(--text-dim, #8888aa);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.15s ease, padding-left 0.15s ease;
    display: inline-block;
}

.guide-toc__list a:hover {
    color: #00f3ff;
    padding-left: 4px;
}

/* Related Calculators Grid */
.related-calcs {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.related-calcs h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.related-calcs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.related-calc-link {
    display: block;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dim, #8888aa);
    font-size: 0.88rem;
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s;
}

.related-calc-link:hover {
    border-color: rgba(0, 243, 255, 0.3);
    color: #fff;
}

.related-calc-link .calc-link-name {
    color: #fff;
    display: block;
    margin-bottom: 0.25rem;
}

.related-calc-link .calc-link-desc {
    font-size: 0.78rem;
    font-weight: 400;
}

/* ==========================================================================
   LIGHT MODE OVERRIDES
   ========================================================================== */

[data-theme="light"] .article-title,
[data-theme="light"] .article-body h2,
[data-theme="light"] .article-body strong,
[data-theme="light"] .related-calcs h2,
[data-theme="light"] .related-calc-link .calc-link-name {
    color: #0f172a;
}

[data-theme="light"] .article-body h3 {
    color: #1e293b;
}

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

[data-theme="light"] .article-meta,
[data-theme="light"] .article-breadcrumb,
[data-theme="light"] .callout p,
[data-theme="light"] .related-calc-link .calc-link-desc {
    color: #64748b;
}

[data-theme="light"] .article-breadcrumb a,
[data-theme="light"] .related-calc-link {
    color: #475569;
}

[data-theme="light"] .article-breadcrumb a:hover,
[data-theme="light"] .article-body a:hover {
    color: #b45309;
}

[data-theme="light"] .article-title span {
    color: #b45309;
}

[data-theme="light"] .article-body a {
    color: #0284c7;
}

[data-theme="light"] .callout {
    background: #f8fafc;
    border-left-color: #f59e0b;
}

[data-theme="light"] .callout-label {
    color: #b45309;
}

[data-theme="light"] .formula-box {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}

[data-theme="light"] .guide-toc {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .guide-toc__title {
    color: #b45309;
}

[data-theme="light"] .guide-toc__list a {
    color: #475569;
}

[data-theme="light"] .guide-toc__list a:hover {
    color: #0284c7;
}

[data-theme="light"] .related-calc-link {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .related-calc-link:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

[data-theme="light"] .article-divider,
[data-theme="light"] .related-calcs {
    border-top-color: #e2e8f0;
}
