.evolution-map {
    height: 56vh;
    width: 100%;
    margin: 0;
    padding: 5vmax;
    background: #125;
    background-position: 50% 50%;
    position: relative;
}
/* TOPIC PICKER */
.topic-picker {
    color: white;
    display: flex;
    flex-direction: row;
    position: absolute;
    top: 0em;
    left: 0em;
    z-index: 99;
    border: 0;
    width: 100%;
    padding-left: 8px;
}
.topic-picker > label {
    width: 50%;
    font-size: calc(.6em + .8vh);
    margin: 0 .5em;
    user-select: none;
    position: relative;
}

.top-all { --top-color: 358, 80%, 50%; }
.top-topic1 { --top-color: 45, 100%, 55%; }
.top-topic2 { --top-color: 80, 100%, 40%; }
.top-topic3 { --top-color: 160, 90%, 45%; }
.top-topic4 { --top-color: 210, 100%, 64%; }


  /* input sucks to style, so just get that hidden, but keep it in dom so you can accept change and input events from the label parent */
.topic-picker input {
    position: absolute;
    width: 0;
    height: 0;
    left: -1000px;
}
.topic-picker > label {
    text-align: center;
}
.topic-picker > label span::before {
    content: '';
}
.topic-picker > label span::after {
    content: '';
    opacity: 0.6;
    width: .8em;
    height: 1.5em;
    position: absolute;
    right: calc(100% + 8px + 3px);
    top: 50%;
    transform: translateY(-50%);
    background: hsla(var(--top-color), 1);
    transition: width .13s ease-in-out;
}

.topic-picker > label span::after {
    --after-opac: .9;
    z-index: -1;
    right: initial;
    left: -8px;
    width: 0;
}

label.top span::after {
    background: hsla(var(--top-color), var(--after-opac));
}

.topic-picker > label:hover span::before {
    width: 1.5em;
}

.topic-picker input:checked ~ span::before {
    width: 1.5em;
}

.topic-picker > label:hover input:checked ~ span::before {
    width: calc(1.5em - .4em);
}

.topic-picker input:checked ~ span::after {
    width: calc(100% + 16px);
}

  /* CATEGORY PICKER */
.category-picker {
    color: white;
    display: flex;
    flex-direction: row;
    position: absolute;
    top: 3em;
    left: 3em;
    z-index: 99;
    border: 0;
    width: 90%;
    padding: 0;
    border-left: solid;
    padding-left: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.category-picker > label {
    font-size: calc(.6em + .5vh);
    margin: .5em 0;
    user-select: none;
    position: relative;
    width: 15%;
}

.cat { --cat-color: 358, 80%, 70%; }
  /*
.cat-products { --cat-color: 260, 90%, 60%; }
.cat-satellites { --cat-color: 305, 85%, 50%;}
  */


  /* input sucks to style, so just get that hidden, but keep it in dom so you can accept change and input events from the label parent */
.category-picker input {
    position: absolute;
    width: 0;
    height: 0;
    left: -1000px;
}

.category-picker > label span::before,
.category-picker > label span::after {
    content: '';
    opacity: 0.78;
    width: .8em;
    height: 1.5em;
    position: absolute;
    right: calc(100% + 8px + 3px);
    top: 50%;
    transform: translateY(-50%);
    background: hsla(var(--cat-color), 1);
    transition: width .13s ease-in-out;
}

.category-picker > label:focus-within span::before {
    border-left: solid white 3px;
}

.category-picker > label span::after {
    --after-opac: .5;
    z-index: -1;
    right: initial;
    left: -8px;
    width: 0;
}
label.cat span::after {
    background: hsla(var(--cat-color), var(--after-opac));
}

.category-picker > label:hover span::before {
    width: 1.5em;
}

.category-picker input:checked ~ span::before {
    width: 1.5em;
}

.category-picker > label:hover input:checked ~ span::before {
    width: calc(1.5em - .4em);
}

.category-picker input:checked ~ span::after {
    width: calc(100% + 16px);
}


/* TIMELINE */
.timeline {
    --top-opac: 1;
    --stem-height: 100px;
    color: white;
    border: 0;
    bottom: 1.3em;
    left: 0;
    width: 100%;
    height: 1px;
    padding: 0;
    border-bottom: solid;
    position: absolute;
}

/* Event Categories */
.topic1 { --top-color: hsla(45, 100%, 55%, var(--top-opac)); }
.topic2 { --top-color: hsla(80, 100%, 40%, var(--top-opac)); }
.topic3 { --top-color: hsla(160, 90%, 45%, var(--top-opac)); }
.topic4 { --top-color: hsla(210, 100%, 64%, var(--top-opac)); }


  /* BOX, LINE, and DOT */
.vis-item, .time-dot {
    --active-trans: 4px;
    position: absolute;
}

  /* EVENT BOX */
.vis-box {
    bottom: calc(var(--stem-height) * .6);
    font-size: 13px;
    border-radius: 5px;
    border-left: solid 5px;
    overflow: hidden;
    border-color: transparent;
    transform: translate(-9px, -50px) scaleY(0) scaleX(0);
    transform-origin: 0 100%;
    opacity: 0;
    transition: all .15s .2s ease-in-out;
    overflow:visible;
}
.vis-box.box-left {
    border-left: none;
    border-right: solid var(--top-color) 5px;
    transform: translate(calc(11px - 100%), -50px) scaleY(0) scaleX(0);
    transform-origin: 100% 100%;
}
.vis-box.active {
    transform: translate(-9px, -50px) scaleY(1) scaleX(1);
    border-color: var(--top-color);
    opacity: 1;
    z-index: 1001;
}
.vis-box.active.box-left {
    transform: translate(calc(11px - 100%), -50px) scaleY(1) scaleX(1);
}
.vis-box.closed {
    transform: translate(-9px, -50px) scaleY(0) scaleX(0);
}
.vis-box.box-left.closed {
    transform: translate(calc(11px - 100%), -50px) scaleY(0) scaleX(0);
}

.event-box {
    width: 400px;
    height: 120px;
    transition: all .15s .13s ease-in-out;
    background: var(--top-color);
}

.event-image, .event-info {
    position: absolute;
    display: inline-block;
}

.event-image img {
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 13% 100%, 0 95%);
}
.event-box.box-left .event-image img {
    clip-path: unset;
}

.event-info {
    top: 0;
    right: 0;
    width: 100%;
    padding: 5px 10px;
    background: #fafafa;
    color: #333;
}
.event-box.box-left .event-info {
    clip-path: polygon(0 0, 100% 0, 100% 95%, 95% 100%, 0 100%)
}

.event-info * {
    margin: 0;
}
.event-info .event-title {
    text-overflow:ellipsis;
    overflow:hidden;
    /* height: 26px; */
    white-space:overflow;
    display:-webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient:vertical;
}
.event-info .event-title a {
    text-decoration: none;
    color: inherit;
    font-size: 120%;
}
.event-info .event-date {
    color: gray;
    margin: 5px 0;
}
.event-info .event-content {
    text-overflow:ellipsis;
    overflow:hidden;
    /* height: 60px; */
    white-space:overflow;
    display:-webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient:vertical;
}

  /* LINE */
.vis-line {
    background: var(--top-color);
    width: 2px;
    height: 70px;
    transition: height .12s ease-in-out;
}
.vis-line.active {
    height: 120px;
}
.vis-line.active-1 {
    height: 80px;
}
.vis-line.active-2 {
    height: 75px;
}
.vis-line.closed {
    height: 0px;
}

  /* BADGE / FLAG */
.vis-line::after {
    --h: 30px;
    content: '';
    position: absolute;
    width: 20px;
    height: var(--h);
    bottom: calc(100% - var(--h) / 6);
    left: 50%;
    clip-path: polygon(0 0, 100% 0, 100% 25px, 50% 100%, 0 25px);
    z-index: 1;
    background: var(--top-color);
    transform: translate(-50%, -4px) scale(1, 1);
    transform-origin: 50% 100%;
    transition: transform .12s ease-in-out, opacity .12s ease-in-out;
}
.vis-line.active::after {
    transform: translate(-50%, -4px);
    z-index: -1;
}
.vis-line.closed::after {
    transform: translate(-50%, -4px) scale(0, 0);
}

  /* DOT */
.vis-dot, .time-dot {
    background: var(--top-color);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(1,1);
    transform-origin: 50% 50%;
    transition: transform .12s ease-in-out;
}
.vis-dot.closed {
    transform: scale(0,0);
}
.time-dot{--top-color:hsla(358, 80%, 50%, var(--top-opac))}
.time-text{position:absolute;bottom:-1.9em;font-size:.8em;visibility:hidden}
.time-text:last-of-type{visibility:visible}
@media(max-width:768px) {
    .time-text:nth-of-type(8n+1){visibility:visible}
}
@media(min-width:769px) and (max-width:992px) {
    .time-text:nth-of-type(6n+1){visibility:visible}
}
@media(min-width:993px) and (max-width:1200px) {
    .time-text:nth-of-type(4n+1){visibility:visible}
}
@media(min-width:1201px) {
    .time-text:nth-of-type(2n+1){visibility:visible}
}