/* Ported verbatim from Breckly/demo/assets/css/charts.css. Change a value here only to match the reference. */
/* Shared charts (assets/js/charts.js). Series tones follow the app accent and the status colours. */

.chart { margin: 0; display: grid; gap: 6px; min-width: 0; }
.c-plot { position: relative; height: var(--h, 160px); margin-left: 40px; }
.c-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.c-y span { position: absolute; left: -40px; width: 32px; transform: translateY(-50%); text-align: right; font: 500 10.5px/1 var(--font-data); color: var(--ink-3); }
.c-x { display: flex; justify-content: space-between; margin-left: 40px; font: 500 10.5px/1 var(--font-data); color: var(--ink-3); }
.c-grid { stroke: var(--grid); stroke-width: 1; }
.c-threshold { stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 5 4; }
.c-thr-label { position: absolute; right: 0; transform: translateY(-130%); font-size: 11px; font-weight: 600; color: var(--ink-2); }
.c-line { fill: none; stroke: var(--tone); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-area { fill: var(--tone); opacity: 0.1; }
.s0 { --tone: var(--series); }
.s1 { --tone: color-mix(in oklab, var(--p-glow) 78%, var(--p-deep)); }
.s2 { --tone: var(--wait-mark); }
.s3 { --tone: var(--line-strong); }
.ok { --tone: var(--ok-mark); }
.crit { --tone: var(--crit-mark); }
.c-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); }
.c-legend span { display: inline-flex; align-items: center; gap: 6px; }
.c-legend b { font-weight: 600; color: var(--ink); }
.c-key { width: 9px; height: 9px; border-radius: 3px; background: var(--tone); }

.c-cols { height: var(--h, 140px); display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--grid); }
.c-col { flex: 1; min-width: 2px; height: var(--v); border-radius: 3px 3px 0 0; background: var(--tone); }
.columns .c-x { margin-left: 0; }

.donut { margin: 0; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.d-ring { position: relative; width: var(--size); height: var(--size); flex: none; }
.d-ring svg { width: 100%; height: 100%; transform: rotate(0); }
.c-track { fill: none; stroke: var(--sunken); stroke-width: 5.2; }
[data-theme="dark"] .c-track { stroke: var(--line); }
.c-arc { fill: none; stroke: var(--tone); stroke-width: 5.2; }
.d-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.15; }
.d-center strong { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.d-center span { font-size: 11px; color: var(--ink-3); }
.donut .c-legend { display: grid; gap: 7px; }

.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.bar-list li { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.b-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.b-track { height: 7px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
[data-theme="dark"] .b-track { background: var(--line); }
.b-fill { display: block; height: 100%; border-radius: 4px; background: var(--tone); }
.b-value { min-width: 34px; text-align: right; font-size: 12px; color: var(--ink); }

.stack-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.stack-bar span { background: var(--tone); min-width: 2px; }
.spark { display: block; overflow: visible; }
.spark .c-line { stroke-width: 1.6; }
