html {
  background: #0b1924;
  color-scheme: dark;
  scroll-behavior: smooth;
}

body { margin: 0; }

#tahm-modern-preview {
  --header-height: 83px;
  width: 100%;
  overflow: clip;
}

#tahm-modern-preview a,
#tahm-modern-preview button { cursor: pointer; }

#tahm-modern-preview :focus-visible {
  outline: 3px solid #ffaf47;
  outline-offset: 5px;
}

#tahm-modern-preview [id] {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

#tahm-modern-preview .tm-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  transition: background-color 240ms ease, box-shadow 240ms ease;
}

#tahm-modern-preview .tm-nav.is-scrolled {
  background: #102532;
  box-shadow: 0 8px 28px #06101855;
}

#tahm-modern-preview .tm-links a {
  padding-block: 10px;
  transition: color 180ms ease;
}

#tahm-modern-preview .tm-links a:hover,
#tahm-modern-preview .tm-links a[aria-current="location"] { color: #ff9b56; }

#tahm-modern-preview .reading-progress {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  overflow: hidden;
}

#tahm-modern-preview .reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff641e, #ffaf47);
  transform: scaleX(0);
  transform-origin: left;
}

#tahm-modern-preview .skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  z-index: 30;
  padding: 12px 18px;
  background: #ff7a2e;
  color: #0b1119;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

#tahm-modern-preview .skip-link:focus { transform: none; }

#tahm-modern-preview .phone-stage {
  display: flow-root;
  min-width: 0;
  perspective: 1400px;
}

#tahm-modern-preview.has-motion [data-scroll-image] {
  opacity: var(--phone-opacity, 1);
  transform: translate3d(0, var(--phone-y, 0px), 0)
    rotate(calc(var(--phone-tilt, 0deg) * var(--phone-direction, 1)))
    scale(var(--phone-scale, 1));
  transform-origin: 50% 50%;
}

#tahm-modern-preview.has-motion [data-reveal] {
  opacity: 0;
  translate: 0 23px;
  transition: opacity 650ms ease, translate 750ms cubic-bezier(.18,.65,.3,1);
  transition-delay: 0ms;
}

#tahm-modern-preview.has-motion [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
  transition-delay: var(--reveal-delay, 0ms);
}

#tahm-modern-preview [data-feature-frame] {
  aspect-ratio: 9 / 20;
}

#tahm-modern-preview [data-feature-frame] img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#tahm-modern-preview .tm-feature-button {
  transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

#tahm-modern-preview .tm-feature-button:hover {
  border-color: #99b3c6;
  box-shadow: 0 8px 22px #06101822;
}

#tahm-modern-preview .tm-feature-button[aria-pressed="true"]:hover {
  border-color: #ff7a2e;
}

#tahm-modern-preview .tm-feature-detail { scroll-margin-top: calc(var(--header-height) + 24px); }

#tahm-modern-preview .tm-action {
  transition: box-shadow 200ms ease, filter 200ms ease;
}

#tahm-modern-preview a.tm-action:hover {
  box-shadow: 0 8px 30px #ff7a2e30;
  filter: brightness(1.06);
}

@media (max-width: 680px) {
  #tahm-modern-preview .tm-links a { padding-block: 6px; }
  #tahm-modern-preview .tm-links { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #tahm-modern-preview *,
  #tahm-modern-preview *::before,
  #tahm-modern-preview *::after {
    animation: none !important;
    transition: none !important;
  }
  #tahm-modern-preview [data-reveal],
  #tahm-modern-preview [data-scroll-image],
  #tahm-modern-preview .tm-hero-art {
    opacity: 1 !important;
    translate: none !important;
    transform: none !important;
  }
}
