/* Charts shared by the landing page and the app: one hue, a zero baseline, labelled axes, gridlines and tooltips.
   Colours can be changed per surface with the --xc-* variables. */
.xc { --xc-bar: #2f55c4; --xc-bar-hi: #24449f; --xc-b2: #2f8a5b; --xc-b2-hi: #1f6b3a; --xc-grid: #e4e7ee; --xc-base: #a9afbd; --xc-ink: #1b2130; --xc-ink2: #515a6d; --xc-hover: rgba(47, 85, 196, .07); --xc-tip: #24262a; --xc-tip-ink: #fff; --xc-label: minmax(84px, 132px); --xc-value: 64px; color: var(--xc-ink); }
.xc ul, .xc ol { margin: 0; padding: 0; list-style: none; }
.xc p { margin: 0; }
.xc-tip { position: absolute; z-index: 5; padding: 7px 11px; border-radius: 9px; background: var(--xc-tip); color: var(--xc-tip-ink); font-size: 12.5px; font-weight: 500; line-height: 1.4; text-align: left; white-space: nowrap; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .55); display: none; pointer-events: none; }
.xc-axisname { margin-top: 4px; font-size: 12px; color: var(--xc-ink2); text-align: center; }

/* Horizontal bars */
.xc-row { position: relative; display: grid; grid-template-columns: var(--xc-label) minmax(0, 1fr) var(--xc-value); column-gap: 12px; align-items: stretch; width: 100%; min-height: 40px; color: inherit; text-decoration: none; border-radius: 6px; }
a.xc-row:hover, .xc-row[tabindex]:hover { background: var(--xc-hover); }
.xc-row:focus-visible { outline: 2px solid var(--xc-bar); outline-offset: 1px; }
.xc-label { align-self: center; min-width: 0; font-size: 13.5px; line-height: 1.25; text-align: left; }
.xc-area { position: relative; background: linear-gradient(90deg, var(--xc-grid) 1px, transparent 1px) 0 0 / calc(100% / var(--xc-div)) 100%; box-shadow: inset -1px 0 0 var(--xc-grid); border-left: 1px solid var(--xc-base); }
.xc-area i { position: absolute; left: 0; top: 50%; height: 14px; margin-top: -7px; width: calc(var(--v) * 100%); border-radius: 0 4px 4px 0; background: var(--xc-bar); }
.xc-row:hover .xc-area i, .xc-row:focus-visible .xc-area i { filter: brightness(.88); }
.xc-val { align-self: center; font-size: 13.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xc-row .xc-tip { right: 0; bottom: calc(100% - 6px); }
li:first-child > .xc-row .xc-tip { bottom: auto; top: calc(100% - 6px); }
.xc-row:hover .xc-tip, .xc-row:focus-visible .xc-tip { display: block; }
.xc-xaxis { display: grid; grid-template-columns: var(--xc-label) minmax(0, 1fr) var(--xc-value); column-gap: 12px; height: 24px; }
.xc-ticks { grid-column: 2; position: relative; border-top: 1px solid var(--xc-base); }
.xc-ticks b { position: absolute; top: 5px; transform: translateX(-50%); font-size: 11.5px; font-weight: 500; color: var(--xc-ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Columns */
.xc-frame { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 8px; padding-top: 18px; }
.xc-yaxis, .xc-plot { position: relative; height: var(--xc-h, 210px); }
.xc-yaxis b { position: absolute; right: 0; transform: translateY(50%); font-size: 11.5px; font-weight: 500; color: var(--xc-ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xc-line { position: absolute; left: 0; right: 0; height: 1px; background: var(--xc-grid); }
.xc-line.is-base { background: var(--xc-base); }
.xc .xc-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--xc-n), minmax(0, 1fr)); }
.xc-cols li { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; border-radius: 6px 6px 0 0; }
.xc-cols li:hover, .xc-cols li:focus-visible { background: var(--xc-hover); }
.xc-cols li:focus-visible { outline: 2px solid var(--xc-bar); }
.xc-colbar { position: relative; width: min(46px, 66%); height: calc(var(--v) * 100%); border-radius: 4px 4px 0 0; background: var(--xc-bar); }
.xc-colbar em { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font-size: 12px; font-style: normal; font-weight: 600; white-space: nowrap; }
.xc-cols li:hover .xc-colbar, .xc-cols li:focus-visible .xc-colbar { background: var(--xc-bar-hi); }
.xc-cols .xc-tip { left: 50%; transform: translateX(-50%); bottom: min(calc(var(--v) * 100% + 28px), calc(100% - 40px)); }
.xc-cols li:first-child .xc-tip { left: 0; transform: none; }
.xc-cols li:last-child .xc-tip { left: auto; right: 0; transform: none; }
.xc-cols li:hover .xc-tip, .xc-cols li:focus-visible .xc-tip { display: block; }
.xc-xlabels { grid-column: 2; display: grid; grid-template-columns: repeat(var(--xc-n), minmax(0, 1fr)); padding-top: 7px; }
.xc-xlabels span { font-size: 12px; text-align: center; color: var(--xc-ink2); }

/* Two series: legend above, columns in pairs */
.xc .xc-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--xc-ink2); }
.xc-legend li { display: flex; align-items: center; gap: 7px; }
.xc-legend i { width: 11px; height: 11px; border-radius: 3px; background: var(--xc-bar); }
.xc-legend i.s1 { background: var(--xc-b2); }
.xc-legend i.is-dash { width: 18px; height: 0; border-radius: 0; background: none; border-top: 2px dashed var(--xc-ink2); }
.xc-v .xc-cols li { gap: 2px; }
.xc-v .xc-colbar { width: min(24px, 38%); }
.xc-v .xc-colbar.s1 { background: var(--xc-b2); }
.xc-v .xc-cols li:hover .xc-colbar.s1, .xc-v .xc-cols li:focus-visible .xc-colbar.s1 { background: var(--xc-b2-hi); }
.xc-v .xc-colbar em { font-size: 11.5px; font-weight: 600; }

/* Step line: stock level over time */
.xc-s .xc-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.xc-fill { fill: var(--xc-bar); opacity: .09; }
.xc-stroke { fill: none; stroke: var(--xc-bar); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.xc-mark { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--xc-ink2); opacity: .75; }
.xc .xc-hits { position: absolute; inset: 0; display: flex; }
.xc-hits li { position: relative; flex: 1; min-width: 0; outline: none; }
.xc-hits li:hover, .xc-hits li:focus-visible { background: rgba(32, 33, 36, .08); }
.xc-hits li > i { position: absolute; left: 50%; width: 10px; height: 10px; margin: 0 0 -5px -5px; border-radius: 99px; background: var(--xc-bar); box-shadow: 0 0 0 2px #fff; display: none; }
.xc-hits li:hover > i, .xc-hits li:focus-visible > i { display: block; }
.xc-hits .xc-tip { top: -14px; left: 50%; transform: translateX(-50%); }
.xc-hits li.is-left .xc-tip { left: 0; transform: none; }
.xc-hits li.is-right .xc-tip { left: auto; right: 0; transform: none; }
.xc-hits li:hover .xc-tip, .xc-hits li:focus-visible .xc-tip { display: block; }
.xc-xticks { grid-column: 2; position: relative; height: 26px; }
.xc-xticks b { position: absolute; top: 7px; transform: translateX(-50%); font-size: 12px; font-weight: 500; color: var(--xc-ink2); white-space: nowrap; }
.xc-xticks b:last-child { transform: translateX(-90%); }

@media (max-width: 639px) {
  .xc { --xc-label: 92px; --xc-value: 54px; }
  .xc-row, .xc-xaxis { column-gap: 8px; }
  .xc-label { font-size: 14px; }
  .xc-colbar em { font-size: 12px; }
  .xc-axisname { font-size: 13px; }
  .xc-xlabels span { width: min-content; justify-self: center; font-size: 13px; line-height: 1.25; }
  .xc-yaxis b { font-size: 12px; }
  .xc-frame { grid-template-columns: 38px minmax(0, 1fr); column-gap: 6px; }
  .xc-h .xc-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "area area"; row-gap: 6px; min-height: 0; padding-block: 8px; align-content: center; }
  .xc-h .xc-label { grid-area: label; }
  .xc-h .xc-val { grid-area: value; font-size: 14px; }
  .xc-h .xc-area { grid-area: area; height: 16px; border-radius: 0 4px 4px 0; }
  .xc-h .xc-xaxis { grid-template-columns: minmax(0, 1fr); }
  .xc-h .xc-xaxis > span:first-child { display: none; }
  .xc-h .xc-ticks { grid-column: 1; }
  .xc-ticks b { font-size: 12px; }
  .xc-ticks b:first-child { transform: none; }
  .xc-ticks b:last-child { transform: translateX(-100%); }
  .xc-cols .xc-tip { white-space: normal; width: max-content; max-width: 150px; }
  .xc-hits .xc-tip { white-space: normal; width: max-content; max-width: 190px; }
  .xc-v .xc-colbar em { display: none; }
  .xc-v.is-few .xc-colbar em { display: block; }
  .xc-cols li:nth-child(-n+3) .xc-tip { left: 0; right: auto; transform: none; }
  .xc-cols li:nth-last-child(-n+3) .xc-tip { left: auto; right: 0; transform: none; }
}
