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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

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

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

body {
  font-family: Arial, sans-serif;
  color: #262626;
  font-size: 16px;
  line-height: 1.5;
}

p {
  font-family: Georgia, serif;
  color: #767676;
}

h1 {
  font-size: 50px;
  text-align: center;
  margin: 0 auto;
  line-height: 1.1;
  margin-bottom: 1em;
}

main {
  width: 1280px;
  margin: 60px auto;
}

.intro {
  background-image: url(/cover.jpg);
  background-size: cover;
  aspect-ratio: 2 / 1;
  display: flex;
  justify-content: flex-end;
}

.intro > div {
  width: 600px;
  padding: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.intro p {
  font-size: 20px;
  color: #262626;
}

.intro p + p {
  margin-top: 1em;
}

.intro p.author {
  text-align: right;
}

.intro .scroll-button-container {
  position: absolute;
  bottom: 40px;
  display: flex;
  justify-content: center;
}

.scrolly {
  padding: 0 10px 0 10px;
  position: relative;
  display: flex;
  gap: 10px;
}

.scrolly > article {
  flex: 0 0 250px;
}

.scrolly > figure {
  flex: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
}

.scrolly > figure > * {
  grid-area: 1 / -1;
}

.scrolly > figure > .chart-container {
  height: 640px;
  align-self: center;
}

.scrolly .step {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.scrolly .step > * + * {
  margin-top: 1em;
}

.scroll-button {
  color: #767676;
  font-size: 18px;
  line-height: 40px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  user-select: none;
  align-items: center;
  border: none;
  background: none;
  transition: color 0.15s ease-in-out;
  margin-top: 300px;
}

.scroll-button > svg {
  margin-right: 0.5em;
}

.scroll-button:hover {
  color: #262626;
}

[data-highlight] {
  color: var(--color);
}

[data-highlight]:hover {
  text-decoration: dotted underline var(--color) 4px;
  text-underline-offset: 4px;
  cursor: default;
}

.chart text {
  color: #767676;
  font-family: inherit;
  font-size: 14px;
}

.chart .bubble {
  transition: stroke 0.15s ease-in-out;
}

.chart .bubble.is-highlighted,
.chart .bubble:hover {
  stroke: currentColor;
  stroke-width: 2px;
}

.chart .annotations {
  pointer-events: none;
}

.chart .annotation path {
  stroke: #767676;
}

.chart .annotation-note-label {
  fill: #767676;
}

.vis-tooltip {
  position: fixed;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #ddd;
  box-shadow: 1px 1px 10px #ddd;
  color: currentColor;
  pointer-events: none;
  max-width: 400px;
  z-index: 1;
}

.vis-tooltip[data-position="top"] {
  transform: translate(-50%, calc(-100% - 10px));
}

.vis-tooltip[data-position="bottom"] {
  transform: translate(-50%, 10px);
}

.vis-tooltip > * + * {
  margin-top: 0.25rem;
}

.vis-tooltip::before,
.vis-tooltip::after {
  left: 50%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

.vis-tooltip::before {
  border-color: rgba(102, 102, 102, 0);
  border-width: 8px;
  margin-left: -8px;
}

.vis-tooltip::after {
  border-color: rgba(255, 255, 255, 0);
  border-width: 7px;
  margin-left: -7px;
}

.vis-tooltip[data-position="top"]::before,
.vis-tooltip[data-position="top"]::after {
  top: 100%;
}

.vis-tooltip[data-position="top"]::before {
  border-top-color: #ddd;
}

.vis-tooltip[data-position="top"]::after {
  border-top-color: #fff;
}

.vis-tooltip[data-position="bottom"]::before,
.vis-tooltip[data-position="bottom"]::after {
  bottom: 100%;
}

.vis-tooltip[data-position="bottom"]::before {
  border-bottom-color: #ddd;
}

.vis-tooltip[data-position="bottom"]::after {
  border-bottom-color: #fff;
}

.book-tip {
  display: flex;
  align-items: flex-start;
}

.book-tip .book-cover {
  width: 120px;
  object-fit: contain;
  margin-right: 24px;
}

.book-tip .book-detail > * + * {
  margin-top: 4px;
}

.book-tip .book-title {
  font-size: 16px;
  font-weight: bold;
  color: #212121;
}

.book-tip .book-author {
  color: #212121;
  cursor: pointer;
  font-size: 14px;
}

.book-tip .book-summary {
  color: #212121;
}

.fade {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
}

.fade.is-visible {
  opacity: 1;
  visibility: visible;
}
