body {
  overflow-x: clip;
}

.trace-story {
  --trace-ease: cubic-bezier(.16, 1, .3, 1);
  --trace-progress: 0;
  position: relative;
  height: 1800vh;
  color: #07365f;
  background:
    radial-gradient(circle at 12% 12%, rgba(32, 201, 236, .12), transparent 26%),
    linear-gradient(rgba(8, 123, 230, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 123, 230, .045) 1px, transparent 1px),
    linear-gradient(180deg, #f8fdff, #edf8ff);
  background-size: auto, 42px 42px, 42px 42px, auto;
}

.trace-story-mount,
.trace-story-desktop {
  height: 100%;
}

.trace-story * {
  box-sizing: border-box;
}

.trace-story-sticky {
  position: sticky;
  z-index: 2;
  top: 76px;
  height: calc(100vh - 76px);
  min-height: 650px;
  overflow: hidden;
}

.trace-story-shell {
  display: grid;
  width: min(1360px, calc(100vw - 48px));
  height: 100%;
  margin: auto;
  padding: clamp(24px, 3.5vh, 40px) 0 18px;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.trace-story-header {
  max-width: 860px;
  margin: 0 auto clamp(16px, 2vh, 24px);
  text-align: center;
  transform: translateY(calc(-1 * var(--intro-scroll-y, 0px)));
  transition: transform 120ms linear;
}

.trace-story-eyebrow {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: #0874ce;
  font: 700 .72rem/1.3 "IBM Plex Mono", monospace;
  letter-spacing: .14em;
}

.trace-story-eyebrow::before {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #18bbdb;
  content: "";
}

.trace-story-header h2 {
  margin: 9px 0 8px;
  color: #073f82;
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  letter-spacing: -.035em;
  line-height: 1.08;
}

.trace-story-header h2 span {
  color: #079bdc;
}

.trace-story-header p {
  max-width: 730px;
  margin: auto;
  color: #52718d;
  font-size: clamp(.84rem, 1vw, .96rem);
  line-height: 1.65;
}

.trace-story-stage {
  position: relative;
  min-height: 0;
}

/* Onboarding Simulated Hand Pointer */
.trace-onboarding-cursor {
  position: absolute;
  z-index: 99;
  top: 0;
  left: 0;
  width: 54px;
  height: 54px;
  pointer-events: none;
  transform: translate3d(var(--cursor-x, 50vw), var(--cursor-y, 50vh), 0);
  transition: transform 380ms cubic-bezier(.16, 1, .3, 1), opacity 400ms ease;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .25));
}

.cursor-icon {
  width: 52px;
  height: 52px;
  transform: rotate(-10deg);
}

.cursor-ripple {
  position: absolute;
  top: 10px;
  left: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid #087be6;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  pointer-events: none;
}

.trace-onboarding-cursor.is-clicking .cursor-ripple {
  animation: cursorRipplePulse 600ms ease-out forwards;
}

@keyframes cursorRipplePulse {
  0% { opacity: 0.95; transform: translate(-50%, -50%) scale(0.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
}

.trace-phone-slot {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: var(--phone-left-pct, 50%);
  transform: perspective(1200px) rotateY(16deg) rotateX(5deg) rotateZ(-1.5deg) translate(-50%, -48%);
  transition: transform 900ms var(--trace-ease), left 120ms linear;
  transform-style: preserve-3d;
}

.trace-phone-slot:hover {
  transform: perspective(1200px) rotateY(6deg) rotateX(2deg) rotateZ(0deg) translate(-50%, -48%);
}

.trace-phone.iphone-17-pro-max {
  position: relative;
  width: clamp(270px, 22vw, 315px);
  aspect-ratio: 1 / 2.02;
  padding: 0;
  background: transparent;
  filter: drop-shadow(-16px 28px 50px rgba(0, 0, 0, .48)) drop-shadow(-6px 10px 18px rgba(5, 35, 65, .25));
  transition: transform 900ms var(--trace-ease);
}

.iphone-hardware-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 20;
}

.trace-phone-screen {
  position: absolute;
  top: 2.7%;
  left: 5.4%;
  width: 89.2%;
  height: 94.6%;
  overflow: hidden;
  border-radius: 42px;
  background: #fff;
}

.trace-phone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 16px 8px;
  color: #063a70;
  font-size: .61rem;
}

.trace-phone-visual {
  position: relative;
  display: grid;
  height: 96px;
  overflow: hidden;
  place-items: center;
  color: #7be7f7;
  background:
    radial-gradient(circle at 50% 48%, rgba(30, 202, 233, .22), transparent 34%),
    linear-gradient(145deg, #07335b, #075c89);
}

.trace-phone-visual::before {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(98, 226, 249, .28);
  border-radius: 13px;
  content: "";
}

.trace-leaf svg {
  width: 50px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.trace-qr {
  position: absolute;
  right: 18px;
  bottom: 12px;
}

.trace-qr svg {
  width: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.4;
}

.trace-scan-line {
  position: absolute;
  right: 10%;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #6de8fb, transparent);
  box-shadow: 0 0 12px #63dff5;
  animation: trace-scan 2.8s ease-in-out infinite;
}

@keyframes trace-scan {
  0%, 100% { top: 22%; opacity: .3; }
  50% { top: 78%; opacity: 1; }
}

.trace-phone-product {
  padding: 13px 14px 15px;
}

.trace-phone-badges {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.trace-phone-badges span {
  padding: 3px 6px;
  color: #08765d;
  border: 1px solid rgba(14, 179, 159, .18);
  border-radius: 999px;
  background: #e7f8f3;
  font-size: .52rem;
  font-weight: 700;
}

.trace-phone-product h3 {
  margin: 0 0 3px;
  color: #07375f;
  font-size: .82rem;
}

.trace-phone-product code,
.trace-phone-product small {
  display: block;
  color: #5d7b93;
  font-size: .56rem;
  line-height: 1.5;
}

.trace-phone-product code {
  color: #0877c8;
  font-family: "IBM Plex Mono", monospace;
}

.trace-phone-product ul {
  display: grid;
  gap: 4px;
  margin: 10px 0 11px;
  padding: 0;
  list-style: none;
}

.trace-phone-product li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #56748b;
  font-size: .54rem;
}

.trace-phone-product li b {
  color: #174f79;
}

.trace-phone-action-btn {
  position: relative;
  width: 100%;
  min-height: 38px;
  color: #fff;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(100deg, #087be6, #09a9d8);
  font-size: .63rem;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.trace-phone-action-btn.is-clicking {
  transform: scale(0.93);
  background: linear-gradient(100deg, #065eb3, #078bb4);
  box-shadow: 0 0 0 5px rgba(8, 123, 230, .35), 0 0 16px rgba(9, 169, 216, .5);
}

.trace-btn-ripple {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: radial-gradient(circle, rgba(255, 255, 255, .8) 10%, transparent 60%);
  opacity: 0;
  transform: scale(0.2);
  pointer-events: none;
}

.trace-phone-action-btn.is-clicking .trace-btn-ripple {
  animation: btn-ripple 450ms ease-out forwards;
}

@keyframes btn-ripple {
  0% { opacity: .8; transform: scale(0.2); }
  100% { opacity: 0; transform: scale(2.2); }
}

/* Phone Screen Views Switch */
.trace-phone-intro-view,
.trace-phone-app-view {
  transition: opacity 400ms ease, transform 400ms ease;
}

.trace-phone[data-view="intro"] .trace-phone-intro-view {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.trace-phone[data-view="intro"] .trace-phone-app-view {
  display: none;
  opacity: 0;
  transform: scale(0.95);
}

.trace-phone[data-view="app"] .trace-phone-intro-view {
  display: none;
  opacity: 0;
  transform: scale(0.95);
}

.trace-phone[data-view="app"] .trace-phone-app-view {
  display: block;
  opacity: 1;
  transform: scale(1);
}

/* Phone Multi-Tab Header */
.trace-phone-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 6px 4px 4px;
  background: #f0f6fa;
  border-bottom: 1px solid rgba(8, 123, 230, .12);
}

.trace-phone-tab-btn {
  padding: 5px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #627e94;
  font-size: .48rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 200ms ease, background 200ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trace-phone[data-active-tab="0"] .trace-phone-tab-btn[data-tab-idx="0"],
.trace-phone[data-active-tab="1"] .trace-phone-tab-btn[data-tab-idx="1"],
.trace-phone[data-active-tab="2"] .trace-phone-tab-btn[data-tab-idx="2"],
.trace-phone[data-active-tab="3"] .trace-phone-tab-btn[data-tab-idx="3"] {
  color: #087be6;
  background: #fff;
  box-shadow: 0 2px 6px rgba(8, 123, 230, .15);
}

/* Phone Multi-Tab Body & Panels */
.trace-phone-app-body {
  padding: 10px;
  min-height: 240px;
  background: #f8fcfe;
}

.trace-phone-tab-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.trace-phone[data-active-tab="0"] .trace-phone-tab-panel[data-tab-panel="0"],
.trace-phone[data-active-tab="1"] .trace-phone-tab-panel[data-tab-panel="1"],
.trace-phone[data-active-tab="2"] .trace-phone-tab-panel[data-tab-panel="2"],
.trace-phone[data-active-tab="3"] .trace-phone-tab-panel[data-tab-panel="3"] {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Skeleton Mockup Styling for Phone Mockup */
.skel-card {
  padding: 11px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid rgba(8, 123, 230, .12);
  box-shadow: 0 4px 14px rgba(8, 123, 230, .06);
}

.skel-heading {
  margin: 0 0 10px;
  color: #0877c8;
  font-size: .56rem;
  letter-spacing: .06em;
  font-weight: 700;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
}

.skel-line {
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e4f0f8 25%, #f2f9fe 50%, #e4f0f8 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 2s infinite ease-in-out;
}

@keyframes skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skel-line.h-main { height: 10px; margin-bottom: 4px; }
.skel-line.h-sub { height: 5px; }
.skel-line.w-25 { width: 25%; }
.skel-line.w-30 { width: 30%; }
.skel-line.w-35 { width: 35%; }
.skel-line.w-40 { width: 40%; }
.skel-line.w-45 { width: 45%; }
.skel-line.w-50 { width: 50%; }
.skel-line.w-55 { width: 55%; }
.skel-line.w-60 { width: 60%; }
.skel-line.w-65 { width: 65%; }
.skel-line.w-70 { width: 70%; }
.skel-line.w-75 { width: 75%; }
.skel-line.w-80 { width: 80%; }
.skel-line.w-85 { width: 85%; }

.skel-badge {
  width: 44px;
  height: 12px;
  border-radius: 999px;
  background: #dcf2ec;
  margin-bottom: 7px;
}

.skel-title-box {
  margin-bottom: 10px;
}

.skel-group {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.skel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skel-pill-bar {
  height: 20px;
  border-radius: 6px;
  background: #e6f6f2;
}

/* Skeleton Timeline */
.skel-timeline {
  display: grid;
  gap: 7px;
}

.skel-tl-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 7px;
  align-items: start;
}

.skel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6de2f5;
  margin-top: 2px;
}

/* Skeleton Layers */
.skel-layers {
  display: grid;
  gap: 6px;
}

.skel-layer-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.skel-tag {
  width: 28px;
  height: 11px;
  border-radius: 3px;
  background: #e3f2fd;
  flex: 0 0 28px;
}

/* Skeleton Docs */
.skel-docs {
  display: grid;
  gap: 6px;
}

.skel-doc-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 5px;
  border-radius: 6px;
  background: #f4fafe;
}

.skel-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #dceefb;
  flex: 0 0 18px;
}

.app-tag {
  display: inline-block;
  padding: 2px 5px;
  color: #08765d;
  background: #e7f8f3;
  border-radius: 4px;
  font-size: .48rem;
  font-weight: 700;
}

.app-kv {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  font-size: .52rem;
  color: #617f97;
}

.app-kv b {
  color: #0c4371;
}

.app-status-badge {
  margin-top: 8px;
  padding: 5px 6px;
  color: #09705a;
  background: #eaf8f4;
  border: 1px solid rgba(14, 179, 159, .2);
  border-radius: 6px;
  font-size: .5rem;
  font-weight: 700;
  text-align: center;
}

/* App Timeline (Tab 1) */
.app-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.app-timeline li {
  position: relative;
  padding-left: 12px;
  border-left: 2px solid #d5e8f5;
  font-size: .5rem;
}

.app-timeline li time {
  display: block;
  color: #0877c8;
  font-weight: 700;
  font-size: .46rem;
}

.app-timeline li b {
  display: block;
  color: #093c66;
}

.app-timeline li small {
  color: #728da3;
}

/* App Layers (Tab 2) */
.app-layers {
  margin: 0;
  padding: 0 0 0 14px;
  display: grid;
  gap: 4px;
  font-size: .5rem;
}

.app-layers li {
  color: #093c66;
}

.app-layers span {
  color: #0877c8;
  font-size: .45rem;
  margin-right: 4px;
  font-weight: 700;
}

/* App Docs (Tab 3) */
.app-doc-item {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px 6px;
  background: #f4fafd;
  border-radius: 6px;
}

.app-doc-item i {
  font-style: normal;
  font-size: .75rem;
}

.app-doc-item b {
  display: block;
  color: #093c66;
  font-size: .5rem;
}

.app-doc-item small {
  color: #648299;
  font-size: .45rem;
}

.trace-intro-scene {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.trace-methods {
  position: absolute;
  top: 50%;
  display: grid;
  width: min(34vw, 440px);
  gap: clamp(12px, 1.8vh, 18px);
  transform: translateY(calc(-50% - var(--intro-scroll-y, 0px)));
  opacity: 1;
  transition: transform 120ms linear;
}

.trace-methods-left { left: 0; }
.trace-methods-right { right: 0; }

.trace-method-tick {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 123, 230, .08);
  color: transparent;
  opacity: 0;
  transform: scale(0.6);
  transition: all 350ms cubic-bezier(.16, 1, .3, 1);
}

.trace-method-tick svg {
  width: 13px;
  height: 13px;
}

.trace-methods article {
  position: relative;
  min-height: 94px;
  padding: 16px 18px 16px 56px;
  border: 1.5px solid rgba(8, 123, 230, .14);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(13, 80, 132, .08);
  opacity: 1;
  transform: translateY(0);
  transition: all 350ms ease;
}

.trace-methods article.is-highlighted {
  border-color: #087be6;
  background: rgba(240, 248, 255, .98);
  box-shadow: 0 0 24px rgba(8, 123, 230, .22), 0 14px 34px rgba(13, 80, 132, .12);
  transform: translateY(-2px);
}

.trace-methods article.is-ticked {
  border-color: rgba(14, 179, 159, .5);
  background: rgba(240, 252, 249, .98);
}

.trace-methods article.is-ticked .trace-method-tick {
  opacity: 1;
  color: #fff;
  background: #0eb39f;
  transform: scale(1);
  box-shadow: 0 4px 12px rgba(14, 179, 159, .35);
}

.trace-methods article > span {
  position: absolute;
  top: 17px;
  left: 16px;
  color: #0796d6;
  font: 700 .78rem/1 "IBM Plex Mono", monospace;
  background: rgba(7, 150, 214, .08);
  padding: 4px 6px;
  border-radius: 6px;
}

.trace-methods h3 {
  margin: 0 0 5px;
  color: #083f78;
  font-size: clamp(.96rem, 1.15vw, 1.12rem);
  font-weight: 700;
}

.trace-methods p {
  margin: 0;
  color: #55728a;
  font-size: clamp(.76rem, .9vw, .85rem);
  line-height: 1.5;
}

.trace-panel-slot,
.trace-tree-slot {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: min(58vw, 720px);
  transform: translateY(-50%);
}

.trace-panel-slot { right: 0; }
.trace-tree-slot {
  left: 0;
  width: min(67vw, 900px);
  pointer-events: none;
}

.trace-data-panel {
  position: absolute;
  top: 50%;
  right: 0;
  width: 100%;
  max-height: min(61vh, 590px);
  overflow: hidden;
  padding: 0 clamp(18px, 2.2vw, 28px) clamp(18px, 2.2vw, 28px) clamp(18px, 2.2vw, 28px);
  border: 1px solid rgba(8, 123, 230, .14);
  border-radius: 22px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 55px rgba(13, 80, 132, .1);
  opacity: 0;
  pointer-events: none;
  transform: translate(50px, -50%) scale(0.97);
  filter: blur(2px);
  transition: opacity 650ms var(--trace-ease), transform 750ms var(--trace-ease), filter 550ms ease;
  scrollbar-width: none;
}

.trace-data-panel > header {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 calc(-1 * clamp(18px, 2.2vw, 28px)) 16px calc(-1 * clamp(18px, 2.2vw, 28px));
  padding: clamp(16px, 2vw, 20px) clamp(18px, 2.2vw, 28px) 12px clamp(18px, 2.2vw, 28px);
  background: #ffffff;
  border-bottom: 1.5px solid rgba(8, 123, 230, .14);
  border-radius: 22px 22px 0 0;
}

.trace-data-panel > header span {
  color: #0782d5;
  font: 700 .68rem/1.3 "IBM Plex Mono", monospace;
  letter-spacing: .1em;
}

.trace-data-panel > header h3 {
  margin: 5px 0 0;
  color: #073d73;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  letter-spacing: -.025em;
}

.trace-product-rows {
  margin: 0;
}

.trace-product-rows > div {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) 1.3fr;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(8, 123, 230, .08);
  opacity: 0;
  transform: translateY(13px);
  transition: 420ms var(--trace-ease);
  transition-delay: calc(var(--row-index) * 45ms + 100ms);
}

.trace-product-rows dt {
  color: #708ba1;
  font-size: .72rem;
}

.trace-product-rows dd {
  margin: 0;
  color: #164e78;
  font-size: .76rem;
  font-weight: 650;
}

.trace-status-card {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 13px;
  color: #096f5a;
  border: 1px solid rgba(14, 179, 159, .18);
  border-radius: 13px;
  background: #ecfaf6;
}

.trace-status-card svg {
  width: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.trace-status-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: .78rem;
}

.trace-status-card p {
  margin: 0;
  color: #4d766d;
  font-size: .68rem;
  line-height: 1.45;
}

.trace-journey {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trace-journey::before {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 82px;
  width: 2px;
  background: #dbeaf5;
  content: "";
}

.trace-journey li {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 7px 0;
  opacity: .38;
  transition: opacity 300ms ease;
}

.trace-journey li::before {
  position: absolute;
  top: 12px;
  left: 77px;
  width: 10px;
  height: 10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #c8dbe9;
  box-shadow: 0 0 0 1px #c8dbe9;
  content: "";
  transition: 300ms ease;
}

.trace-journey li.is-active {
  opacity: 1;
}

.trace-journey li.is-active::before {
  background: #0cc0df;
  box-shadow: 0 0 0 1px #0cc0df, 0 0 14px rgba(12, 192, 223, .44);
}

.trace-journey time {
  color: #087bd5;
  font: 600 .62rem/1.4 "IBM Plex Mono", monospace;
}

.trace-journey h4,
.trace-documents h4 {
  margin: 0 0 2px;
  color: #0a426f;
  font-size: .75rem;
}

.trace-journey p,
.trace-documents p {
  margin: 0;
  color: #638096;
  font-size: .65rem;
  line-height: 1.4;
}

.trace-journey code {
  color: #0b75b7;
  font: 500 .59rem/1.4 "IBM Plex Mono", monospace;
}

.trace-origin-layers {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-left: 0;
}

.trace-origin-layers article {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 104px;
  padding: 14px 16px;
  border: 1.5px solid rgba(8, 123, 230, .15);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(13, 80, 132, .04);
  transition: all 320ms cubic-bezier(.16, 1, .3, 1);
}

.trace-origin-layers article.is-highlighted {
  border: 2px solid #087be6;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(8, 123, 230, .14);
  transform: translateY(-3px);
}

.trace-origin-layers article.is-highlighted b {
  background: #087be6;
  color: #ffffff;
}

.trace-origin-layers b {
  display: inline-block;
  align-self: flex-start;
  color: #087be6;
  font: 700 .62rem/1.2 "IBM Plex Mono", monospace;
  background: rgba(8, 123, 230, .08);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.trace-origin-layers strong {
  color: #0d385f;
  font-size: clamp(.84rem, .95vw, .92rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.trace-origin-layers code {
  color: #5d7b93;
  font: 500 .62rem/1.4 "IBM Plex Mono", monospace;
  word-break: break-all;
}

.trace-documents {
  display: grid;
  gap: 9px;
}

.trace-documents article {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 13px 15px;
  border: 1.5px solid rgba(8, 123, 230, .12);
  border-left: 4.5px solid rgba(8, 123, 230, .18);
  border-radius: 14px;
  background: #f8fcff;
  opacity: 0.35;
  transform: translateX(0);
  transition: all 360ms cubic-bezier(.16, 1, .3, 1);
}

.trace-documents article.is-highlighted {
  opacity: 1;
  border-color: rgba(8, 123, 230, .28);
  border-left: 4.5px solid #087be6;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(8, 123, 230, .14);
  transform: translateX(8px);
}

.trace-documents i {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #087be6;
  border-radius: 10px;
  background: #eaf6ff;
  transition: all 320ms ease;
}

.trace-documents article.is-highlighted i {
  background: linear-gradient(135deg, #087be6, #00c6ff);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(8, 123, 230, .32);
  transform: scale(1.05);
}

.trace-documents i svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.trace-documents article > span {
  padding: 5px 10px;
  color: #08725d;
  border: 1px solid rgba(14, 179, 159, .18);
  border-radius: 999px;
  background: #eaf8f4;
  font-size: .58rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 320ms ease;
}

.trace-documents article.is-highlighted > span {
  background: #087be6;
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(8, 123, 230, .3);
  transform: scale(1.02);
}

.trace-tree-slot .trace-tree-panel {
  left: 0;
  max-height: min(64vh, 640px);
  padding: 18px 22px;
  transform: translate(-55px, -50%);
}

.trace-tree-slot .trace-tree-panel > header {
  margin-bottom: 10px;
}

.trace-tree-main {
  position: relative;
  display: grid;
  gap: 7px;
  padding-left: 22px;
}

.trace-tree-main::before {
  position: absolute;
  top: 17px;
  bottom: 17px;
  left: 8px;
  width: 2px;
  background: linear-gradient(#1ac6e4, #087be6 60%, #35c69d);
  content: "";
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1200ms var(--trace-ease) 300ms;
}

.trace-tree-node {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 50px;
  padding: 6px 12px;
  text-align: left;
  border: 1px solid rgba(8, 123, 230, .11);
  border-radius: 11px;
  background: #f8fcff;
  opacity: 0;
  transform: translateY(17px);
  transition: opacity 420ms var(--trace-ease), transform 420ms var(--trace-ease), border-color 200ms ease, background 200ms ease;
  transition-delay: calc(var(--node-index) * 100ms + 300ms);
}

.trace-tree-node::before {
  position: absolute;
  top: 50%;
  left: -16px;
  width: 16px;
  height: 1px;
  background: #4fc9e0;
  content: "";
}

.trace-tree-node:hover,
.trace-tree-node:focus-visible {
  border-color: rgba(8, 123, 230, .42);
  background: #eff9ff;
  outline: none;
}

.trace-tree-node:hover::after {
  position: absolute;
  z-index: 4;
  right: 10px;
  bottom: calc(100% + 8px);
  max-width: min(420px, 80vw);
  padding: 8px 10px;
  color: #e9f8ff;
  border-radius: 8px;
  background: #07365f;
  content: attr(data-tooltip);
  font: 500 .6rem/1.45 "IBM Plex Mono", monospace;
  box-shadow: 0 10px 25px rgba(3, 38, 67, .18);
}

.trace-tree-node b {
  color: #088acb;
  font: 700 .55rem/1.2 "IBM Plex Mono", monospace;
}

.trace-tree-node strong {
  color: #0b426e;
  font-size: .7rem;
}

.trace-tree-node code,
.trace-tree-node small {
  color: #617f97;
  font-size: .57rem;
}

.trace-tree-node code {
  font-family: "IBM Plex Mono", monospace;
}

.trace-tree-branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.trace-tree-branches h4 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: #0b4774;
  font-size: .72rem;
}

.trace-tree-branches details {
  padding: 8px 10px;
  border: 1px solid rgba(8, 123, 230, .1);
  border-radius: 10px;
  background: #f7fcff;
  opacity: 0;
  transform: translateY(15px);
  transition: 420ms var(--trace-ease);
  transition-delay: calc(var(--branch-index) * 80ms + 850ms);
}

.trace-tree-branches summary {
  color: #155279;
  cursor: pointer;
  font-size: .62rem;
  font-weight: 700;
}

.trace-tree-branches p {
  margin: 6px 0 0;
  color: #698499;
  font-size: .58rem;
  line-height: 1.45;
}

.trace-story-progress {
  position: relative;
  display: grid;
  width: min(980px, 100%);
  margin: 12px auto 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.trace-progress-line {
  position: absolute;
  top: 11px;
  right: 8%;
  left: 8%;
  height: 2px;
  overflow: hidden;
  background: #d7e8f4;
}

.trace-progress-line i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #19bedf, #087be6);
  transform: scaleX(var(--trace-progress));
  transform-origin: left;
}

.trace-story-progress button {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 44px;
  justify-items: center;
  color: #7891a5;
  border: 0;
  background: none;
  cursor: pointer;
}

.trace-story-progress button b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid #d1e3f0;
  border-radius: 50%;
  background: #f8fdff;
  font: 700 .55rem/1 "IBM Plex Mono", monospace;
}

.trace-story-progress button span {
  margin-top: 4px;
  font-size: .62rem;
  font-weight: 650;
}

.trace-story-progress button.is-active {
  color: #087be6;
}

.trace-story-progress button.is-active b,
.trace-story-progress button.is-complete b {
  color: #fff;
  border-color: #087be6;
  background: #087be6;
  box-shadow: 0 5px 15px rgba(8, 123, 230, .25);
}

.trace-story[data-scene="0"] .trace-intro-scene {
  pointer-events: auto;
}

.trace-story:not([data-scene="0"]) .trace-intro-scene {
  pointer-events: none;
}

.trace-story[data-scene="0"] .trace-methods article,
.trace-story[data-scene="1"] [data-trace-panel="1"],
.trace-story[data-scene="2"] [data-trace-panel="2"],
.trace-story[data-scene="3"] [data-trace-panel="3"],
.trace-story[data-scene="4"] [data-trace-panel="4"],
.trace-story[data-scene="5"] [data-trace-panel="5"] {
  opacity: 1;
  pointer-events: auto;
}

.trace-story[data-scene="0"] .trace-methods article,
.trace-story[data-scene="1"] .trace-product-rows > div,
.trace-story[data-scene="3"] .trace-origin-layers article,
.trace-story[data-scene="4"] .trace-documents article,
.trace-story[data-scene="5"] .trace-tree-node,
.trace-story[data-scene="5"] .trace-tree-branches details {
  opacity: 1;
  transform: translateY(0);
}

.trace-story[data-scene="1"] [data-trace-panel="1"],
.trace-story[data-scene="2"] [data-trace-panel="2"],
.trace-story[data-scene="3"] [data-trace-panel="3"],
.trace-story[data-scene="4"] [data-trace-panel="4"] {
  transform: translate(0, -50%) scale(1);
  filter: blur(0px);
}

.trace-story[data-scene="2"] [data-trace-panel="1"],
.trace-story[data-scene="3"] [data-trace-panel="1"],
.trace-story[data-scene="3"] [data-trace-panel="2"],
.trace-story[data-scene="4"] [data-trace-panel="1"],
.trace-story[data-scene="4"] [data-trace-panel="2"],
.trace-story[data-scene="4"] [data-trace-panel="3"],
.trace-story[data-scene="5"] [data-trace-panel="1"],
.trace-story[data-scene="5"] [data-trace-panel="2"],
.trace-story[data-scene="5"] [data-trace-panel="3"],
.trace-story[data-scene="5"] [data-trace-panel="4"] {
  opacity: 1;
  pointer-events: none;
  transform: translate(0, -220%) scale(1);
  filter: none;
}

/* Line-by-line Soft Highlights */
.trace-product-rows > div,
.trace-journey > li,
.trace-origin-layers > article,
.trace-documents > article,
.trace-tree-node {
  opacity: 0.32;
  transition: opacity 450ms ease, transform 450ms ease, background 450ms ease, border-color 450ms ease;
}

.trace-product-rows > div.is-highlighted {
  opacity: 1;
  background: rgba(8, 123, 230, .05);
  border-left: 3px solid #087be6;
  padding-left: 6px;
}

.trace-journey > li.is-highlighted {
  opacity: 1;
}

.trace-journey > li.is-highlighted::before {
  background: #0cc0df;
  box-shadow: 0 0 0 1px #0cc0df, 0 0 14px rgba(12, 192, 223, .6);
  transform: scale(1.25);
}

.trace-origin-layers > article.is-highlighted {
  opacity: 1;
  background: #f0f9ff;
  border-color: rgba(8, 123, 230, .35);
  transform: translateY(0);
}

.trace-documents > article.is-highlighted {
  opacity: 1;
  background: #f0faf7;
  border-color: rgba(14, 179, 159, .35);
  transform: translateY(0);
}

.trace-tree-node.is-highlighted {
  opacity: 1;
  background: #edf8ff;
  border-color: rgba(8, 123, 230, .35);
  transform: translateY(0);
}

.trace-story[data-scene="1"] .trace-phone-slot,
.trace-story[data-scene="2"] .trace-phone-slot,
.trace-story[data-scene="3"] .trace-phone-slot,
.trace-story[data-scene="4"] .trace-phone-slot {
  left: 17%;
  transform: translate(-50%, -48%);
}

.trace-story[data-scene="1"] .trace-phone,
.trace-story[data-scene="2"] .trace-phone,
.trace-story[data-scene="3"] .trace-phone,
.trace-story[data-scene="4"] .trace-phone {
  transform: scale(.93);
}

.trace-story[data-scene="5"] .trace-phone-slot {
  left: 88%;
  transform: translate(-50%, -48%);
}

.trace-story[data-scene="5"] .trace-phone {
  transform: scale(.87);
}

.trace-story[data-scene="5"] .trace-tree-slot {
  pointer-events: auto;
}

.trace-story[data-scene="5"] .trace-tree-panel {
  transform: translate(0, -50%);
}

.trace-story[data-scene="5"] .trace-tree-main::before {
  transform: scaleY(1);
}

.trace-node-drawer {
  position: fixed;
  z-index: 100;
  top: 88px;
  right: 18px;
  width: min(390px, calc(100vw - 36px));
  padding: 24px;
  border: 1px solid rgba(8, 123, 230, .18);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(5, 55, 95, .22);
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px);
  transition: 350ms var(--trace-ease);
}

.trace-node-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.trace-drawer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  color: #56738a;
  border: 0;
  border-radius: 50%;
  background: #eff7fc;
  font-size: 1.3rem;
}

.trace-node-drawer > span {
  color: #0784d1;
  font: 700 .65rem/1.3 "IBM Plex Mono", monospace;
  letter-spacing: .1em;
}

.trace-node-drawer h3 {
  margin: 10px 40px 7px 0;
  color: #073d70;
  font-size: 1rem;
}

.trace-node-drawer code {
  color: #087bbe;
  font: 500 .72rem/1.5 "IBM Plex Mono", monospace;
}

.trace-node-drawer p {
  margin: 8px 0 0;
  color: #607d94;
  font-size: .78rem;
  line-height: 1.55;
}

.trace-story-mobile {
  display: none;
}

@media (max-width: 1199px) and (min-width: 768px) {
  .trace-story-shell {
    width: min(1120px, calc(100vw - 32px));
  }

  .trace-methods {
    width: 28vw;
  }

  .trace-methods article {
    padding: 10px 10px 10px 38px;
  }

  .trace-methods p {
    font-size: .62rem;
  }

  .trace-panel-slot {
    width: 59vw;
  }

  .trace-story[data-scene="1"] .trace-phone-slot,
  .trace-story[data-scene="2"] .trace-phone-slot,
  .trace-story[data-scene="3"] .trace-phone-slot,
  .trace-story[data-scene="4"] .trace-phone-slot {
    left: 16%;
  }

  .trace-story[data-scene="5"] .trace-phone-slot {
    left: 87%;
  }
}

@media (max-width: 767px) {
  .trace-story {
    height: auto;
    background-size: auto, 34px 34px, 34px 34px, auto;
  }

  .trace-story-desktop {
    display: none;
  }

  .trace-story-mobile {
    display: block;
    padding: 66px 0 72px;
  }

  .trace-story-mobile .trace-story-header {
    margin-bottom: 28px;
  }

  .trace-story-mobile .trace-phone {
    width: min(100%, 360px);
    margin: 0 auto 32px;
    border-radius: 27px;
  }

  .trace-story-mobile .trace-phone-notch {
    display: none;
  }

  .trace-story-mobile .trace-phone-screen {
    border-radius: 20px;
  }

  .trace-story-mobile .trace-phone-visual {
    height: 150px;
  }

  .trace-story-mobile .trace-phone-product {
    padding: 18px;
  }

  .trace-story-mobile .trace-phone-product h3 {
    font-size: 1rem;
  }

  .trace-story-mobile .trace-phone-product code,
  .trace-story-mobile .trace-phone-product small,
  .trace-story-mobile .trace-phone-product li {
    font-size: .68rem;
  }

  .trace-story-mobile .trace-phone-product button {
    min-height: 44px;
    font-size: .75rem;
  }

  .trace-mobile-block {
    margin-bottom: 24px;
  }

  .trace-mobile-block > h3 {
    margin: 0 0 14px;
    color: #083e73;
    font-size: 1.1rem;
  }

  .trace-story-mobile .trace-intro-scene {
    position: static;
  }

  .trace-story-mobile .trace-methods {
    position: static;
    display: grid;
    width: 100%;
    gap: 10px;
    transform: none;
  }

  .trace-story-mobile .trace-methods-right {
    margin-top: 10px;
  }

  .trace-story-mobile .trace-methods article {
    min-height: 0;
    padding: 15px 15px 15px 48px;
    opacity: 1;
    transform: none;
  }

  .trace-story-mobile .trace-methods h3 {
    font-size: .9rem;
  }

  .trace-story-mobile .trace-methods p {
    font-size: .76rem;
  }

  .trace-story-mobile .trace-data-panel {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-height: none;
    margin-top: 14px;
    overflow: visible;
    padding: 20px 16px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .trace-story-mobile .trace-product-rows > div {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 10px 0;
    opacity: 1;
    transform: none;
  }

  .trace-story-mobile .trace-product-rows dt {
    font-size: .7rem;
  }

  .trace-story-mobile .trace-product-rows dd {
    font-size: .8rem;
  }

  .trace-story-mobile .trace-journey li {
    grid-template-columns: 62px 1fr;
    gap: 20px;
    padding: 10px 0;
    opacity: 1;
  }

  .trace-story-mobile .trace-journey::before {
    left: 69px;
  }

  .trace-story-mobile .trace-journey li::before {
    left: 64px;
  }

  .trace-story-mobile .trace-journey h4,
  .trace-story-mobile .trace-documents h4 {
    font-size: .8rem;
  }

  .trace-story-mobile .trace-journey p,
  .trace-story-mobile .trace-documents p {
    font-size: .72rem;
  }

  .trace-story-mobile .trace-origin-layers article,
  .trace-story-mobile .trace-documents article,
  .trace-story-mobile .trace-tree-node,
  .trace-story-mobile .trace-tree-branches details {
    opacity: 1;
    transform: none;
  }

  .trace-story-mobile .trace-documents article {
    grid-template-columns: 34px 1fr;
  }

  .trace-story-mobile .trace-documents article > span {
    grid-column: 2;
    justify-self: start;
  }

  .trace-story-mobile .trace-tree-main::before {
    transform: scaleY(1);
  }

  .trace-story-mobile .trace-tree-branches {
    grid-template-columns: 1fr;
  }

  .trace-story-cta {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 20px;
    border-radius: 17px;
    background: linear-gradient(120deg, #063f75, #087fc4);
  }

  .trace-story-cta span,
  .trace-story-cta strong {
    display: block;
    color: #fff;
  }

  .trace-story-cta span {
    font: 600 .65rem/1.4 "IBM Plex Mono", monospace;
    letter-spacing: .08em;
    opacity: .72;
  }

  .trace-story-cta strong {
    margin-top: 5px;
    font: 600 .78rem/1.4 "IBM Plex Mono", monospace;
  }

  .trace-story-cta a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    color: #075083;
    border-radius: 11px;
    background: #fff;
    font-size: .78rem;
    font-weight: 700;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trace-story *,
  .trace-story *::before,
  .trace-story *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: .001ms !important;
  }
}
