/* ── Report Analysis Page ─────────────────────────────────────────── */

.reports-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.rpt-nav {
    margin-bottom: 0.5rem;
}

.rpt-back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
}

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

/* Title */
.rpt-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0 1.5rem;
    line-height: 1.2;
}

.rpt-title-sub {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Stat cards row (cards themselves are .ss-card ss-card--alt in markup) */
.rpt-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.rpt-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    flex: 1;
}

.rpt-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.rpt-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-align: center;
}

/* Charts grid (side-by-side on desktop) */
.rpt-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1rem 0;
}

/* Chart sections */
.rpt-chart-section {
    margin: 1rem 0;
}

.rpt-chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--text-muted);
}

.rpt-chart-wrap {
    position: relative;
    max-height: 300px;
}

.rpt-chart-small {
    max-height: 220px;
}

/* Dose distribution */
.rpt-dose-dist {
    margin: 1rem 0;
}

.rpt-dose-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* mg/kg sub-stats line renders at footnote scale (was an inline style) */
.rpt-dose-stats.ss-footnote {
    font-size: 0.78rem;
}

.rpt-dose-stat strong {
    color: var(--text);
}

/* Effect Profile comparison */
.rpt-ep-compare {
    margin: 1rem 0 1.5rem;
}

.rpt-ep-class {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

/* Combination links */
.rpt-combo-link {
    color: var(--accent);
    text-decoration: none;
}

.rpt-combo-link:hover {
    text-decoration: underline;
}

.rpt-combo-bar {
    background: var(--accent) !important;
    opacity: 0.6;
}

/* Animated disclosure used by the "Show all effects" toggle. Own class
   (.rpt-collapse) so it no longer re-defines substance.css's
   .collapse-content (whose base behavior is display:none). */
.rpt-collapse {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s linear;
    padding: 0;
}

.rpt-collapse.open {
    padding: 0.5rem 0;
}

/* External link footer (link itself is .ss-btn ss-btn--outline in markup) */
.rpt-ext-link {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
}

/* Report link card (on substance page). Markup lives in substance.html /
   substance/_pill_link.html (other packages), so it stays a self-contained
   page class here rather than an .ss-card. */
.report-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-alt);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.report-link-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.report-link-info {
    display: flex;
    flex-direction: column;
}

.report-link-count {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

.report-link-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.report-link-arrow {
    font-size: 1.5rem;
    color: var(--accent);
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.report-link-card:hover .report-link-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ── Section sub-heading ────────────────────────────────────── */
.rpt-sub-heading {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}

/* ── Form Distribution ─────────────────────────────────────── */
/* Deliberate distinct series color: keeps the Form/Preparation bars
   visually separate from the accent-colored Combination bars above. */
.rpt-form-bar {
    background: rgba(180,130,255,0.6) !important;
}

/* ── Body Weight Section ───────────────────────────────────── */
.rpt-bw-section {
    margin: 1rem 0;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 768px) {
    .rpt-charts-grid {
        grid-template-columns: 1fr;
    }

    .rpt-stats-row {
        gap: 0.5rem;
    }

    .rpt-stat-card {
        min-width: 80px;
        padding: 0.75rem 1rem;
    }

    .rpt-stat-number {
        font-size: 1.2rem;
    }

    .rpt-title {
        font-size: 1.4rem;
    }

}

@media (max-width: 480px) {
    .rpt-stats-row {
        flex-direction: column;
    }

    .rpt-stat-card {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .rpt-stat-label {
        text-align: right;
    }

    .rpt-dose-stats {
        flex-direction: column;
        gap: 0.25rem;
    }
}
