:root {
  color-scheme: dark;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0b1220;
  color: #e5e7eb;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.triple-slider {
  --ts-ratio-desktop: 16/9;
  --ts-ratio-tablet: 4/3;
  --ts-ratio-mobile: 1/1;
  --ts-overlay: linear-gradient(180deg, rgba(2, 6, 23, 0.02) 0%, rgba(2, 6, 23, 0.58) 100%);
  position: relative;
  aspect-ratio: var(--ts-ratio-desktop);
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #111827;
  isolation: isolate;
}

.ts-scenes {
  position: absolute;
  inset: 0;
}

.ts-lanes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "left right-top"
    "left right-bottom";
  gap: 0.75rem;
  padding: 0.75rem;
}

.ts-panel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #1f2937;
}

.ts-lane[data-slot="left"] {
  grid-area: left;
}

.ts-lane[data-slot="right-top"] {
  grid-area: right-top;
}

.ts-lane[data-slot="right-bottom"] {
  grid-area: right-bottom;
}

.ts-track {
  display: flex;
  height: 100%;
  width: 100%;
  transform: translate3d(-100%, 0, 0);
}

.ts-frame {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.ts-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ts-overlay);
  pointer-events: none;
}

.ts-frame img,
.ts-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ts-frame img {
  object-fit: cover;
  object-position: center;
  display: block;
}

.ts-placeholder {
  display: grid;
  place-items: center;
  color: #9ca3af;
  background: linear-gradient(130deg, #1f2937, #374151);
  font-size: 0.9rem;
}

.ts-frame-content {
  --ts-frame-title-color: #ffffff;
  --ts-frame-description-color: #d1d5db;
  --ts-frame-cta-bg: #2563eb;
  --ts-frame-cta-color: #ffffff;
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 2;
}

.ts-frame-title,
.ts-frame-description,
.ts-frame-cta {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 380ms ease, transform 380ms ease;
}

.triple-slider.is-rebasing .ts-frame-title,
.triple-slider.is-rebasing .ts-frame-description,
.triple-slider.is-rebasing .ts-frame-cta {
  transition: none !important;
}

.ts-lane.is-content-visible .ts-frame.is-current .ts-frame-title,
.ts-lane.is-content-visible .ts-frame.is-current .ts-frame-description,
.ts-lane.is-content-visible .ts-frame.is-current .ts-frame-cta {
  opacity: 1;
  transform: translateY(0);
}

.ts-frame-title {
  margin: 0;
  color: var(--ts-frame-title-color);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.2;
}

.ts-frame-description {
  margin: 0.35rem 0 0;
  color: var(--ts-frame-description-color);
  font-size: clamp(0.76rem, 1.5vw, 0.92rem);
  line-height: 1.3;
  transition-delay: 120ms;
}

.ts-frame-cta {
  margin-top: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.95rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--ts-frame-cta-bg);
  color: var(--ts-frame-cta-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
  transition-delay: 220ms;
}

.ts-lane[data-slot="left"] .ts-frame-content {
  left: 1.2rem;
  right: 1.2rem;
  bottom: 1.1rem;
}

.ts-lane[data-slot="left"] .ts-frame-title {
  font-size: clamp(1.45rem, 3vw, 2.05rem);
}

.ts-lane[data-slot="left"] .ts-frame-description {
  font-size: clamp(0.95rem, 2vw, 1.06rem);
}

.ts-lane[data-slot="left"] .ts-frame-cta {
  min-height: 2.5rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.95rem;
}

.ts-controls {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 5;
  display: inline-flex;
  gap: 0.45rem;
}

.ts-nav,
.ts-autoplay-toggle {
  border: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: #f9fafb;
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0 0.8rem;
  cursor: pointer;
}

.ts-nav {
  width: 2.4rem;
  padding: 0;
  display: grid;
  place-items: center;
}

.ts-nav svg {
  width: 1rem;
  height: 1rem;
}

.ts-nav:focus-visible,
.ts-autoplay-toggle:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 2px;
}

.triple-slider.is-busy .ts-nav {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 1024px) {
  .triple-slider {
    aspect-ratio: var(--ts-ratio-tablet);
  }

  .ts-lanes {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
      "left left"
      "right-top right-bottom";
  }
}

@media (max-width: 680px) {
  .triple-slider {
    aspect-ratio: var(--ts-ratio-mobile);
  }

  .ts-lanes {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-areas:
      "left"
      "right-top"
      "right-bottom";
  }

  .ts-lane[data-slot="left"] .ts-frame-content {
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.8rem;
  }

  .ts-lane[data-slot="left"] .ts-frame-title {
    font-size: 1.2rem;
  }

  .ts-lane[data-slot="left"] .ts-frame-description {
    font-size: 0.85rem;
  }

  .ts-frame-description {
    display: none;
  }

  .ts-controls {
    top: auto;
    bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ts-track,
  .ts-frame-title,
  .ts-frame-description,
  .ts-frame-cta {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

.doc-header {
  margin-bottom: 1rem;
}

.doc-lead {
  margin: 0.5rem 0 1.4rem;
  color: #cbd5e1;
  max-width: 76ch;
}

.docs {
  margin-top: 1.5rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid #1f2937;
  border-radius: 12px;
  background: #0f172a;
}

.docs h2 {
  margin: 0 0 0.7rem;
  font-size: 1.2rem;
}

.docs p {
  margin: 0.5rem 0 0.8rem;
  color: #d1d5db;
}

.docs ul,
.docs ol {
  margin: 0.2rem 0 0.8rem 1.2rem;
  color: #e5e7eb;
}

.docs li {
  margin: 0.25rem 0;
}

.docs pre {
  margin: 0.8rem 0 0;
  padding: 0.8rem;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid #1f2937;
  background: #020617;
}

.docs code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.doc-table-wrap {
  overflow-x: auto;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.doc-table th,
.doc-table td {
  text-align: left;
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid #1f2937;
  font-size: 0.92rem;
}

.doc-table th {
  color: #93c5fd;
}
