.accounting-call-chart {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(198,162,91,.025), rgba(255,255,255,.004) 42%, transparent);
}

.accounting-call-chart-subhead {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.008);
}

.accounting-call-chart-titleblock {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.accounting-call-chart-titleblock > strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 780;
}

.accounting-call-chart-titleblock > span {
    color: var(--muted-2);
    font-size: 10px;
    line-height: 1.35;
}

.accounting-call-chart-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.006));
}

.accounting-call-chart-summary > div {
    min-width: 0;
    padding: 13px 16px 12px;
    border-right: 1px solid var(--border);
}

.accounting-call-chart-summary > div:last-child {
    border-right: 0;
}

.accounting-call-chart-summary span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.accounting-call-chart-summary strong {
    color: var(--text);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.accounting-call-chart-summary strong small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.accounting-call-chart-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: rgba(198,162,91,.42) rgba(255,255,255,.025);
}

.accounting-call-chart-canvas {
    min-width: 820px;
    padding: 16px 20px 0;
}

.accounting-call-chart-canvas svg {
    display: block;
    width: 100%;
    height: auto;
    color: var(--gold);
    overflow: visible;
}

.accounting-call-grid {
    stroke: rgba(255,255,255,.075);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.accounting-call-axis,
.accounting-call-axis-title {
    fill: var(--muted-2);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
}

.accounting-call-axis {
    font-size: 9px;
}

.accounting-call-axis-title {
    fill: var(--muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .12em;
}

.accounting-call-axis-title-right,
.accounting-call-axis-token {
    fill: rgba(199,195,186,.68);
}

.accounting-call-axis-time {
    fill: var(--muted);
    font-size: 9px;
}

.accounting-call-token-bar {
    fill: rgba(199,195,186,.22);
    stroke: rgba(199,195,186,.12);
    stroke-width: .6;
    rx: 1.8;
    transition: fill .15s ease, opacity .15s ease;
}

.accounting-call-token-bar:hover {
    fill: rgba(199,195,186,.44);
}

.accounting-call-cost-area {
    fill: url(#accountingCostArea);
    pointer-events: none;
}

.accounting-call-cost-line {
    fill: none;
    stroke: var(--gold-bright);
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}

.accounting-call-cost-point {
    fill: var(--gold-bright);
    stroke: rgba(8,10,14,.92);
    stroke-width: 1.2;
    vector-effect: non-scaling-stroke;
    cursor: help;
    transition: r .12s ease, filter .12s ease;
}

.accounting-call-cost-point:hover {
    r: 4.4px;
    filter: drop-shadow(0 0 4px rgba(230,196,123,.5));
}

.accounting-call-cost-point.is-error {
    fill: var(--danger);
    stroke: rgba(216,118,118,.28);
    stroke-width: 6;
}

.accounting-call-cost-point.is-error:hover {
    r: 6.2px;
    filter: drop-shadow(0 0 5px rgba(216,118,118,.55));
}

.accounting-call-chart-legend {
    min-height: 48px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    padding: 10px 18px 12px;
    border-top: 1px solid var(--border);
    color: var(--muted-2);
    font-size: 10px;
}

.accounting-call-chart-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.accounting-call-chart-legend > span::before {
    content: "";
    display: inline-block;
    flex: 0 0 auto;
}

.accounting-call-chart-legend .is-cost::before {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--gold-bright);
}

.accounting-call-chart-legend .is-token::before {
    width: 8px;
    height: 12px;
    border: 1px solid rgba(199,195,186,.16);
    border-radius: 2px;
    background: rgba(199,195,186,.28);
}

.accounting-call-chart-legend .is-error::before {
    width: 8px;
    height: 8px;
    border: 3px solid rgba(216,118,118,.22);
    border-radius: 50%;
    background: var(--danger);
}

.accounting-call-chart-legend small {
    margin-left: auto;
    color: var(--muted-2);
    font-size: 9px;
}

@media (max-width: 980px) {
    .accounting-call-chart-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .accounting-call-chart-summary > div:nth-child(3) {
        border-right: 0;
    }

    .accounting-call-chart-summary > div:nth-child(n+4) {
        border-top: 1px solid var(--border);
    }

    .accounting-call-chart-summary > div:nth-child(4) {
        grid-column: 1 / span 1;
    }

    .accounting-call-chart-summary > div:nth-child(5) {
        grid-column: 2 / span 1;
    }
}

@media (max-width: 640px) {
    .accounting-call-chart-subhead {
        align-items: flex-start;
        padding-inline: 14px;
    }

    .accounting-call-chart-subhead .accounting-panel-note {
        display: none;
    }

    .accounting-call-chart-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .accounting-call-chart-summary > div,
    .accounting-call-chart-summary > div:nth-child(3) {
        border-right: 1px solid var(--border);
        border-top: 1px solid var(--border);
    }

    .accounting-call-chart-summary > div:nth-child(-n+2) {
        border-top: 0;
    }

    .accounting-call-chart-summary > div:nth-child(even) {
        border-right: 0;
    }

    .accounting-call-chart-summary > div:nth-child(5) {
        grid-column: 1 / -1;
        border-right: 0;
    }

    .accounting-call-chart-canvas {
        min-width: 760px;
        padding-inline: 12px;
    }

    .accounting-call-chart-legend {
        gap: 10px 14px;
        padding-inline: 14px;
    }

    .accounting-call-chart-legend small {
        width: 100%;
        margin-left: 0;
    }
}

@media print {
    .accounting-call-chart {
        break-inside: avoid;
        background: #fff !important;
    }

    .accounting-call-chart-scroll {
        overflow: visible !important;
    }

    .accounting-call-chart-canvas {
        min-width: 0;
        padding-inline: 8px;
    }

    .accounting-call-chart-canvas svg {
        color: #8b6b2d;
    }

    .accounting-call-grid {
        stroke: #ddd;
    }

    .accounting-call-axis,
    .accounting-call-axis-title,
    .accounting-call-chart-titleblock > span,
    .accounting-call-chart-summary span,
    .accounting-call-chart-legend {
        fill: #555;
        color: #555;
    }

    .accounting-call-chart-titleblock > strong,
    .accounting-call-chart-summary strong {
        color: #111;
    }

    .accounting-call-chart-summary,
    .accounting-call-chart-subhead {
        background: #fff;
    }
}
