/* rx-charts.css - General UI Designs: the look of rx-charts.js (rxCharts / rxChart). Dark glass, orange accent, white text. */
.rxch { position: relative; width: 100%; min-width: 0; }
.rxch-svg { display: block; width: 100%; height: auto; overflow: visible; }
.rxch-grid { stroke: rgba(255, 255, 255, .1); stroke-width: 1; }
.rxch-axis { stroke: rgba(255, 255, 255, .32); stroke-width: 1; }
.rxch-tick { fill: var(--ink2); font: 500 11px var(--font); font-variant-numeric: tabular-nums; }
.rxch-stroke { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.rxch-dot { stroke: #16181e; stroke-width: 1; }
.rxch-cross { stroke: rgba(255, 255, 255, .45); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.rxch-hit { cursor: crosshair; }
.rxch-col { transition: opacity .15s; }
.rxch-col:hover, .rxch-seg:hover { opacity: .8; }
.rxch-empty { margin: 8px 0; }

/* legend */
.rxch-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; font-size: 12.5px; color: var(--ink2); }
.rxch-key { display: inline-flex; align-items: center; gap: 6px; }
.rxch-key i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.rxch-key.is-dashed i { background: none !important; border-top: 2px dashed var(--ink2); height: 0; }

/* tooltip */
.rxch-tip { position: fixed; z-index: 9998; pointer-events: none; min-width: 120px; padding: 8px 10px; border-radius: 12px;
  background: var(--solid); color: var(--ink); box-shadow: var(--pop-shadow); font: 12.5px/1.45 var(--font); font-variant-numeric: tabular-nums;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.rxch-tip.is-on { opacity: 1; transform: none; }
.rxch-tip b { display: block; font-weight: 600; margin-bottom: 2px; }
.rxch-tip span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.rxch-tip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ranked bars */
.rxch-hlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rxch-hrow { display: grid; gap: 4px; }
.rxch-hrow.is-link { cursor: pointer; border-radius: 8px; }
.rxch-hrow.is-link, .rxch-dlegend li.is-link { min-height: 44px; align-content: center; padding: 4px 6px; margin: 0 -6px; cursor: pointer; border-radius: 8px; }   /* a row that opens its detail is finger-sized */
.rxch-hrow.is-link:hover, .rxch-dlegend li.is-link:hover { background: var(--tint); }
.rxch-hrow.is-link:hover .rxch-hname { text-decoration: underline; text-decoration-color: var(--ac-text); }
.rxch-hhead { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.rxch-hname { min-width: 0; overflow-wrap: anywhere; }
.rxch-hval { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rxch-htrack { display: block; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.rxch-htrack i { display: block; height: 100%; border-radius: 6px; }
.rxch-hsub { font-size: 12px; color: var(--ink2); }

/* donut */
.rxch-donutwrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rxch-ring { width: 150px; flex: 0 0 150px; }
.rxch-center { fill: var(--ink); font: 600 18px var(--font); font-variant-numeric: tabular-nums; }
.rxch-seg { stroke-linecap: butt; cursor: pointer; }
.rxch-dlegend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1 1 160px; max-width: 380px; min-width: 0; font-size: 13px; }
.rxch-dlegend li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; }
.rxch-dlegend i { width: 10px; height: 10px; border-radius: 3px; }
.rxch-dl { min-width: 0; overflow-wrap: anywhere; color: var(--ink2); }
.rxch-dlegend b { font-weight: 500; font-variant-numeric: tabular-nums; }

/* sparkline */
.rxch-spark { display: inline-block; vertical-align: middle; overflow: visible; }

/* KPI tiles */
.rxch-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.rxch-kpi { position: relative; display: grid; align-content: start; gap: 4px; min-width: 0; padding: 14px 16px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); text-align: left; font: inherit; }
button.rxch-kpi { cursor: pointer; transition: border-color .15s, background .15s; }
button.rxch-kpi:hover { border-color: var(--line-hover); background: var(--tint); }
.rxch-kpi.is-warn { border-color: rgba(242, 179, 107, .7); }
.rxch-kpi.is-bad { border-color: rgba(255, 156, 146, .7); }
.rxch-kpi__l { font-size: 12.5px; color: var(--ink2); }
.rxch-kpi__v { font-size: 26px; font-weight: 300; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rxch-kpi__f { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--ink2); }
.rxch-delta { font-weight: 500; font-variant-numeric: tabular-nums; }
.rxch-delta.is-good { color: #9be3b0; }
.rxch-delta.is-bad { color: var(--bad); }
.rxch-kpi__sp { margin-top: 4px; }

/* heatmap */
.rxch-heatwrap { overflow-x: auto; }
.rxch-heatgrid { border-collapse: separate; border-spacing: 3px; font-size: 11.5px; color: var(--ink2); }
.rxch-heatgrid th { font-weight: 500; padding: 2px 6px; white-space: nowrap; text-align: left; }
.rxch-heatgrid thead th { text-align: center; }
.rxch-heatgrid td { width: 28px; min-width: 22px; height: 22px; border-radius: 5px; }
.rxch-heatkey { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--ink2); }
.rxch-heatkey i { flex: 0 0 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(34,170,158,.12), #22aa9e); }
.rxch-heatkey { flex-wrap: wrap; }
.rxch-heatneg { display: inline-flex; align-items: center; gap: 6px; }
.rxch-heatneg::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: #ff9c92; }   /* the red swatch, same as the red cells */
.rxch-heatgrid td.is-pick:hover { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
@media (pointer: coarse), (max-width: 600px) { .rxch-heatgrid td.is-pick { min-width: 36px; height: 36px; } }   /* cells that open a detail are big enough to tap */

/* card */
.rxch-card { min-width: 0; padding: 16px 18px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); }
.rxch-card__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 12px; }
.rxch-card__h h3 { margin: 0; font-size: 15px; font-weight: 500; }
.rxch-card__s { font-size: 12.5px; color: var(--ink2); }
.rxch-card__a { margin-left: auto; display: flex; gap: 6px; }

/* screen readers only */
.rxch-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 600px) {
  .rxch-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rxch-kpi { padding: 12px 14px; border-radius: 18px; }
  .rxch-kpi__v { font-size: 22px; }
  .rxch-card { padding: 14px; border-radius: 20px; }
  .rxch-ring { width: 128px; flex-basis: 128px; }
}
@media print {
  .rxch-tip { display: none; }
  .rxch-kpi, .rxch-card { background: #fff; color: #222; border-color: #ccc; }
  .rxch-tick, .rxch-dl, .rxch-kpi__l, .rxch-kpi__f, .rxch-hsub { fill: #444; color: #444; }
  .rxch-center { fill: #222; }
  .rxch-grid { stroke: #ddd; } .rxch-axis { stroke: #999; }
}

/* an empty chart inside a card: just the words and icon, not a second card inside the first */
.sm-main .rxch .ux__msg.rxch-empty, .rxch .ux__msg.rxch-empty { width: 100%; max-width: none; justify-self: stretch; margin: 6px 0; padding: 18px 8px; border: 0; background: none; box-shadow: none; }
.rxch-kpi.is-good { border-color: rgba(155, 227, 176, .6); }

/* any empty or info message inside a chart card: the words and icon only, not a card inside the card */
.sm-main .rxch-card .ux__msg:not(.is-loading) { width: 100%; max-width: none; justify-self: stretch; margin: 6px 0; padding: 18px 8px; border: 0; background: none; box-shadow: none; }

.rxch .is-pick { cursor: pointer; }   /* a point or column that opens its detail (onPick) */
.rxch rect.is-pick:focus-visible { outline: none; stroke: var(--ac); stroke-width: 2; }

/* Choose cards (rxCharts.chooser): a small panel under its button; a sheet at the bottom on phones */
.rxch-chooser { position: absolute; z-index: 30; margin-top: 6px; width: min(360px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-hover, rgba(255,255,255,.2)); background: var(--card-solid, #1f2128); box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.rxch-chooser > b { display: block; margin-bottom: 8px; font-weight: 500; }
.rxch-chooser__list { display: grid; gap: 6px; }
.rxch-chooser__list label { display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; cursor: pointer; }
.rxch-chooser__list input { margin-top: 2px; accent-color: var(--accent); }
.rxch-chooser__acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 760px) { .rxch-chooser { position: fixed; left: 16px; right: 16px; bottom: 16px; width: auto; } }
@media (pointer: coarse), (max-width: 600px) { .rxch-chooser__list label { min-height: 40px; align-items: center; } .rxch-chooser__list input { margin-top: 0; } .rxch-chooser__acts .ux-btn { min-height: 40px; } }

/* ---------- motion (2026-11-11): every chart builds itself in when it appears ----------
   Lines draw from left to right, columns and ranked bars grow, donuts turn in, KPI tiles rise one after another.
   They rest fully drawn; people who ask for less motion get none (rx-glass.css). */
.rxch-stroke[pathLength] { stroke-dasharray: 1; stroke-dashoffset: 0; animation: rxch-draw 1.1s cubic-bezier(.2,.75,.2,1) .1s both; }
@keyframes rxch-draw { from { stroke-dashoffset: 1; } }
.rxch-svg .rxch-dot { animation: rxch-fade .4s ease .7s both; }
.rxch-col { transform-box: fill-box; transform-origin: 50% 100%; animation: rxch-grow .6s cubic-bezier(.2,.75,.2,1) both; animation-delay: calc(.08s + var(--i, 0) * 35ms); }
.rxch-col.is-neg { transform-origin: 50% 0; }
@keyframes rxch-grow { from { transform: scaleY(0); } }
.rxch-htrack i { transform-origin: 0 50%; animation: rxch-growx .8s cubic-bezier(.2,.75,.2,1) .1s both; }
.rxch-hrow:nth-child(2) .rxch-htrack i { animation-delay: .17s; } .rxch-hrow:nth-child(3) .rxch-htrack i { animation-delay: .24s; }
.rxch-hrow:nth-child(4) .rxch-htrack i { animation-delay: .31s; } .rxch-hrow:nth-child(n+5) .rxch-htrack i { animation-delay: .38s; }
@keyframes rxch-growx { from { transform: scaleX(0); } }
.rxch-ring { animation: rxch-turn .9s cubic-bezier(.2,.75,.2,1) both; }
@keyframes rxch-turn { from { opacity: 0; transform: rotate(-70deg) scale(.85); } }
.rxch-heatgrid td { animation: rxch-fade .5s ease both; }
@keyframes rxch-fade { from { opacity: 0; } }
.rxch-kpis > .rxch-kpi { animation: rxch-rise .5s cubic-bezier(.2,.75,.2,1) both; }
.rxch-kpis > .rxch-kpi:nth-child(2) { animation-delay: .05s; } .rxch-kpis > .rxch-kpi:nth-child(3) { animation-delay: .1s; }
.rxch-kpis > .rxch-kpi:nth-child(4) { animation-delay: .15s; } .rxch-kpis > .rxch-kpi:nth-child(5) { animation-delay: .2s; }
.rxch-kpis > .rxch-kpi:nth-child(6) { animation-delay: .25s; } .rxch-kpis > .rxch-kpi:nth-child(n+7) { animation-delay: .3s; }
@keyframes rxch-rise { from { opacity: 0; transform: translateY(14px); } }
/* hover: a tile or card lifts a little with a soft teal edge */
.rxch-kpi, .rxch-card { transition: transform .25s cubic-bezier(.2,.75,.2,1), border-color .25s, box-shadow .25s, background .25s; }
button.rxch-kpi:hover { transform: translateY(-3px); border-color: rgba(var(--ac-rgb), .7); box-shadow: 0 10px 26px rgba(0,0,0,.3), 0 0 22px rgba(var(--ac-rgb), .18); }
button.rxch-kpi:active { transform: translateY(-1px) scale(.985); }
.rxch-card:hover { border-color: rgba(var(--ac-rgb), .45); }
@media print { .rxch-stroke, .rxch-col, .rxch-htrack i, .rxch-ring, .rxch-kpi, .rxch-heatgrid td, .rxch-dot { animation: none !important; } }