:root {
  color-scheme: dark;
  --tsd-bg: #0d0b14;
  --tsd-panel: #1a1525;
  --tsd-panel-soft: rgba(26, 21, 37, 0.78);
  --tsd-ink: #f0eeff;
  --tsd-muted: rgba(240, 238, 255, 0.68);
  --tsd-faint: rgba(240, 238, 255, 0.12);
  --tsd-primary: #a78bfa;
  --tsd-primary-strong: #c4b5fd;
  --tsd-secondary: #8a3ffc;
  --tsd-accent: #f3e4c8;
  --tsd-rule: rgba(245, 234, 215, 0.72);
  --tsd-paper: rgba(247, 241, 229, 0.93);
  --tsd-paper-ink: #17131f;
  --tsd-max: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: var(--tsd-bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--tsd-ink);
  font-family: Literata, Georgia, serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.tsd-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
  width: 100%;
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 2.25rem);
  background:
    linear-gradient(rgba(167, 139, 250, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 24% 16%, rgba(138, 63, 252, 0.18), transparent 24rem),
    radial-gradient(circle at 82% 78%, rgba(243, 228, 200, 0.08), transparent 22rem),
    var(--tsd-bg);
  background-size: 2rem 2rem, 2rem 2rem, auto, auto, auto;
}

.tsd-scene {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
}

.tsd-hyperspace {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.72;
  pointer-events: none;
}

.tsd-nav {
  position: relative;
  z-index: 4;
  width: min(100% - 2rem, var(--tsd-max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-family: "Red Hat Mono", Consolas, monospace;
}

.tsd-nav a {
  border: 1px solid var(--tsd-faint);
  background: rgba(13, 11, 20, 0.6);
  padding: 0.48rem 0.68rem;
  color: var(--tsd-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.tsd-nav a:hover,
.tsd-nav a:focus-visible {
  border-color: var(--tsd-primary);
  color: var(--tsd-ink);
  outline: 0;
}

.tsd-title {
  position: relative;
  z-index: 3;
  width: min(100% - 2rem, var(--tsd-max));
  margin: 0 auto;
}

.tsd-title p {
  margin: 0 0 0.45rem;
  color: var(--tsd-primary);
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.tsd-title h1 {
  margin: 0;
  font-family: "Literata", Georgia, serif;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 0.94;
  text-transform: uppercase;
}

.tsd-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.42fr);
  gap: clamp(0.85rem, 2vw, 1.25rem);
  width: min(100% - 2rem, var(--tsd-max));
  min-height: 0;
  margin: 0 auto;
}

.tsd-stage {
  position: relative;
  min-height: clamp(28rem, 62vh, 42rem);
  overflow: hidden;
  border: 2px solid rgba(138, 63, 252, 0.36);
  background:
    linear-gradient(90deg, rgba(240, 238, 255, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(240, 238, 255, 0.028) 1px, transparent 1px),
    rgba(13, 11, 20, 0.68);
  background-size: 1.25rem 1.25rem;
  box-shadow: inset 0 0 0 1px rgba(240, 238, 255, 0.04);
  touch-action: none;
}

.tsd-stage:focus-visible {
  outline: 2px solid var(--tsd-primary);
  outline-offset: 0.25rem;
}

.tsd-labels {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.tsd-label {
  position: absolute;
  left: 0;
  top: 0;
  max-width: min(12rem, 34vw);
  color: var(--tsd-muted);
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.35;
  opacity: 0;
  text-transform: uppercase;
  text-shadow: 0 0 1.2rem var(--tsd-bg);
}

.tsd-label span {
  display: block;
  color: var(--tsd-primary);
}

.tsd-label strong {
  display: block;
  color: var(--tsd-ink);
  font-family: "Literata", Georgia, serif;
  font-size: 0.98rem;
  line-height: 1.02;
  text-transform: none;
}

.tsd-label[data-active="true"] {
  color: var(--tsd-ink);
}

.tsd-label[data-active="true"] strong {
  color: var(--tsd-accent);
}

.tsd-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 1rem;
}

.tsd-controls button {
  width: 2.35rem;
  aspect-ratio: 1;
  border: 1px solid rgba(138, 63, 252, 0.45);
  background: rgba(13, 11, 20, 0.72);
  color: var(--tsd-ink);
  cursor: pointer;
  font: 700 1rem/1 "Red Hat Mono", Consolas, monospace;
}

.tsd-controls button:hover,
.tsd-controls button:focus-visible {
  background: var(--tsd-secondary);
  border-color: var(--tsd-secondary);
  color: #ddd6fe;
  outline: 0;
}

.tsd-panel {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  min-height: clamp(28rem, 62vh, 42rem);
  border: 2px solid rgba(138, 63, 252, 0.36);
  background:
    linear-gradient(135deg, rgba(167, 139, 250, 0.08), transparent 42%),
    var(--tsd-panel-soft);
  padding: clamp(1rem, 2vw, 1.25rem);
  overflow: hidden;
}

.tsd-panel::before {
  content: "";
  position: absolute;
  inset: 0.65rem;
  border: 1px solid rgba(240, 238, 255, 0.06);
  pointer-events: none;
}

.tsd-panel-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tsd-panel span {
  display: block;
  margin: 0;
  color: var(--tsd-primary);
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
}

#tsd-index {
  color: var(--tsd-muted);
  white-space: nowrap;
}

.tsd-panel h2 {
  margin: 0;
  font-family: "Literata", Georgia, serif;
  font-size: clamp(1.55rem, 2.3vw, 2.35rem);
  line-height: 1;
}

.tsd-panel p {
  max-width: 38rem;
  margin: 0.65rem 0 0;
  color: var(--tsd-muted);
  font-size: clamp(0.9rem, 1.15vw, 1rem);
  line-height: 1.7;
}

.tsd-panel a {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--tsd-primary-strong);
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.tsd-panel a[hidden] {
  display: none;
}

.tsd-meter {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 4;
  display: grid;
  gap: 0.6rem;
  justify-items: end;
  color: var(--tsd-muted);
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.tsd-meter div {
  position: relative;
  width: 0.45rem;
  height: min(42vh, 20rem);
  border: 1px solid var(--tsd-faint);
  background: rgba(240, 238, 255, 0.08);
  overflow: hidden;
}

.tsd-meter div span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: linear-gradient(var(--tsd-accent), var(--tsd-secondary), var(--tsd-primary));
}

@media (max-width: 880px) {
  html,
  body {
    overflow: auto;
  }

  .tsd-shell {
    min-height: 100vh;
    padding: 1rem;
  }

  .tsd-nav,
  .tsd-title,
  .tsd-workspace {
    width: 100%;
  }

  .tsd-workspace {
    grid-template-columns: 1fr;
  }

  .tsd-stage {
    min-height: clamp(24rem, 58vh, 32rem);
  }

  .tsd-panel {
    min-height: 0;
  }

  .tsd-label {
    max-width: 10rem;
  }
}

@media (max-width: 540px) {
  .tsd-nav a {
    padding: 0.42rem 0.52rem;
    font-size: 0.64rem;
  }

  .tsd-label {
    display: none;
  }

  .tsd-panel-top {
    flex-direction: column;
    gap: 0.2rem;
  }

  .tsd-meter div {
    height: 8rem;
  }
}

/* One-point perspective timeline */
.tsd-shell {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(0.8rem, 2vw, 1.25rem);
  overflow: hidden;
}

.tsd-title {
  text-align: center;
}

.tsd-title h1 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
}

.tsd-stage {
  width: min(100% - 2rem, var(--tsd-max));
  min-height: min(68vh, 46rem);
  height: min(68vh, 46rem);
  margin: 0 auto;
  border: 1px solid rgba(167, 139, 250, 0.32);
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(240, 238, 255, 0.08) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(0deg, transparent calc(50% - 0.5px), rgba(240, 238, 255, 0.08) 50%, transparent calc(50% + 0.5px)),
    rgba(13, 11, 20, 0.72);
}

.tsd-vanish {
  display: none;
}

.tsd-overlays {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: auto;
}

.tsd-card {
  position: absolute;
  width: clamp(13.5rem, 24vw, 20rem);
  min-height: 8.2rem;
  border: 1px solid rgba(167, 139, 250, 0.38);
  background: rgba(26, 21, 37, 0.9);
  color: var(--tsd-ink);
  padding: 0.85rem;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition:
    border-color 160ms ease,
    opacity 120ms linear,
    transform 120ms linear;
  pointer-events: auto;
}

.tsd-card-compact {
  min-height: 0;
  border-color: rgba(245, 234, 215, 0.42);
  background: rgba(16, 13, 22, 0.84);
  padding: 0.62rem 0.72rem 0.62rem 0.9rem;
  cursor: pointer;
  transform: translate(0, -50%);
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.2);
}

.tsd-card-compact:hover,
.tsd-card-compact:focus-visible {
  border-color: var(--tsd-accent);
  outline: 0;
}

.tsd-card-compact::after {
  content: "";
  position: absolute;
  right: -2.6rem;
  top: 58%;
  width: 2.6rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(245, 234, 215, 0.7), rgba(245, 234, 215, 0));
  transform: rotate(10deg);
  transform-origin: left center;
}

.tsd-card[data-side="left"] {
  transform: translate(-100%, -50%);
}

.tsd-card[data-side="right"] {
  transform: translate(0, -50%);
}

.tsd-card[data-active="true"] {
  border-color: var(--tsd-accent);
  background: rgba(20, 16, 28, 0.94);
  box-shadow:
    0 0 0 1px rgba(243, 228, 200, 0.22),
    0 0.9rem 2rem rgba(0, 0, 0, 0.28);
}

.tsd-date-marker {
  position: absolute;
  left: -0.42rem;
  top: 0.74rem;
  width: 0.7rem;
  aspect-ratio: 1;
  border: 1px solid var(--tsd-rule);
  border-radius: 50%;
  background: var(--tsd-bg);
  box-shadow: 0 0 0 0.22rem rgba(13, 11, 20, 0.95);
}

.tsd-card .tsd-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--tsd-accent);
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.tsd-card h2 {
  margin: 0.42rem 0 0;
  font-size: clamp(1.1rem, 1.6vw, 1.55rem);
  line-height: 1.04;
}

.tsd-card-compact h2 {
  margin: 0.26rem 0 0;
  font-size: clamp(0.94rem, 1.2vw, 1.12rem);
  line-height: 1.12;
}

.tsd-card p {
  margin: 0.55rem 0 0;
  color: var(--tsd-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.tsd-card a {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--tsd-primary-strong);
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.68rem;
  text-decoration: underline;
  text-transform: uppercase;
  text-underline-offset: 0.35em;
}

.tsd-card a[hidden] {
  display: none;
}

.tsd-expanded {
  position: absolute;
  min-height: 9rem;
  border: 1px solid rgba(245, 234, 215, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 38%),
    var(--tsd-paper);
  color: var(--tsd-paper-ink);
  padding: 0.95rem 1.05rem 1.05rem;
  opacity: 0;
  transform: translate(0, -50%);
  transition: opacity 140ms linear;
  pointer-events: none;
  box-shadow:
    0 1.1rem 2.4rem rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(23, 19, 31, 0.08);
}

.tsd-expanded::before {
  content: "";
  position: absolute;
  left: -2.15rem;
  top: 50%;
  width: 2.15rem;
  height: 1px;
  background: var(--tsd-rule);
}

.tsd-expanded .tsd-expanded-date {
  display: inline-block;
  border-bottom: 1px solid rgba(23, 19, 31, 0.28);
  color: rgba(23, 19, 31, 0.72);
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.tsd-expanded h2 {
  margin: 0.42rem 0 0;
  font-size: clamp(1.28rem, 2vw, 1.9rem);
  line-height: 1;
}

.tsd-expanded p {
  margin: 0.6rem 0 0;
  color: rgba(23, 19, 31, 0.72);
  font-size: 0.9rem;
  line-height: 1.62;
}

.tsd-expanded a {
  display: inline-block;
  margin-top: 0.7rem;
  color: #4f2fb0;
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.7rem;
  text-decoration: underline;
  text-transform: uppercase;
  text-underline-offset: 0.35em;
}

.tsd-expanded a[hidden] {
  display: none;
}

.tsd-year {
  position: absolute;
  z-index: 5;
  display: grid;
  grid-template-columns: 2.7rem auto;
  gap: 0.5rem;
  align-items: center;
  color: rgba(245, 234, 215, 0.86);
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.7rem;
  opacity: 0;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-shadow: 0 0 0.8rem var(--tsd-bg);
}

.tsd-year::after {
  content: "";
  order: -1;
  height: 1px;
  background: currentColor;
}

.tsd-marker {
  position: absolute;
  z-index: 3;
  width: 0.42rem;
  aspect-ratio: 1;
  border: 1px solid var(--tsd-rule);
  border-radius: 50%;
  background: var(--tsd-bg);
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.tsd-marker[data-active="true"] {
  width: 0.72rem;
  border-color: var(--tsd-accent);
  background: var(--tsd-accent);
}

.tsd-hud {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 6;
  display: grid;
  gap: 0.45rem;
  justify-items: end;
  color: var(--tsd-muted);
  font-family: "Red Hat Mono", Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  pointer-events: none;
}

.tsd-hud div {
  position: relative;
  width: 0.35rem;
  height: min(28vh, 12rem);
  border: 1px solid var(--tsd-faint);
  background: rgba(240, 238, 255, 0.08);
  overflow: hidden;
}

.tsd-hud div span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: linear-gradient(var(--tsd-accent), var(--tsd-secondary), var(--tsd-primary));
}

.tsd-controls {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 6;
  margin: 0;
  padding: 0;
}

@media (max-width: 880px) {
  .tsd-shell {
    overflow: auto;
  }

  .tsd-stage {
    width: 100%;
    height: 68vh;
    min-height: 35rem;
  }

  .tsd-card {
    width: min(16rem, 42vw);
    min-height: 7.5rem;
  }
}

@media (max-width: 620px) {
  .tsd-stage {
    min-height: 38rem;
  }

  .tsd-card {
    width: min(15rem, 78vw);
  }

  .tsd-card[data-side="left"],
  .tsd-card[data-side="right"] {
    transform: translate(-50%, -50%);
  }

  .tsd-year {
    grid-template-columns: 1.8rem auto;
  }
}

/* Full-screen demo mode */
html,
body {
  overflow: hidden;
}

.tsd-shell {
  display: block;
  width: 100vw;
  height: 100vh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: var(--tsd-bg);
}

.tsd-stage {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  margin: 0;
  border: 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(240, 238, 255, 0.1) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(0deg, transparent calc(50% - 0.5px), rgba(240, 238, 255, 0.1) 50%, transparent calc(50% + 0.5px)),
    radial-gradient(circle at 50% 50%, rgba(245, 234, 215, 0.08), transparent 17rem),
    var(--tsd-bg);
}

.tsd-hyperspace {
  opacity: 1;
}

.tsd-vanish {
  box-shadow:
    0 0 0 0.45rem rgba(167, 139, 250, 0.1),
    0 0 2rem rgba(196, 181, 253, 0.35);
}

@media (max-width: 880px) {
  .tsd-stage {
    width: 100vw;
    height: 100vh;
    min-height: 0;
  }
}
