/* Charts (js/viz.js). Colours come from the theme (--c1..--c6, --grid, --axis in themes.css), so every chart follows the theme. */
.g0{--gc:var(--ink3)}.g1{--gc:var(--c1)}.g2{--gc:var(--c2)}.g3{--gc:var(--c3)}.g4{--gc:var(--c4)}.g5{--gc:var(--c5)}.g6{--gc:var(--c6)}
.gk{display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--gc);vertical-align:-1px;margin-right:7px;flex:none}
.viz-sub{margin:-6px 0 12px}
.viz-foot{margin:10px 0 0;font-size:12.5px}
.viz-chart{position:relative;width:100%;min-height:120px}
.viz-chart svg{display:block;max-width:100%;overflow:visible}

/* legend */
.viz-legend{list-style:none;display:flex;flex-wrap:wrap;gap:6px 16px;margin:12px 0 0;padding:0;font-size:12.5px;color:var(--ink2)}
.viz-legend li{display:inline-flex;align-items:center}

/* svg marks */
.viz-chart .gl{stroke:var(--grid);stroke-width:1}
.viz-chart .axl{stroke:var(--axis);stroke-width:1}
.viz-chart .ax{fill:var(--ink3);font-size:11px}
.viz-chart .ax.mo.sel{fill:var(--ink);font-weight:700}
.viz-chart .ax.proj{font-style:italic}
.viz-chart .split{stroke:var(--axis);stroke-width:1;stroke-dasharray:2 3}
.viz-chart .val{fill:var(--ink);font-size:11.5px;font-weight:600}
.viz-chart .seg{fill:var(--gc)}
.viz-chart .seg.proj{opacity:.5}
.viz-chart .hit{fill:transparent;cursor:default}
.viz-chart .hit:hover,.viz-chart .hit:focus{fill:var(--ink);fill-opacity:.06;outline:none}
.viz-chart .ln{stroke:var(--gc);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.viz-chart .wash{fill:var(--gc);fill-opacity:.12}
.viz-chart .dot{fill:var(--gc);stroke:var(--surface);stroke-width:2}
.viz-chart .pay{fill:var(--good);stroke:var(--surface);stroke-width:1.5}
.viz-chart .nowl{stroke:var(--ink3);stroke-width:1;stroke-dasharray:3 3}
.viz-chart .cur{stroke:var(--ink3);stroke-width:1}
.viz-chart .hitall{fill:transparent;cursor:crosshair}
.viz-chart .hitall:focus{outline:2px solid var(--accent);outline-offset:2px}

/* horizontal bars (HTML) */
.hbs{display:grid;gap:11px}
.hb{outline:none;border-radius:8px;padding:2px 0}
.hb:focus-visible,.hb.hot{background:color-mix(in srgb,var(--ink) 5%,transparent)}
.hb-h{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:13px;margin-bottom:5px}
.hb-n{display:inline-flex;align-items:center;min-width:0;color:var(--ink);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hb-v{color:var(--ink2);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;font-size:12.5px}
.hb-track{position:relative;display:flex;gap:2px;height:14px;border-radius:0 4px 4px 0;background:transparent}
.hb-track::before{content:"";position:absolute;inset:0;border-radius:0 4px 4px 0;background:var(--grid)}
.hb-track .fill{position:relative;display:block;height:100%;background:var(--gc);min-width:0}
.hb-track .fill:last-child{border-radius:0 4px 4px 0}
.hb-track .fill.rest{opacity:.38}
.hb-track .fill.on-top{position:absolute;left:0;top:0;border-radius:0 4px 4px 0}
.hb-track .fill.bad{background:var(--bad)}
.hb-track .fill.good{background:var(--good)}
.hb-track .fill.mid{background:var(--amber)}
.hb-track.meter{height:10px;border-radius:99px}
.hb-track.meter::before{border-radius:99px}
.hb-track.meter .fill{border-radius:99px}
.hb-track .mark{position:absolute;top:-3px;bottom:-3px;width:2px;background:var(--ink3);border-radius:1px}
.hb-s{display:flex;align-items:center;gap:5px;font-size:12px;margin-top:5px;color:var(--ink2)}
.hb-s svg{width:13px;height:13px}
.hb-s.good svg{color:var(--good)}.hb-s.mid svg{color:var(--amber)}.hb-s.bad svg,.hb-s.bad{color:var(--bad)}
.hb.item.paid .hb-n{color:var(--ink2)}
.hb .paidtick{display:inline-grid;place-items:center;width:15px;height:15px;margin-left:6px;color:var(--good)}
.hb .paidtick svg{width:14px;height:14px}
.flag{display:inline-flex;align-items:center;gap:3px;margin-left:8px;font-style:normal;font-size:11.5px;font-weight:600;color:var(--bad)}
.flag svg{width:12px;height:12px}

/* share bar */
.viz-share{display:flex;gap:2px;height:22px;margin:2px 0 4px}
.viz-share span{display:grid;place-items:center;background:var(--gc);min-width:3px;outline:none;color:#fff;font-size:11px;overflow:hidden}
.viz-share span:first-child{border-radius:4px 0 0 4px}.viz-share span:last-child{border-radius:0 4px 4px 0}
.viz-share span:only-child{border-radius:4px}
.viz-share span b{font-weight:700;text-shadow:0 1px 1px rgba(0,0,0,.35)}
.viz-share span:focus-visible,.viz-share span:hover{filter:brightness(1.12)}

/* table view */
.viz-table{margin-top:12px;font-size:12.5px}
.viz-table summary{cursor:pointer;color:var(--accent);font-weight:600;list-style:none}
.viz-table summary::-webkit-details-marker{display:none}
.viz-table summary::before{content:"▸ ";color:var(--ink3)}
.viz-table[open] summary::before{content:"▾ "}
/* A month-by-month table can hold more columns (up to 7) than a phone is wide, and a <table> doesn't shrink to fit the way
   most elements do - width:100% only affects it once it's already narrow enough. This scrolls the table itself sideways
   instead of the whole page: without it, the table dragged the entire card (and the page) wider than the screen. */
.viz-table-scroll{overflow-x:auto;margin-top:8px}
.viz-table table{width:100%;border-collapse:collapse}
.viz-table caption{text-align:left;color:var(--ink2);padding-bottom:4px}
.viz-table th,.viz-table td{padding:5px 6px;border-top:1px solid var(--line);text-align:left;font-weight:400;font-variant-numeric:tabular-nums}
.viz-table thead th,.viz-table thead td{color:var(--ink2);font-weight:600;border-top:0}
.viz-table .r{text-align:right}
.viz-table tbody th{font-weight:500}

/* the tooltip */
.viz-tip{position:fixed;z-index:300;pointer-events:none;min-width:160px;max-width:260px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:9px 11px;font-size:12.5px;box-shadow:0 8px 24px rgba(0,0,0,.28)}
.viz-tip[hidden]{display:none}
.viz-tip .tt{font-weight:600;margin-bottom:5px}
.viz-tip .tr{display:flex;align-items:center;gap:0;padding:1.5px 0}
.viz-tip .tl{color:var(--ink2);flex:1;min-width:0;padding:0}   /* (not the runway timeline's .tl) */
.viz-tip .tv{font-variant-numeric:tabular-nums;font-weight:600;margin-left:14px}
.viz-tip .tr.strong{border-top:1px solid var(--line);margin-top:4px;padding-top:5px}
.viz-tip .tn{color:var(--ink2);font-size:11.5px;margin-top:5px}
.viz-tip .gk{margin-right:7px}

/* the Charts page */
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
@media (max-width:720px){.kpis{grid-template-columns:1fr 1fr}}
.kpi{min-width:0}
.kpi .k{font-size:12px;color:var(--ink2)}
.kpi .v{font:600 22px/1.15 'Bricolage Grotesque',system-ui,sans-serif;font-variant-numeric:tabular-nums;margin-top:2px}
.kpi .s{font-size:12px;color:var(--ink2);margin-top:2px}
.dash-groups .hbs{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 28px}
@media (max-width:720px){.dash-groups .hbs{grid-template-columns:1fr}}
@media (prefers-reduced-motion:no-preference){.hb-track .fill{transition:width .25s}}
@media (forced-colors:active){.hb-track .fill,.viz-chart .seg,.viz-share span{forced-color-adjust:none}}
.viz-legend + .hbs{margin-top:16px}
.viz-chart .ln.dash{stroke-dasharray:5 4;stroke-width:1.5}
