/* Unified Light Acoustic Canvas, Full-Duplex Studio Timeline & Leaderboard 2.0 */
:root {
  --dad: #a86b14;
  --child: #be435a;
  --agent: #2557f0;
}

.hero-world {
  position: relative;
  background:
    radial-gradient(960px 500px at 50% -6%, rgba(37, 87, 240, 0.085), transparent 70%),
    radial-gradient(640px 380px at 84% 24%, rgba(168, 107, 20, 0.055), transparent 72%),
    linear-gradient(180deg, #f5f8fe 0%, #ffffff 48%, #f6f8fc 100%);
  color: var(--ink);
  overflow: hidden;
  padding-bottom: 76px;
  border-bottom: 1px solid var(--line);
}

.hero-glow {
  position: absolute;
  inset: -120px auto auto 50%;
  width: min(680px, 100vw);
  height: 340px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(37, 87, 240, 0.11) 0%, rgba(37, 87, 240, 0.02) 55%, transparent 74%);
  pointer-events: none;
  filter: blur(26px);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.036) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.036) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 55% at 50% 20%, #000 18%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 20%, #000 18%, transparent 76%);
  pointer-events: none;
}

/* Hero Centered Editorial Masthead & Acoustic Waveform Lockup */
.hero {
  position: relative;
  text-align: center;
  padding: 50px 0 0;
}

.hero-emblem-wrap {
  position: relative;
  display: flex;
  width: fit-content;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin: 0 auto 24px;
  cursor: pointer;
}

.emblem-wave {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  height: 40px;
}

.emblem-wave i {
  display: block;
  width: 3px;
  height: var(--h, 18px);
  border-radius: 999px;
  opacity: 0.72;
  transform-origin: center;
  animation: wave-breathe 2.1s cubic-bezier(0.45, 0.05, 0.55, 0.95) var(--d, 0ms) infinite alternate;
  transition: opacity 0.25s ease;
}

.emblem-wave i.w-dad {
  background: linear-gradient(180deg, rgba(168, 107, 20, 0.45), #b87a1c, rgba(168, 107, 20, 0.45));
}

.emblem-wave i.w-child {
  background: linear-gradient(180deg, rgba(190, 67, 90, 0.42), #cc5269, rgba(190, 67, 90, 0.42));
}

.emblem-wave i.w-agent {
  background: linear-gradient(180deg, rgba(37, 87, 240, 0.42), #2557f0, rgba(37, 87, 240, 0.42));
}

.hero-emblem-wrap:hover .emblem-wave i {
  opacity: 0.95;
}

@keyframes wave-breathe {
  0% {
    transform: scaleY(0.36);
    opacity: 0.45;
  }
  100% {
    transform: scaleY(1);
    opacity: 0.9;
  }
}

#hero-emblem {
  position: relative;
  width: 82px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 6px 16px rgba(37, 87, 240, 0.16));
}

#hero-emblem path {
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.4;
  stroke-linejoin: round;
  transition: fill 0.32s ease, transform 0.36s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: 218px 270px;
}

/* Subtle multi-voice tonal hierarchy at rest (breaks monochrome trefoil look) */
#hero-emblem path[data-identity="dad"] {
  fill: #3e6ef2;
}

#hero-emblem path[data-identity="child"] {
  fill: #648bf7;
}

#hero-emblem path[data-identity="agent"] {
  fill: #1f4bd4;
}

/* Hovering the emblem reveals the 3-voice triad before scrolling */
.hero-emblem-wrap:hover #hero-emblem path[data-identity="dad"] {
  fill: var(--dad);
  transform: translate(2px, -3px);
}

.hero-emblem-wrap:hover #hero-emblem path[data-identity="child"] {
  fill: var(--child);
  transform: translate(-3px, 1px);
}

.hero-emblem-wrap:hover #hero-emblem path[data-identity="agent"] {
  fill: var(--agent);
  transform: translate(2px, 3px);
}

.hero-stagger {
  animation: hero-rise 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-stagger.s1 { animation-delay: 40ms; }
.hero-stagger.s2 { animation-delay: 100ms; }
.hero-stagger.s3 { animation-delay: 160ms; }
.hero-stagger.s4 { animation-delay: 220ms; }
.hero-stagger.s5 { animation-delay: 290ms; }

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 580;
  line-height: 1;
  color: var(--ink-2);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  padding: 8px 15px;
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 10px rgba(37, 87, 240, 0.06);
}

.release-pill:hover {
  color: var(--blue-deep);
  border-color: #9cb6ff;
  background: var(--blue-soft);
  transform: translateY(-1px);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(37, 87, 240, 0.55);
}

.pill-divider {
  width: 1px;
  height: 11px;
  background: rgba(15, 23, 42, 0.14);
}

.hero h1 {
  font-size: clamp(44px, 6.2vw, 76px);
  line-height: 1.05;
  letter-spacing: -3px;
  font-weight: 700;
  margin: 0 auto 20px;
  color: var(--ink);
}

.hero h1 span {
  background: linear-gradient(92deg, #1d4ed8 0%, #2557f0 52%, #a86b14 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description {
  font-size: 18px;
  line-height: 1.62;
  color: var(--muted);
  margin: 0 auto 12px;
  max-width: 680px;
}

.hero-description em {
  font-style: normal;
  color: var(--ink);
  font-weight: 630;
}

.paper-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-2);
  margin: 0 auto 26px;
}

.hero .actions {
  justify-content: center;
  gap: 10px;
}

.hero .primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(37, 87, 240, 0.24);
}

.hero .primary:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(37, 87, 240, 0.3);
}

.hero-secondary {
  border-color: var(--blue-border);
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.hero-secondary:hover {
  border-color: #9eb8ff;
  background: #e1ebff;
  color: var(--blue-deep);
  transform: translateY(-2px);
}

.hero-ghost {
  border-color: var(--line-strong);
  color: var(--ink-2);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hero-ghost:hover {
  border-color: #acc2ff;
  color: var(--blue);
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.hero-scale {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(10px);
}

.scale-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: 8px;
  border-right: 1px solid var(--line);
}

.scale-item:last-child {
  border-right: 0;
}

.scale-item strong {
  font-size: 30px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.scale-item span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-top: 3px;
}

.scale-item small {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

/* Interactive Shared-Ride Timeline — Compact Studio Instrument (Fits 100% in Laptop Viewport) */
.experience {
  margin-top: 48px;
  padding-top: 22px;
  scroll-margin-top: 0;
  position: relative;
}

.experience-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 14px;
}

.experience-heading .eyebrow {
  margin-bottom: 4px;
}

.experience-heading h2 {
  color: var(--ink);
  font-size: clamp(24px, 2.5vw, 31px);
  font-weight: 680;
}

.experience-heading > p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 440px;
  margin: 0;
}

.experience-heading > p strong {
  color: var(--ink);
  font-weight: 620;
}

.demo {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(13, 21, 38, 0.03), 0 22px 54px -14px rgba(19, 33, 68, 0.09);
  overflow: hidden;
}

.demo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafd;
  gap: 16px;
}

.demo-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.demo-title strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}

.demo-badge {
  font-size: 10.5px;
  font-weight: 640;
  color: var(--blue-deep);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  padding: 1px 8px;
  border-radius: 999px;
}

.demo-title > span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

.demo-playback-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.demo-status {
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.demo-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.demo[data-playing="true"] .demo-status::before {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.55);
}

#timeline-time {
  font: 600 12.5px var(--mono);
  color: var(--ink-2);
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  white-space: nowrap;
}

#timeline-time > span {
  color: var(--muted-2);
  font-weight: 450;
}

.timeline-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafd;
}

.timeline-canvas {
  position: relative;
  min-width: 1120px;
  height: 382px;
}

.time-grid {
  position: absolute;
  left: 96px;
  right: 24px;
  top: 38px;
  bottom: 26px;
  pointer-events: none;
}

.time-grid i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #eef2f8;
}

/* Overlap Zone Callouts */
.overlap-zones {
  position: absolute;
  left: 96px;
  right: 24px;
  top: 40px;
  bottom: 4px;
  pointer-events: none;
  z-index: 0;
}

.overlap-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  border-inline: 1px dashed rgba(190, 67, 90, 0.24);
  background: linear-gradient(180deg, rgba(190, 67, 90, 0.045), rgba(190, 67, 90, 0.01));
  transition: background 0.25s ease, border-color 0.25s ease;
}

.overlap-zone.zone-sidetalk {
  border-color: rgba(168, 107, 20, 0.24);
  background: linear-gradient(180deg, rgba(168, 107, 20, 0.045), rgba(168, 107, 20, 0.01));
}

.overlap-zone.zone-backchannel {
  border-color: rgba(168, 107, 20, 0.24);
  background: linear-gradient(180deg, rgba(168, 107, 20, 0.045), rgba(37, 87, 240, 0.018));
}

.overlap-zone.zone-active {
  border-color: rgba(190, 67, 90, 0.55);
  background: linear-gradient(180deg, rgba(190, 67, 90, 0.1), rgba(190, 67, 90, 0.02));
}

.overlap-zone.zone-sidetalk.zone-active,
.overlap-zone.zone-backchannel.zone-active {
  border-color: rgba(168, 107, 20, 0.55);
  background: linear-gradient(180deg, rgba(168, 107, 20, 0.105), rgba(168, 107, 20, 0.02));
}

.overlap-zone span {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font: 600 9.5px var(--mono);
  white-space: nowrap;
  color: var(--rose-ink);
  background: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--rose-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.overlap-zone.zone-sidetalk span,
.overlap-zone.zone-backchannel span {
  color: var(--gold-ink);
  border-color: var(--gold-border);
}

/* Scrubber Axis */
.time-axis {
  position: absolute;
  left: 96px;
  right: 24px;
  top: 14px;
  height: 34px;
  z-index: 6;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}

.time-baseline,
.time-elapsed {
  position: absolute;
  top: 20px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  pointer-events: none;
}

.time-baseline {
  right: 0;
  background: #dfe6f2;
}

.time-elapsed {
  width: 0;
  background: linear-gradient(90deg, #2557f0, #688eff);
}

.time-ticks {
  position: absolute;
  inset: 0 0 auto;
  font: 500 10.5px var(--mono);
  color: var(--muted-2);
  pointer-events: none;
}

.time-ticks span {
  position: absolute;
  left: var(--tick);
  top: 0;
}

.time-ticks span b {
  position: absolute;
  left: 0;
  top: -4px;
  transform: translateX(-50%);
  font: inherit;
  white-space: nowrap;
}

.time-ticks span:first-child b {
  transform: none;
}

.time-ticks span:last-child b {
  transform: translateX(-100%);
}

.time-ticks span::after {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  height: 7px;
  width: 1px;
  background: #cbd5e6;
}

.audio-strips {
  position: absolute;
  left: 0;
  right: 0;
  top: 2px;
  height: 30px;
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
}

.audio-segment {
  position: absolute;
  top: 16px;
  height: 8px;
  border-radius: 2px;
  background: var(--agent);
  opacity: 0.82;
}

.segment-dad {
  background: var(--dad);
}

.segment-child {
  background: var(--child);
}

.segment-stacked {
  top: 6px;
  opacity: 0.92;
}

.axis-handle {
  position: absolute;
  left: 0;
  top: 15px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: var(--blue);
  box-shadow: 0 2px 8px rgba(37, 87, 240, 0.42);
  pointer-events: none;
}

.time-cursor {
  position: absolute;
  left: 96px;
  top: 34px;
  bottom: 6px;
  width: 1.5px;
  background: linear-gradient(180deg, rgba(37, 87, 240, 0.75), rgba(37, 87, 240, 0.08));
  pointer-events: none;
  z-index: 5;
}

.time-cursor > b {
  position: absolute;
  top: 6px;
  left: 6px;
  font: 600 9.5px var(--mono);
  color: var(--blue-deep);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.time-cursor.cursor-end > b {
  left: auto;
  right: 6px;
}

/* Speaker Lanes & Avatars (Crisp Daylight Contrast) */
.timeline-lane {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid #f0f4fa;
}

.lane-dad {
  top: 50px;
  height: 88px;
  --person: var(--dad);
  --person-rgb: 168, 107, 20;
}

.lane-child {
  top: 140px;
  height: 88px;
  --person: var(--child);
  --person-rgb: 190, 67, 90;
}

.lane-agent {
  top: 230px;
  height: 122px;
  --person: var(--agent);
  --person-rgb: 37, 87, 240;
  border-bottom: 0;
}

.lane-label {
  position: sticky;
  left: 0;
  z-index: 4;
  flex-shrink: 0;
  width: 86px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
  background: linear-gradient(90deg, #ffffff 86%, rgba(255, 255, 255, 0));
  color: var(--person);
}

.lane-avatar {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: var(--identity-appearance, 0.94);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s ease, opacity 0.18s ease;
}

.lane-avatar svg.avatar-portrait {
  width: 30px;
  height: 30px;
  overflow: visible;
  fill: none;
}

.lane-avatar .avatar-silhouette {
  fill: rgba(var(--person-rgb), 0.1);
  stroke: currentColor;
  stroke-width: 1.4;
}

.lane-avatar .portrait-detail,
.lane-avatar .portrait-detail path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lane-avatar .portrait-detail circle {
  fill: currentColor;
  stroke: none;
}

.lane-speaking .lane-avatar {
  transform: scale(1.07);
  box-shadow: 0 0 0 4px rgba(var(--person-rgb), 0.15);
}

.speaker-levels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 7px;
  margin-top: 2px;
  opacity: 0.25;
}

.speaker-levels i {
  width: 2px;
  height: 6px;
  background: var(--person);
  border-radius: 1px;
  transform: scaleY(0.3);
  animation: speaker-level 0.38s calc(var(--level) * -73ms) ease-in-out infinite alternate;
  animation-play-state: paused;
}

.demo[data-playing="true"] .lane-speaking .speaker-levels {
  opacity: 0.95;
}

.demo[data-playing="true"] .lane-speaking .speaker-levels i {
  animation-play-state: running;
}

.lane-label strong {
  font-size: 11.5px;
  font-weight: 650;
  margin-top: 2px;
  line-height: 1.15;
}

.lane-label small {
  font-size: 9.5px;
  color: var(--muted-2);
}

.lane-track {
  position: absolute;
  left: 96px;
  right: 24px;
  top: 4px;
  bottom: 4px;
}

/* Utterance Cards — Clean Blueprint Before Delivery, Crisp Card When Delivered */
.timeline-event {
  position: absolute;
  top: 0;
  padding: 6px 10px;
  border: 1px dashed rgba(var(--person-rgb), 0.34);
  border-radius: 8px;
  background: rgba(var(--person-rgb), 0.03);
  opacity: 0.72;
  cursor: pointer;
  transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.timeline-event:hover {
  opacity: 0.88;
  border-color: rgba(var(--person-rgb), 0.48);
  background: rgba(var(--person-rgb), 0.045);
  transform: translateY(-1px);
}

.timeline-event.delivered {
  opacity: 1;
  border-style: solid;
  border-color: rgba(var(--person-rgb), 0.32);
  background: rgba(var(--person-rgb), 0.06);
}

.timeline-event.speaking {
  transform: translateY(-2px);
  border-color: rgba(var(--person-rgb), 0.72);
  background: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(var(--person-rgb), 0.16), 0 0 0 1px rgba(var(--person-rgb), 0.18);
}

.event-tag {
  font-size: 10px;
  font-weight: 660;
  line-height: 1.25;
  color: var(--person);
  display: block;
}

.timeline-event code {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  font: 600 9.5px/1.35 var(--mono);
  color: var(--blue-deep);
  white-space: normal;
  overflow-wrap: anywhere;
}

.timeline-event p {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink-2);
  margin: 3px 0 0;
}

.spoken-word,
.closing-quote {
  opacity: 0.68;
  transition: opacity 0.12s ease, color 0.12s ease;
}

.timeline-event.delivered .spoken-word:not(.revealed),
.timeline-event.delivered .closing-quote:not(.revealed) {
  opacity: 0.34;
}

.spoken-word.revealed,
.closing-quote.revealed {
  opacity: 1;
}

.timeline-event.speaking .spoken-word.word-current {
  color: var(--ink);
  font-weight: 650;
}

.interrupted-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--rose-soft);
  border: 1px solid var(--rose-border);
  font: 600 9px/1.35 var(--mono);
  color: var(--rose-ink);
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.interrupted-tag.shown {
  opacity: 1;
}

/* Single-Row Studio Telemetry HUD */
.demo-hud {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 20px;
  border-top: 1px solid var(--line);
  background: #fafbfe;
}

.thread-chip {
  gap: 8px;
}

.thread-pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: var(--gold-ink);
}

.thread-pin svg {
  width: 13px;
  height: 13px;
}

.thread-pin b {
  font-weight: 650;
  color: var(--ink-2);
}

.thread-line {
  position: relative;
  flex: 1;
  min-width: 24px;
  height: 4px;
  border-radius: 3px;
  background: #ede6d6;
  overflow: hidden;
}

.thread-line i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #c78b2c, #a86b14);
  width: 0;
}

.thread-badge {
  font: 600 10.5px var(--mono);
  color: var(--gold-ink) !important;
  white-space: nowrap;
}

.state-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

.state-chip strong {
  font-weight: 620;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-chip strong.positive {
  color: #0f766e;
}

.state-chip.state-mono strong {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--blue-deep);
}

.demo-insight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-block: 1px solid var(--line);
  background: #f3f6fc;
  min-height: 54px;
}

.insight-axis {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s ease;
}

.insight-axis[data-axis="T"] {
  color: var(--gold-ink);
  border-color: var(--gold-border);
  background: var(--gold-soft);
}

.insight-axis[data-axis="C"] {
  color: var(--rose-ink);
  border-color: var(--rose-border);
  background: var(--rose-soft);
}

.insight-body {
  min-width: 0;
  flex: 1;
}

.demo-insight strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  display: block;
}

.demo-insight p {
  font-size: 12.5px;
  line-height: 1.48;
  color: var(--muted);
  margin: 2px 0 0;
}

.step-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.step-pill {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--muted);
  font: 600 10.5px var(--mono);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
}

.step-pill:hover {
  border-color: #9cb4f5;
  color: var(--blue);
}

.step-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.step-counter {
  font: 600 11px var(--mono);
  color: var(--muted-2);
  white-space: nowrap;
}

/* Playback Controls */
.demo-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 20px;
  background: #ffffff;
}

.play-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  min-width: 88px;
  height: 33px;
  font-size: 12.5px;
  font-weight: 620;
  box-shadow: 0 2px 8px rgba(37, 87, 240, 0.22);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.16s ease;
}

.play-control:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
  transform: translateY(-1px);
}

.play-control > span:first-child {
  font-size: 10px;
  width: 11px;
}

.demo-timeline {
  flex: 1;
  min-width: 0;
}

#demo-progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: 4px;
  margin: 6px 0 8px;
  cursor: pointer;
  background: linear-gradient(to right, var(--blue) var(--progress, 0%), #dfe6f2 var(--progress, 0%));
}

#demo-progress::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: var(--blue);
  box-shadow: 0 1px 5px rgba(37, 87, 240, 0.4);
}

#demo-progress::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: var(--blue);
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted-2);
}

.replay-control {
  border: 1px solid var(--line-strong);
  background: #f8fafd;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.replay-control:hover {
  color: var(--blue);
  border-color: #9cb4f5;
  background: var(--blue-soft);
}

.demo-disclaimer {
  font-size: 11.5px;
  color: var(--muted-2);
  text-align: center;
  margin: 8px 0 0;
}

.demo[data-scrubbing="true"] .spoken-word,
.demo[data-scrubbing="true"] .closing-quote,
.demo[data-scrubbing="true"] .timeline-event {
  transition: none;
}

.demo[data-scrubbing="true"] .speaker-levels i {
  animation-play-state: paused;
}

/* Scroll Contour Morph Overlay */
.identity-morph {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 22;
  visibility: hidden;
  overflow: hidden;
}

.identity-piece {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  overflow: visible;
  fill: currentColor;
  will-change: transform;
}

.morphing-portrait path {
  fill: currentColor;
  stroke: currentColor;
  stroke-linejoin: round;
}

/* LEADERBOARD 2.0 */
.leaderboard-section {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.finding-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.finding-card {
  min-width: 0;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.finding-kicker {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.axis-kicker-a { background: var(--blue-soft); color: var(--blue-deep); border: 1px solid var(--blue-border); }
.axis-kicker-t { background: var(--gold-soft); color: var(--gold-ink); border: 1px solid var(--gold-border); }
.axis-kicker-c { background: var(--rose-soft); color: var(--rose-ink); border: 1px solid var(--rose-border); }

.finding-card > strong {
  display: block;
  font-size: 23px;
  font-weight: 720;
  letter-spacing: -0.7px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}

.finding-card > strong span {
  font-size: 14px;
  font-weight: 520;
  color: var(--muted-2);
}

.finding-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.54;
  color: var(--muted);
}

.finding-card p strong {
  color: var(--ink-2);
  font-weight: 640;
}

.finding-card code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 1px 4px;
  border-radius: 4px;
}

.rank-board {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.rank-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.toolbar-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: #edf1f8;
  border-radius: 9px;
  gap: 2px;
  max-width: 100%;
}

.segmented button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 620;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.segmented button small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.segmented button[aria-pressed="true"] {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.pure-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 620;
  transition: all 0.18s ease;
}

.pure-toggle:hover {
  border-color: #93b0f8;
  color: var(--ink);
}

.pure-toggle .pure-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.pure-toggle[aria-pressed="true"] {
  background: var(--rose-soft);
  border-color: var(--rose-border);
  color: var(--rose-ink);
}

.pure-toggle[aria-pressed="true"] .pure-dot {
  background: var(--rose-ink);
  box-shadow: 0 0 6px rgba(190, 67, 90, 0.45);
}

.metric-selector,
.rank-family {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 560;
  color: var(--muted);
}

select {
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 6px 30px 6px 11px;
  color: var(--ink);
  font-weight: 560;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23516079' stroke-width='1.6' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 9px center;
  font-size: 13px;
  max-width: 100%;
}

.rank-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
}

.search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: min(300px, 100%);
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f9fbfe;
  color: var(--muted-2);
}

.search:focus-within {
  border-color: #7c9dff;
  background: #ffffff;
}

.search svg {
  width: 15px;
  height: 15px;
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
}

.rank-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 22px 12px;
  font-size: 12px;
  color: var(--muted);
}

.rank-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rank-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}

.legend-proprietary { background: var(--blue); }
.legend-open { background: #6484b4; }
.legend-pure-ghost {
  background: rgba(37, 87, 240, 0.16);
  border: 1px dashed var(--blue);
}

.legend-caption {
  margin-left: auto;
  font-weight: 580;
  color: var(--ink-2);
}

/* Chart Rows */
.rank-chart {
  --model-col: 235px;
  --diag-col: 215px;
  padding: 0 22px 12px;
}

.chart-ruler {
  display: grid;
  grid-template-columns: var(--model-col) minmax(0, 1fr) var(--diag-col);
  align-items: center;
  gap: 16px;
  height: 28px;
  font-size: 10.5px;
  font-weight: 680;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
}

.ruler-diag {
  text-align: right;
}

.chart-scale {
  position: relative;
  height: 100%;
  margin-right: 54px;
}

.chart-scale > span {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  font-variant-numeric: tabular-nums;
}

.chart-scale > span:first-child { transform: none; }
.chart-scale > span:last-child { transform: translateX(-100%); }

.chart-rows {
  position: relative;
}

.chart-row {
  display: grid;
  grid-template-columns: var(--model-col) minmax(0, 1fr) var(--diag-col);
  align-items: center;
  gap: 16px;
  min-height: 44px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.045);
  transition: background 0.14s ease;
}

.chart-row:last-child {
  border-bottom: 0;
}

.chart-row:hover {
  background: #f7faff;
}

.chart-model-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.rank-num {
  font: 600 11.5px var(--mono);
  color: #8b9bb4;
  width: 20px;
  flex-shrink: 0;
}

.chart-model {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fam-tag {
  font-size: 10px;
  font-weight: 650;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.fam-tag.proprietary {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.fam-tag.open {
  background: #edf2f8;
  color: #475569;
}

.bar-slot {
  position: relative;
  height: 28px;
  margin-right: 54px;
  background: linear-gradient(90deg, #edf1f8 1px, transparent 1px);
  background-size: 25% 100%;
  display: flex;
  align-items: center;
}

.bar-ghost {
  position: absolute;
  left: 0;
  height: 15px;
  width: var(--ghost-score, 0%);
  background: rgba(37, 87, 240, 0.13);
  border: 1px dashed rgba(37, 87, 240, 0.45);
  border-radius: 0 4px 4px 0;
}

.bar-fill {
  position: relative;
  width: var(--score);
  min-width: 2px;
  height: 15px;
  background: linear-gradient(90deg, #2557f0, #5580ff);
  border-radius: 0 4px 4px 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.68s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s ease;
  transition-delay: var(--delay);
}

.bar-fill.open {
  background: linear-gradient(90deg, #5d7fa8, #83a3cb);
}

.bar-fill.pure-mode {
  background: linear-gradient(90deg, #1b43c4, #2557f0);
}

.bar-value {
  position: absolute;
  left: var(--label-pos, var(--score));
  margin-left: 8px;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 680;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.32s ease, transform 0.32s ease;
  transition-delay: calc(var(--delay) + 180ms);
}

.bar-delta {
  font-style: normal;
  font-size: 11px;
  font-weight: 660;
  color: var(--rose-ink);
  background: var(--rose-soft);
  border: 1px solid var(--rose-border);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 5px;
}

.rank-chart.is-expanded .bar-fill {
  transform: scaleX(1);
}

.rank-chart.is-expanded .bar-value {
  opacity: 1;
  transform: none;
}

.row-atc {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.atc-pill {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f5f8fc;
  color: #5a6982;
  border: 1px solid rgba(15, 23, 42, 0.06);
  white-space: nowrap;
}

.atc-pill b {
  font-weight: 670;
  color: #334155;
}

.atc-pill.active-metric {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue-deep);
}

.atc-pill.active-metric b {
  color: var(--blue-deep);
}

/* Table 2 Matrix View */
.table-view-pane {
  padding: 0;
}

.table-scroll {
  overflow-x: auto;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.matrix-table thead {
  background: #f6f9fd;
}

.matrix-table th,
.matrix-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  text-align: right;
}

.matrix-table thead .group-heading {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}

.matrix-table .model-heading {
  text-align: left !important;
  padding-left: 22px;
  position: sticky;
  left: 0;
  background: #f6f9fd;
  z-index: 3;
}

.matrix-table th.model-cell {
  text-align: left;
  padding-left: 22px;
  font-weight: 600;
  color: var(--ink);
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 2;
}

.matrix-table tr.family-row th {
  background: #eef2f9;
  text-align: left;
  padding: 7px 22px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #55647d;
}

.metric-sort {
  border: 0;
  background: transparent;
  font-size: 12.5px;
  font-weight: 650;
  color: #4b5970;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.metric-sort.active {
  color: var(--blue);
}

.sort-mark {
  font-size: 11px;
  opacity: 0.65;
}

.jts-cell,
.jts-head {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.pure-cell,
.pure-head {
  background: #fbfcfe;
  color: #334155;
}

.best {
  font-weight: 750;
}

.missing {
  color: #9ba6b8;
}

.track-separator {
  border-left: 1px solid var(--line);
}

/* Board Footer */
.rank-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
  font-size: 12.5px;
  color: var(--muted);
}

.export-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.text-button {
  background: none;
  border: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 620;
  padding: 4px 8px;
  border-radius: 6px;
}

.text-button:hover {
  background: var(--blue-soft);
}

.rank-note {
  font-size: 12.5px;
  color: var(--muted-2);
  margin: 12px 0 0;
  line-height: 1.55;
}

.rank-note a {
  color: var(--blue);
  font-weight: 560;
}

.chart-empty {
  padding: 36px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

@keyframes speaker-level {
  from { transform: scaleY(0.28); }
  to { transform: scaleY(1); }
}

/* Responsive Overrides */
@media (max-width: 960px) {
  .hero-scale {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .scale-item:nth-child(2) {
    border-right: 0;
  }
  .finding-strip {
    grid-template-columns: minmax(0, 1fr);
  }
  .rank-chart {
    --model-col: 190px;
  }
  .ruler-diag,
  .row-atc {
    display: none;
  }
  .chart-ruler,
  .chart-row {
    grid-template-columns: var(--model-col) minmax(0, 1fr);
  }
  .experience-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .experience-heading > p {
    max-width: none;
  }
  .demo-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .step-pills {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 34px;
  }
  #hero-emblem {
    width: 68px;
  }
  .hero-emblem-wrap {
    gap: 14px;
  }
  .emblem-wave {
    gap: 3.5px;
    height: 32px;
  }
  .emblem-wave i {
    width: 2.5px;
  }
  .release-pill {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 11px;
    padding: 7px 12px;
    line-height: 1.35;
    max-width: 100%;
  }
  .pill-divider {
    display: none;
  }
  .hero h1 {
    font-size: clamp(34px, 9.2vw, 44px);
    letter-spacing: -1.6px;
  }
  .hero-description {
    font-size: 15.5px;
  }
  .hero .actions .button {
    font-size: 13px;
    padding: 9px 13px;
    min-height: 40px;
  }
  .hero-scale {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 15px 12px;
    gap: 14px 10px;
  }
  .scale-item {
    border-right: 0;
    padding-inline: 4px;
  }
  .scale-item strong {
    font-size: 22px;
  }
  .scale-item small {
    font-size: 10.5px;
  }
  .demo-top {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 10px;
  }
  .demo-playback-info {
    width: 100%;
    justify-content: space-between;
  }
  .lane-label {
    width: 72px;
  }
  .demo-hud {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 14px;
  }
  .demo-insight,
  .demo-controls {
    padding-inline: 14px;
  }
  .timeline-labels span:nth-child(2),
  .timeline-labels span:nth-child(3) {
    display: none;
  }
  .rank-toolbar,
  .rank-filters {
    padding: 12px 16px;
  }
  .toolbar-group {
    width: 100%;
  }
  .search {
    width: 100%;
  }
  .rank-filters {
    flex-wrap: wrap;
  }
  .rank-chart {
    --model-col: 126px;
    padding-inline: 16px;
  }
  .fam-tag {
    display: none;
  }
  .bar-slot,
  .chart-scale {
    margin-right: 44px;
  }
  .legend-caption {
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js-motion [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .identity-morph {
    display: none !important;
  }
  .lane-avatar {
    opacity: 1 !important;
  }
  .bar-fill {
    transform: scaleX(1) !important;
  }
  .bar-value {
    opacity: 1 !important;
    transform: none !important;
  }
}
