/* ===========================================================================
   6 Month Review

   Sits on top of the Month In Review stylesheet — the banner, section headers
   and empty state are reused from there so the two pages read as siblings.
   Only the chart grid and the chart card are new.
   =========================================================================== */

.smr-banner-range {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.smr-banner-actions {
    display: flex;
    align-items: center;
}

.smr-table-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.smr-table-toggle:hover {
    border-color: #cbd5e1;
    color: #0f172a;
}

.smr-table-toggle[aria-pressed="true"] {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Same rhythm as .dashboard-stats on Month In Review, with a wider minimum because
   a chart needs more room to be legible than a number does. */
.smr-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.smr-card {
    background: #fff;
    border: 1px solid #e1e8ef;
    border-radius: 10px;
    padding: 16px 18px 14px;
}

.smr-card-head {
    margin-bottom: 10px;
}

.smr-card-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Proportional figures, not tabular — equal-width digits make a large standalone
   number look loose. The card value is the current month's point, which is why no
   number is drawn on the line itself. */
.smr-card-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.15;
    margin-top: 4px;
    font-variant-numeric: proportional-nums;
}

.smr-card-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Accent colours carry the metric's identity from the matching Month In Review card.
   The figure is the only place the accent appears as text — labels and axes stay in
   ink so colour is never the only thing saying what a number is. */
.smr-accent-blue { color: #2563eb; }
.smr-accent-green { color: #059669; }
.smr-accent-amber { color: #d97706; }
.smr-accent-purple { color: #7c3aed; }
.smr-accent-red { color: #ef4444; }

/* Sized to hold the plot AND the x-axis band. A height that fits only the plot gives
   the card its own tiny vertical scrollbar. */
.smr-chart-wrap {
    position: relative;
    height: 160px;
}

.is-drillable-chart .smr-chart-wrap {
    cursor: pointer;
}

/* Table twin — every value on the chart is also readable as text. */
.smr-table {
    margin-top: 12px;
    overflow-x: auto;
}

.smr-table table {
    width: 100%;
    border-collapse: collapse;
    /* Aligned columns, so here equal-width digits are what you want. */
    font-variant-numeric: tabular-nums;
}

.smr-table th,
.smr-table td {
    padding: 6px 8px;
    text-align: right;
    font-size: 11px;
    white-space: nowrap;
}

.smr-table th {
    color: #94a3b8;
    font-weight: 600;
    border-bottom: 1px solid #f1f5f9;
}

.smr-table td {
    color: #1e293b;
    font-weight: 600;
}

.smr-table .is-current {
    color: #0f172a;
    background: #f8fafc;
}

/* The fallback table inside each <canvas> is never painted — it exists for assistive
   technology, which reads canvas fallback content. Belt and braces in case a browser
   ever decides to render it. */
.smr-chart-wrap canvas table {
    display: none;
}

@media (max-width: 640px) {
    .smr-chart-grid {
        grid-template-columns: 1fr;
    }
}
