/* EA-S04: the Persian economic-analysis section (/insights). RTL comes from bootstrap.rtl; numbers and codes stay LTR where marked. */
body.insights {
    font-family: 'Vazirmatn', system-ui, sans-serif;
    background: #f7f7f5;
    color: #1f2328;
    line-height: 1.8;
}

.insights-nav {
    background: #1f2a37;
}

.insights-nav .navbar-brand,
.insights-nav .nav-link,
.insights-nav .navbar-text,
.insights-nav .navbar-text a {
    color: #f3f4f6;
}

.insights-nav .nav-link.active {
    color: #c9a227;
    font-weight: 600;
}

.insights .card {
    border-color: #e5e7eb;
}

.insights .report p,
.insights .report dd {
    text-align: justify;
}

mark.flagged {
    background: #fde68a;
    padding: 0 .15em;
    border-radius: .2em;
}

.flagged-preview {
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    padding: .4rem .6rem;
    border-radius: .3rem;
}

/* scoring dashboard (DESIGN-DASHBOARD-SCORING-FA, steps 2-4) */
.insights {
    --up: #15803d; --up-bg: #ecfdf3; --down: #b91c1c; --down-bg: #fef2f2; --flat: #475569; --flat-bg: #f1f5f9;
    --warn: #92400e; --warn-bg: #fef3c7; --line: #e5e7eb; --muted: #6b7280; --panel: #ffffff;
}
.muted { color: var(--muted); }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; white-space: nowrap; }

.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .75rem; margin-bottom: 1rem; }
.dash-head h1 { font-size: 1.5rem; font-weight: 800; margin: 0; }
.dash-head .lead-note { color: var(--muted); margin: .25rem 0 0; font-size: .9rem; }
.dash-head .stamp { display: flex; flex-direction: column; align-items: flex-end; font-size: .8rem; color: var(--muted); }

.note { border-radius: .5rem; padding: .5rem .85rem; font-size: .85rem; margin-bottom: 1rem; }
.note-warn { background: var(--warn-bg); color: var(--warn); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; padding: 1rem 1.1rem; }
.panel-title { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; }
.sub-title { font-size: .9rem; font-weight: 700; margin-bottom: .5rem; }
details.panel > summary { cursor: pointer; }

/* horizon cards */
.score-card { height: 100%; border-top: 4px solid var(--flat); }
.score-card.tone-up { border-top-color: var(--up); }
.score-card.tone-down { border-top-color: var(--down); }
.score-row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin: .5rem 0 .35rem; }
.score-value { font-size: 2.5rem; font-weight: 800; line-height: 1.1; }
.score-label { font-weight: 700; font-size: 1.05rem; }
.tone-up .score-value, .tone-up .score-label { color: var(--up); }
.tone-down .score-value, .tone-down .score-label { color: var(--down); }
.score-line { position: relative; height: 10px; border-radius: 5px; margin: .25rem 0;
    background: linear-gradient(to right, var(--down), #e5e7eb 40%, #e5e7eb 60%, var(--up)); }
.score-line .score-neutral { position: absolute; top: -3px; bottom: -3px; left: 40%; width: 20%; border-inline: 1px dashed #94a3b8; }
.score-line .score-marker { position: absolute; top: -5px; width: 4px; height: 20px; margin-right: -2px; background: #111827; border-radius: 2px; }
.scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-bottom: .6rem; }
.facts { display: flex; gap: 1.5rem; margin: 0 0 .75rem; font-size: .85rem; }
.facts div { display: flex; gap: .35rem; }
.facts dt { font-weight: 400; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.drivers { display: grid; grid-template-columns: 1fr; gap: .5rem; border-top: 1px solid var(--line); padding-top: .65rem; }
.drivers-title { font-size: .8rem; font-weight: 700; margin-bottom: .3rem; }
.drivers-title.up { color: var(--up); }
.drivers-title.down { color: var(--down); }
.drivers ul { list-style: none; padding: 0; margin: 0; font-size: .82rem; }
.drivers li { display: flex; justify-content: space-between; gap: .4rem; padding: .15rem 0; line-height: 1.5; }
.drivers .pts { color: var(--muted); }

/* macro, questions, changes */
.regime { display: inline-block; font-weight: 800; font-size: 1.05rem; padding: .25rem .75rem; border-radius: 999px; background: var(--flat-bg); color: var(--flat); margin-bottom: .5rem; }
.regime-stagflation, .regime-slowdown { background: var(--up-bg); color: var(--up); }
.regime-sticky_inflation { background: var(--warn-bg); color: var(--warn); }
.qa { border-inline-start: 4px solid var(--flat); background: #fafafa; border-radius: .5rem; padding: .6rem .85rem; margin-bottom: .6rem; }
.qa:last-child { margin-bottom: 0; }
.qa h3 { font-size: .9rem; font-weight: 700; margin-bottom: .25rem; }
.qa p { margin-bottom: .25rem; font-size: .88rem; }
.tone-border-up { border-inline-start-color: var(--up) !important; }
.tone-border-down { border-inline-start-color: var(--down) !important; }
.tone-text.tone-up { color: var(--up); }
.tone-text.tone-down { color: var(--down); }
.changes { list-style: none; padding: 0; margin: 0; }
.changes li { border-inline-start: 3px solid var(--flat); padding: .3rem .65rem; margin-bottom: .35rem; font-size: .88rem; background: #fafafa; border-radius: .35rem; }

.macro-list { list-style: none; padding: 0; margin: 0; }
.macro-list li { padding: .45rem 0; border-bottom: 1px solid #f1f5f9; }
.macro-list li:last-child { border-bottom: 0; }
.macro-top { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.macro-title { font-size: .88rem; }
.macro-value { font-weight: 700; font-size: .95rem; }
.macro-sub { display: flex; justify-content: space-between; gap: .75rem; font-size: .76rem; margin-top: .1rem; }

/* tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th { font-weight: 600; font-size: .78rem; color: var(--muted); text-align: right; padding: .45rem .55rem; border-bottom: 1px solid var(--line); background: #f8fafc; white-space: nowrap; }
.data-table td { text-align: right; padding: .45rem .55rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; line-height: 1.6; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fcfcfd; }
.data-table .c-num { text-align: left; width: 1%; white-space: nowrap; }
.data-table .c-date { width: 1%; white-space: nowrap; color: var(--muted); font-size: .8rem; }
.data-table.compact td, .data-table.compact th { padding: .35rem .45rem; }
.data-table .row-muted td { color: #9ca3af; }
.badge-soft { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; background: var(--flat-bg); color: var(--flat); }
.badge-soft.badge-up { background: var(--up-bg); color: var(--up); }
.badge-soft.badge-down { background: var(--down-bg); color: var(--down); }
.badge-soft.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-soft.badge-none { background: #f3f4f6; color: #9ca3af; }

/* axis explorer */
.axes .accordion-button { padding: .6rem .5rem; font-size: .9rem; gap: .75rem; }
.axes .accordion-body { padding: .25rem .25rem .75rem; }
.axis-title { flex: 1; }
.axis-score { min-width: 4.5rem; font-weight: 700; text-align: left; }
.axis-score.tone-up { color: var(--up); }
.axis-score.tone-down { color: var(--down); }

/* chart */
.gold-chart { position: relative; width: 100%; }
.chart-tip { position: absolute; top: 8px; background: rgba(17, 24, 39, .92); color: #fff; font-size: .8rem; padding: .35rem .55rem;
    border-radius: .35rem; pointer-events: none; min-width: 150px; }
.chart-legend { font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
.chart-legend .lg { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-inline: .6rem .25rem; }
.lg-close { background: #b8860b; } .lg-ma50 { background: #2563eb; } .lg-ma200 { background: #7c3aed; }
.chart-legend .lg-cmp { height: 0; border-top: 2px dashed #059669; }
.chart-controls .btn.active { background: #1f2a37; color: #fff; border-color: #1f2a37; }

@media (max-width: 575.98px) {
    .score-value { font-size: 2rem; }
    .dash-head .stamp { align-items: flex-start; }
    .data-table { font-size: .8rem; }
}
