/* -------------------------------- 

File#: _3_column-chart
Title: Column Chart
Descr: Data visualisation using SVG Column Chart
Usage: codyhouse.co/license

-------------------------------- */
/* reset 
*, *::after, *::before {
  box-sizing: border-box;
}

* {
  font: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  background-color: hsl(0, 0%, 100%);
  font-family: system-ui, sans-serif;
  color: hsl(230, 7%, 23%);
  font-size: 1rem;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  color: hsl(230, 13%, 9%);
  font-weight: 700;
}

h1 {
  font-size: 2.0736rem;
}

h2 {
  font-size: 1.728rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.2rem;
}

ol, ul, menu {
  list-style: none;
}

button, input, textarea, select {
  background-color: transparent;
  border-radius: 0;
  color: inherit;
  line-height: inherit;
  appearance: none;
}

textarea {
  resize: vertical;
  overflow: auto;
  vertical-align: top;
}

a {
  color: hsl(250, 84%, 54%);
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

@media (min-width: 64rem) {
  body {
    font-size: 1.25rem;
  }

  h1 {
    font-size: 3.051rem;
  }

    h2 {
    font-size: 2.44rem;
  }

    h3 {
    font-size: 1.75rem;
  }

    h4 {
    font-size: 1.5625rem;
  }
}

/* variables */
:root {
  /* colors */
  --sr5-color-primary-hsl: 250, 84%, 54%;
  --sr5-color-bg-hsl: 0, 0%, 100%;
  --sr5-color-contrast-high-hsl: 230, 7%, 23%;
  --sr5-color-contrast-higher-hsl: 230, 13%, 9%;
  --sr5-color-contrast-low-hsl: 240, 4%, 65%;
  --sr5-color-contrast-medium-hsl: 225, 4%, 47%;
}

/* component */
.swipe-content {
  height: 280px;
  width: 280px;
  background-color: hsl(var(--sr5-color-contrast-low-hsl));
  border-radius: 0.25em;
  cursor: default;
  transition: background 0.2s;
}
.swipe-content:active {
  background-color: hsl(var(--sr5-color-contrast-medium-hsl));
}

/* variables */
:root {
  /* colors */
  --cr9-color-primary-hsl: 250, 84%, 54%;
  --cr9-color-bg-hsl: 0, 0%, 100%;
  --cr9-color-contrast-high-hsl: 230, 7%, 23%;
  --cr9-color-contrast-higher-hsl: 230, 13%, 9%;
  --cr9-color-contrast-lower-hsl: 240, 4%, 85%;
  --cr9-color-contrast-low-hsl: 240, 4%, 65%;
  --cr9-color-contrast-medium-hsl: 225, 4%, 47%;
  --cr9-color-bg-light-hsl: 0, 0%, 100%;

  /* spacing */
  --cr9-space-2xs: 0.375rem;
  --cr9-space-xs: 0.5rem;
  --cr9-space-sm: 0.75rem;
  --cr9-space-md: 1.25rem;
  --cr9-space-lg: 2rem;

  /* typography */
  --cr9-text-sm: 0.7rem;
  --cr9-text-xs: 0.694rem;
}

@media(min-width: 64rem){
  :root {
    /* spacing */
    --cr9-space-2xs: 0.5625rem;
    --cr9-space-xs: 0.75rem;
    --cr9-space-sm: 1.125rem;
    --cr9-space-md: 2rem;
    --cr9-space-lg: 3.125rem;

    /* typography */
    --cr9-text-sm: 0.7rem;
    --cr9-text-xs: 0.8rem;
  }
}

/* component */
.chart--column {
  --chart-height: 360px;
  --chart-axis-stroke-width: 1px;
  --chart-guides-stroke-width: 1px;
}
.chart--column .chart__set--1 {
  --chart-data-color: hsl(var(--cr9-color-primary-hsl));
}
.chart--column .chart__set--2 {
  --chart-data-color: hsl(var(--cr9-color-contrast-higher-hsl));
}
.chart--column .chart__data-bar {
  transition: opacity 0.2s;
}
.chart--column .chart__data-bar--selected {
  opacity: 0.8;
}
.chart--column .chart__tooltip {
  font-size: var(--cr9-text-sm);
  box-shadow: inset 0 0 0.5px 1px hsla(0, 0%, 100%, 0.075), 0 0.9px 1.5px rgba(0, 0, 0, 0.03),0 3.1px 5.5px rgba(0, 0, 0, 0.08),0 14px 25px rgba(0, 0, 0, 0.12);
  background-color: hsl(var(--cr9-color-bg-light-hsl));
  border-radius: 0.25em;
  padding: var(--cr9-space-xs);
}
.chart--column .chart__axis-legend {
  font-size: 0.6em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: hsl(var(--cr9-color-contrast-low-hsl));
}
.chart--column .chart__axis-label {
  font-size: var(--cr9-text-xs);
}
.chart--column .chart__axis {
  stroke: hsl(var(--cr9-color-contrast-lower-hsl));
}
.chart--column .chart__tick {
  stroke: hsl(var(--cr9-color-contrast-lower-hsl));
}
.chart--column .chart__guides {
  stroke: hsl(var(--cr9-color-contrast-lower-hsl));
}

/* utility classes */
.cr9-color-contrast-medium {
  --cr9-color-o: 1;
  color: hsla(var(--cr9-color-contrast-medium-hsl), var(--cr9-color-o, 1));
}

.cr9-margin-right-2xs {
  margin-right: var(--cr9-space-2xs);
}

.cr9-bg-contrast-higher {
  --cr9-bg-o: 1;
  background-color: hsla(var(--cr9-color-contrast-higher-hsl), var(--cr9-bg-o, 1));
}

.cr9-radius-50\% {
  border-radius: 50%;
}

.cr9-width-3xs {
  width: 0.5rem;
}

.cr9-height-3xs {
  height: 0.5rem;
}

.cr9-items-center {
  align-items: center;
}

.cr9-flex {
  display: flex;
}

.cr9-bg-primary {
  --cr9-bg-o: 1;
  background-color: hsla(var(--cr9-color-primary-hsl), var(--cr9-bg-o, 1));
}

.cr9-margin-bottom-2xs {
  margin-bottom: var(--cr9-space-2xs);
}

.cr9-margin-bottom-sm {
  margin-bottom: var(--cr9-space-sm);
}

.cr9-text-sm {
  font-size: var(--cr9-text-sm);
}

.cr9-bg-contrast-high {
  --cr9-bg-o: 1;
  background-color: hsla(var(--cr9-color-contrast-high-hsl), var(--cr9-bg-o, 1));
}

.cr9-gap-md {
  gap: var(--cr9-space-md);
}

.cr9-flex-center {
  justify-content: center;
  align-items: center;
}

.cr9-flex-wrap {
  flex-wrap: wrap;
}

.cr9-margin-top-lg {
  margin-top: var(--cr9-space-lg);
}

/* variables */
:root {
  /* colors */
  --cl8-color-primary-hsl: 250, 84%, 54%;
  --cl8-color-bg-hsl: 0, 0%, 100%;
  --cl8-color-contrast-high-hsl: 230, 7%, 23%;
  --cl8-color-contrast-higher-hsl: 230, 13%, 9%;
  --cl8-color-contrast-lower-hsl: 240, 4%, 85%;
  --cl8-color-contrast-low-hsl: 240, 4%, 65%;
  --cl8-color-contrast-medium-hsl: 225, 4%, 47%;
  --cl8-color-accent-hsl: 342, 89%, 48%;

  /* spacing */
  --cl8-space-sm: 0.75rem;
  --cl8-space-md: 1.25rem;
  --cl8-space-xs: 0.5rem;

  /* typography */
  --cl8-text-3xl: 2.488rem;
  --cl8-text-xs: 0.694rem;
  --cl8-text-sm: 0.833rem;
}

@media(min-width: 64rem){
  :root {
    /* spacing */
    --cl8-space-sm: 1.125rem;
    --cl8-space-md: 2rem;
    --cl8-space-xs: 0.75rem;

    /* typography */
    --cl8-text-3xl: 3.815rem;
    --cl8-text-xs: 0.8rem;
    --cl8-text-sm: 1rem;
  }
}

/* component */
:root {
  --chart-height: 360px;
  --chart-data-line-stroke-width: 2px;
  --chart-marker-size: 4px;
  --chart-axis-stroke-width: 1px;
  --chart-guides-stroke-width: 1px;
  --chart-y-indicator-dash: 3px;
  --chart-y-indicator-stroke-width: 1px;
  --chart-data-color: hsl(var(--cl8-color-primary-hsl));
  --chart-data-fill-opacity: 0.2;
  --chart-legend-bullet-size: 10px;
}

.chart__area {
  position: relative;
  height: var(--chart-height);
}

.chart__svg {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}
.chart__svg text {
  fill: hsl(var(--cl8-color-contrast-high-hsl));
}

.chart__tooltip {
  position: absolute;
  font-size: var(--cl8-text-xs);
  background-color: hsl(var(--cl8-color-contrast-lower-hsl));
  padding: var(--cl8-space-sm);
  pointer-events: none;
  white-space: nowrap;
}

.chart__bullet {
  display: block;
  width: var(--chart-legend-bullet-size);
  height: var(--chart-legend-bullet-size);
  border-radius: 50%;
  flex-shrink: 0;
}

.chart__axis-legend {
  font-size: var(--cl8-text-xs);
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.chart__axis-label {
  font-size: var(--cl8-text-xs);
  pointer-events: none;
}

.chart__axis {
  pointer-events: none;
  stroke: hsl(var(--cl8-color-contrast-low-hsl));
  stroke-width: var(--chart-axis-stroke-width);
}

.chart__tick {
  stroke-width: var(--chart-axis-stroke-width);
  stroke: hsl(var(--cl8-color-contrast-low-hsl));
}

.chart__guides {
  fill: transparent;
  stroke-width: var(--chart-guides-stroke-width);
  stroke: hsl(var(--cl8-color-contrast-lower-hsl));
}

.chart__dataset {
  pointer-events: none;
}

.chart__data-line {
  fill: none;
  stroke-width: var(--chart-data-line-stroke-width);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: var(--chart-data-color);
}

.chart__data-fill {
  pointer-events: none;
  fill: none;
}

.chart--area .chart__data-fill {
  fill: var(--chart-data-color);
  opacity: var(--chart-data-fill-opacity);
}

.chart__marker {
  r: var(--chart-marker-size);
  opacity: 0;
  fill: var(--chart-data-color);
}

.chart__marker--selected {
  opacity: 1;
}

.chart__y-indicator {
  stroke-width: var(--chart-y-indicator-stroke-width);
  stroke: hsl(var(--cl8-color-contrast-low-hsl));
  stroke-dasharray: var(--chart-y-indicator-dash);
  pointer-events: none;
}

.chart__data-bar {
  pointer-events: none;
  fill: var(--chart-data-color);
}

.chart--column .chart__marker {
  visibility: hidden;
}
.chart--column .chart__y-indicator {
  display: none;
}

/* utility classes */
.cl8-sr-only {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.cl8-color-contrast-medium {
  --cl8-color-o: 1;
  color: hsla(var(--cl8-color-contrast-medium-hsl), var(--cl8-color-o, 1));
}

.cl8-text-3xl {
  font-size: var(--cl8-text-3xl);
}

.cl8-text-center {
  text-align: center;
}

.cl8-text-component :where(h1, h2, h3, h4) {
  line-height: var(--cl8-heading-line-height, 1.2);
  margin-top: calc(var(--cl8-space-md) * var(--cl8-space-multiplier, 1));
  margin-bottom: calc(var(--cl8-space-sm) * var(--cl8-space-multiplier, 1));
}

.cl8-text-component :where(p, blockquote, ul li, ol li) {
  line-height: var(--cl8-body-line-height, 1.4);
}

.cl8-text-component :where(ul, ol, p, blockquote, .cl8-text-component__block) {
  margin-bottom: calc(var(--cl8-space-sm) * var(--cl8-space-multiplier, 1));
}

.cl8-text-component :where(ul, ol) {
  padding-left: 1.25em;
}

.cl8-text-component ul :where(ul, ol), .cl8-text-component ol :where(ul, ol) {
  padding-left: 1em;
  margin-bottom: 0;
}

.cl8-text-component ul {
  list-style-type: disc;
}

.cl8-text-component ol {
  list-style-type: decimal;
}

.cl8-text-component img {
  display: block;
  margin: 0 auto;
}

.cl8-text-component figcaption {
  margin-top: calc(var(--cl8-space-xs) * var(--cl8-space-multiplier, 1));
  font-size: var(--cl8-text-sm);
  text-align: center;}

.cl8-text-component em {
  font-style: italic;
}

.cl8-text-component strong {
  font-weight: bold;
}

.cl8-text-component s {
  text-decoration: line-through;
}

.cl8-text-component u {
  text-decoration: underline;
}

.cl8-text-component mark {
  background-color: hsla(var(--cl8-color-accent-hsl), 0.2);
  color: inherit;
}

.cl8-text-component blockquote {
  padding-left: 1em;
  border-left: 4px solid hsl(var(--cl8-color-contrast-lower-hsl));
  font-style: italic;
}

.cl8-text-component hr {
  margin: calc(var(--cl8-space-md) * var(--cl8-space-multiplier, 1)) auto;
  background: hsl(var(--cl8-color-contrast-lower-hsl));
  height: 1px;
}

.cl8-text-component > *:first-child {
  margin-top: 0;
}

.cl8-text-component > *:last-child {
  margin-bottom: 0;
}

.cl8-text-component.cl8-line-height-xs {
  --cl8-heading-line-height: 1;
  --cl8-body-line-height: 1.1;
}

.cl8-text-component.cl8-line-height-sm {
  --cl8-heading-line-height: 1.1;
  --cl8-body-line-height: 1.2;
}

.cl8-text-component.cl8-line-height-md {
  --cl8-heading-line-height: 1.15;
  --cl8-body-line-height: 1.4;
}

.cl8-text-component.cl8-line-height-lg {
  --cl8-heading-line-height: 1.22;
  --cl8-body-line-height: 1.58;
}

.cl8-text-component.cl8-line-height-xl {
  --cl8-heading-line-height: 1.3;
  --cl8-body-line-height: 1.72;
}

.cl8-hide {
  display: none !important;
}

.cl8-opacity-0 {
  opacity: 0;
}

/* Armin */

.chart__tooltip {
	font-size: 80%;
}

.color-contrast-medium {
	color: #999;
}