:root {
  --bg: #fffdf6;
  --muted: #87867f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  background: var(--bg);
  font-family:
    "SF Pro",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    sans-serif;
}

.page {
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.column {
  width: 100%;
  max-width: 850px;
  display: flex;
  flex-direction: column;
  gap: 70px;
}

.hero {
  align-self: stretch;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 0;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* Leave duration must match LEAVE_MS in hero.rs. */
:root {
  --leave-ms: 240ms;
  --enter-ms: 520ms;
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-soft: cubic-bezier(0.55, 0, 0.85, 0.6);
}

.name {
  color: var(--muted);
  font-size: 13.9px;
  font-weight: 400;
  line-height: 21.35px;
  text-align: center;
  /* entrance: rise in and settle gently (ease-out) */
  animation: name-in var(--enter-ms) var(--ease-out-soft) both;
}

.name-leave {
  /* exit: build momentum on the way out (ease-in) */
  animation: name-out var(--leave-ms) var(--ease-in-soft) both;
}

@keyframes name-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.985);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes name-out {
  from {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-9px);
    filter: blur(3px);
  }
}

.glyph-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px;
  border-radius: 10px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition:
    background-color 200ms ease-out,
    transform 200ms ease-out;
}

.glyph-button:hover {
  background: rgba(135, 134, 127, 0.09);
}

/* anticipation: wind up on press, subtle deformation only */
.glyph-button:active {
  transform: scale(0.95);
}

.glyph-button:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 2px;
}

.glyph {
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
}

.glyph svg {
  display: block;
}

/* whole-view swaps (cycling <-> timeline) */
.view-in {
  animation: view-in var(--enter-ms) var(--ease-out-soft) both;
}

.view-leave {
  animation: view-out var(--leave-ms) var(--ease-in-soft) both;
}

@keyframes view-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes view-out {
  from {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-9px);
    filter: blur(3px);
  }
}

/* timeline recap */
.timeline {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}

.t-row {
  display: grid;
  grid-template-columns: 44px 12px 1fr;
  gap: 12px;
  align-items: center;
  animation: row-in 420ms var(--ease-out-soft) both;
  animation-delay: calc(var(--i) * 18ms);
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.t-date {
  color: var(--muted);
  opacity: 0.55;
  font-size: 12px;
  line-height: 21.35px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.t-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  justify-self: center;
}

.t-name {
  color: var(--muted);
  font-size: 13.9px;
  line-height: 21.35px;
}

.t-undated .t-dot {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--muted);
  opacity: 0.6;
}

.t-undated .t-name {
  opacity: 0.6;
}

.t-restart {
  align-self: center;
  margin-top: 22px;
  animation: row-in 420ms var(--ease-out-soft) both;
  animation-delay: calc(var(--i) * 18ms + 60ms);
}

@media (prefers-reduced-motion: reduce) {
  .name,
  .name-leave,
  .view-in,
  .view-leave,
  .t-row,
  .t-restart {
    animation: none;
  }
  .glyph-button {
    transition: none;
  }
}
