@keyframes pulse {
  0% {
    scale: 0.8;
  }
  20% {
    scale: 1;
  }
  100% {
    scale: 0.8;
  }
}

/* Reset */
button {
  background-color: transparent;
  border: none;
  cursor: pointer;
}
/* End reset */

:root {
  --tree-color: black;
  --sans: 'AalterGrotesque', serif;
  --serif-italic: 'ExecutifItalic', sans-serif;
  --serif: 'ExecutifRegular', sans-serif;
  --font-size-base: 1rem;
  --color-red: #f85059;
  --padding-body: 2vw;
  --underline: underline 1px;
  --underline-offset: 0.25rem;
}

.hidden {
  display: none;
}

body {
  font-size: 1rem;
  margin: 0;
  padding: var(--padding-body);
  padding-bottom: 10rem;
  width: 5000px;
  cursor: grab;
}

h1,
h2,
h3 {
  margin: 0;
}

a {
  color: black;
  word-break: keep-all;
  text-decoration: var(--underline);
  text-underline-offset: var(--underline-offset);
}

.intro {
  width: min(calc(100vw - 2 * var(--padding-body)), 40rem);
}
.intro h1 {
  font-family: var(--sans);
}
.intro p {
  font-family: var(--serif);
}

#tidy-tree {
  margin-top: 15vh;
  margin-left: calc(60vw - (928px / 2));
  margin-bottom: 6rem;
}

#caption {
  position: fixed;
  bottom: 0;
  left: 0;

  font-family: var(--serif);
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff,
    1px 1px 0 #fff;
  line-height: 2rem;

  box-sizing: border-box;
  padding: 0 2rem;
  padding-bottom: 2rem;
}

#caption label::after {
  content: '';
  display: inline-block;
  height: 2px;
  width: 2rem;
  margin-left: 0.5rem;
  margin-bottom: 0.2rem;
}

#caption .acquisition label::after {
  background-color: var(--color-red);
}
#caption .creation label::after {
  background-color: #000;
}
#caption .attempt label::after {
  background: repeating-linear-gradient(90deg, red 0 3px, #0000 0 7px);
}
#caption .resell label::after {
  background: repeating-linear-gradient(90deg, #000 0 3px, #0000 0 7px);
}

#caption label {
  cursor: pointer;
}

#caption input {
  margin-right: 0.5rem;
}

.zoom-buttons {
  position: fixed;
  top: 2rem;
  right: 1rem;
  z-index: 1;
}

.zoom-buttons button {
  width: 2rem;
}

.zoom-buttons button:hover svg {
  fill: var(--color-red);
}

#tidy-tree svg {
  overflow: visible;
  max-width: 100%;
  height: auto;

  user-select: none;

  font-family: var(--sans);
  font-size: calc(var(--font-size-base) * 1);
}

path.acquisition {
  stroke: var(--color-red);
}
path.attempt {
  stroke-dasharray: 3px, 5px;
}
path.resell {
  stroke: var(--color-red);
  stroke-dasharray: 3px, 5px;
}

circle {
  transition: transform 0.15s ease-in-out;
}

.node line {
  transition: all 0.3s ease-in-out;
}
.node line.plain {
  transform: scaleX(0);
}

.node.open line.dashed {
  transform: scaleX(0);
}

.node .children-count {
  font-size: var(--font-size-base);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.node.leaf:hover {
  cursor: auto;
}

.node.closed:hover circle {
  transform: scale(3);
}
.node.closed:hover .children-count {
  opacity: 1;
}

.node.closed:hover line.plain {
  transform: scaleX(1);
}

.node.closed .entry {
  text-align: right;
}

.entry h3 {
  font-size: 1rem;
}

.entry .date {
  margin-right: 0.5rem;
}

.node .date,
.node .name {
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff,
    1px 1px 0 #fff;
}

.node.with-description .name {
  cursor: help;
}

.node.with-description .name::after {
  content: 'ⓘ';
  margin-left: 0.5rem;
}

[data-type='title'] {
  font-family: var(--serif);
  font-size: calc(var(--font-size-base) * 2.5);
  background-color: white;
  text-align: center;
  border-radius: 1rem;
}

.description {
  display: none;
}

.description p {
  font-family: var(--serif);
  margin: 0;
  background-color: #fff;
  border: 2px solid #000;
  padding: 0.5rem;
  text-decoration: none !important;
}

.node:hover .description {
  display: block;
}
