/* ==========================================================================
   SAS × DealSheets landing page
   Everything is scoped to .dsx-page. No html/body or bare global selectors.
   WP: enqueue on this page only.
   ========================================================================== */


/* ==========================================================================
   Tokens
   ========================================================================== */
.dsx-page {
  --dsx-bg: #07090d;          /* near-black page background */
  --dsx-surface: #0e1218;     /* cards */
  --dsx-surface-2: #151a22;
  --dsx-border: rgba(255, 255, 255, 0.08);
  --dsx-border-strong: rgba(255, 255, 255, 0.14);
  --dsx-text: #e8ecf2;
  --dsx-muted: #8a93a3;
  --dsx-accent: #6e8bff;      /* DealSheets brand blue (periwinkle, brightened for dark bg) */
  --dsx-accent-glow: color-mix(in oklab, var(--dsx-accent) 35%, transparent);
  --dsx-navy: #0a1f6e;        /* app nav navy: screenshot browser chrome only, not a second accent */
  --dsx-danger: #ff6b6b;      /* churn / red flags only */
  --dsx-radius: 14px;
  --dsx-max: 1200px;
  --dsx-gutter: clamp(16px, 4vw, 32px);
  --dsx-font-sans: "Inter Tight", system-ui, sans-serif;
  --dsx-font-mono: "JetBrains Mono", ui-monospace, monospace;
  --dsx-ease: cubic-bezier(0.215, 0.61, 0.355, 1); /* ≈ power3.out, for CSS transitions */
}


/* ==========================================================================
   Base (scoped)
   ========================================================================== */
.dsx-page {
  position: relative;
  overflow-x: clip;
  background: var(--dsx-bg);
  color: var(--dsx-text);
  font-family: var(--dsx-font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.dsx-page :where(h1, h2, h3, h4, p, ul, ol, figure, blockquote) {
  margin: 0;
}

/* Component display rules must never beat the hidden attribute */
.dsx-page [hidden] {
  display: none !important;
}

.dsx-page :where(img, svg) {
  display: block;
  max-width: 100%;
  height: auto;
}

.dsx-page :where(a) {
  color: inherit;
}

.dsx-page :focus-visible {
  outline: 2px solid var(--dsx-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.dsx-page ::selection {
  background: var(--dsx-accent);
  color: var(--dsx-bg);
}


/* ==========================================================================
   Layout + utilities
   ========================================================================== */
.dsx-container {
  width: 100%;
  max-width: var(--dsx-max);
  margin-inline: auto;
  padding-inline: var(--dsx-gutter);
}

.dsx-section {
  position: relative;
  padding-block: clamp(72px, 10vw, 140px);
  isolation: isolate;
}

/* Faint 48px grid, faded out towards the section edges */
.dsx-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 100%);
}

.dsx-section--plain::before {
  content: none;
}

.dsx-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.dsx-muted {
  color: var(--dsx-muted);
}


/* ==========================================================================
   Type
   ========================================================================== */
.dsx-h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem); /* ~36px mobile → 72px desktop */
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.dsx-h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.dsx-h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.dsx-lead {
  max-width: 38em;
  color: var(--dsx-muted);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
}

.dsx-eyebrow {
  margin-bottom: 16px;
  color: var(--dsx-accent);
  font-family: var(--dsx-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dsx-mono-label {
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dsx-h1 + .dsx-lead,
.dsx-h2 + .dsx-lead {
  margin-top: 20px;
}

/* Centred section intro: eyebrow + H2 + lead */
.dsx-section-head {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.dsx-section-head .dsx-lead {
  margin-inline: auto;
}


/* ==========================================================================
   Buttons
   ========================================================================== */
.dsx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.dsx-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--dsx-font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--dsx-ease), background-color 0.2s var(--dsx-ease), border-color 0.2s var(--dsx-ease);
}

.dsx-btn:active {
  transform: translateY(1px);
}

.dsx-btn--primary {
  background: var(--dsx-accent);
  color: var(--dsx-bg);
}

/* Glow sits on a pseudo-element so hover only animates opacity */
.dsx-btn--primary::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 0 0 1px var(--dsx-accent), 0 8px 32px var(--dsx-accent-glow);
  opacity: 0;
  transition: opacity 0.25s var(--dsx-ease);
}

.dsx-btn--primary:hover::after,
.dsx-btn--primary:focus-visible::after {
  opacity: 1;
}

.dsx-btn--ghost {
  background: transparent;
  border-color: var(--dsx-border-strong);
  color: var(--dsx-text);
}

.dsx-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.28);
}

.dsx-btn--block {
  width: 100%;
}

@media (max-width: 479px) {
  .dsx-actions .dsx-btn {
    width: 100%;
  }
}


/* ==========================================================================
   Cards (cursor-following highlight via --dsx-mx / --dsx-my from JS)
   ========================================================================== */
.dsx-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--dsx-border);
  border-radius: var(--dsx-radius);
  background: var(--dsx-surface);
  overflow: hidden;
  isolation: isolate;
}

.dsx-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(360px circle at var(--dsx-mx, 50%) var(--dsx-my, 50%), color-mix(in oklab, var(--dsx-accent) 14%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--dsx-ease);
}

@media (hover: hover) and (pointer: fine) {
  .dsx-card:hover::before {
    opacity: 1;
  }
}

.dsx-card > * + * {
  margin-top: 8px;
}


/* ==========================================================================
   Browser frame (dark chrome around light app screenshots)
   ========================================================================== */
.dsx-browser {
  position: relative;
  border: 1px solid var(--dsx-border-strong);
  border-radius: var(--dsx-radius);
  background: var(--dsx-surface);
  box-shadow: 0 30px 80px -20px var(--dsx-accent-glow), 0 0 0 1px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.dsx-browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding-inline: 14px;
  border-bottom: 1px solid var(--dsx-border);
  background: var(--dsx-surface-2);
}

.dsx-browser__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.dsx-browser__url {
  flex: 1;
  max-width: 280px;
  margin-inline: auto;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--dsx-bg);
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 11px;
  text-align: center;
}

.dsx-browser__img {
  width: 100%;
}


/* ==========================================================================
   1. Hero
   ========================================================================== */
/* Soft accent glow behind the hero */
.dsx-hero::after {
  content: "";
  position: absolute;
  top: -10%;
  left: 50%;
  z-index: -2;
  width: min(1100px, 140vw);
  aspect-ratio: 1.6;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--dsx-accent) 22%, transparent), transparent);
  filter: blur(20px);
}

.dsx-cobrand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding: 8px 16px 8px 8px;
  border: 1px solid var(--dsx-border);
  border-radius: 999px;
  background: rgba(14, 18, 24, 0.6);
}

.dsx-cobrand__sas {
  width: 32px;
  height: 32px;
}

.dsx-cobrand__x {
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 14px;
}

.dsx-cobrand__ds {
  width: auto;
  height: 22px;
}

.dsx-hero {
  padding-top: clamp(48px, 8vw, 112px);
}

.dsx-hero__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .dsx-hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: clamp(40px, 5vw, 72px);
  }
}

.dsx-btn__icon {
  width: 14px;
  height: 14px;
}

/* --- Terminal panel --- */
.dsx-terminal {
  border: 1px solid var(--dsx-border-strong);
  border-radius: var(--dsx-radius);
  background: color-mix(in oklab, var(--dsx-surface) 88%, transparent);
  box-shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.3);
  font-family: var(--dsx-font-mono);
  overflow: hidden;
}

.dsx-terminal__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding-inline: 14px;
  border-bottom: 1px solid var(--dsx-border);
  background: var(--dsx-surface-2);
}

.dsx-terminal__title {
  margin-left: auto;
  margin-right: auto;
  padding-right: 42px; /* optically centre against the dots */
  color: var(--dsx-muted);
  font-size: 11px;
}

.dsx-terminal__body {
  padding: clamp(18px, 3vw, 28px);
}

.dsx-terminal__meta {
  color: var(--dsx-muted);
  font-size: 11px;
}

.dsx-terminal__line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 3.2em; /* room for a 2-line question so the card doesn't jump */
  margin-top: 14px;
  color: var(--dsx-text);
  font-size: clamp(14px, 0.8rem + 0.35vw, 16px);
  line-height: 1.6;
}

.dsx-terminal__prompt {
  flex: none;
  color: var(--dsx-accent);
}

.dsx-terminal__cursor {
  display: inline-block;
  flex: none;
  width: 0.55em;
  height: 1.1em;
  margin-left: -6px;
  background: var(--dsx-accent);
  transform: translateY(0.18em);
  animation: dsx-blink 1s steps(1) infinite;
}

@keyframes dsx-blink {
  50% { opacity: 0; }
}

/* --- Answer cards (stacked in one grid cell; JS cross-fades them) --- */
.dsx-answers {
  display: grid;
  margin-top: 18px;
}

.dsx-answer {
  grid-area: 1 / 1;
  padding: 20px;
  border: 1px solid var(--dsx-border);
  border-radius: 10px;
  background: var(--dsx-bg);
  color: var(--dsx-accent);
}

.dsx-answer--danger {
  color: var(--dsx-danger);
}

/* No JS / reduced motion: show the first answer only (full Q&A is in .dsx-sr-only) */
.dsx-terminal:not(.dsx-is-live) .dsx-answer:not(:first-child) {
  display: none;
}

.dsx-answer__label {
  color: var(--dsx-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dsx-answer__value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--dsx-text);
  font-size: clamp(28px, 1.2rem + 1.6vw, 36px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.dsx-answer--danger .dsx-answer__value {
  color: var(--dsx-danger);
}

.dsx-answer__meta {
  margin-top: 6px;
  color: var(--dsx-muted);
  font-size: 12px;
}

.dsx-answer__headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--dsx-text);
  font-family: var(--dsx-font-sans);
  font-size: 20px;
  font-weight: 600;
}

.dsx-answer__axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--dsx-muted);
  font-size: 10px;
}

.dsx-up {
  color: var(--dsx-accent);
}

.dsx-down {
  color: var(--dsx-danger);
}

.dsx-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid color-mix(in oklab, currentColor 40%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, currentColor 12%, transparent);
  color: var(--dsx-accent);
  font-family: var(--dsx-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Sparkline */
.dsx-spark {
  width: 100%;
  height: 72px;
  margin-top: 16px;
  overflow: visible;
}

.dsx-spark__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.dsx-spark__today,
.dsx-spark__bench {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

/* Horizontal bar with a threshold marker */
.dsx-bar {
  position: relative;
  height: 10px;
  margin-top: 22px;
  border-radius: 999px;
  background: var(--dsx-surface-2);
}

.dsx-bar__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  transform: scaleX(0.174);
  transform-origin: left center;
}

.dsx-bar__mark {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: var(--dsx-mark);
  width: 1px;
  background: rgba(255, 255, 255, 0.4);
}

/* Sits on the same row as .dsx-answer__axis, starting at the marker */
.dsx-bar__mark-label {
  position: absolute;
  top: calc(100% + 6px);
  left: calc(var(--dsx-mark) + 6px);
  color: var(--dsx-muted);
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
}

/* Score ring */
.dsx-score {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dsx-ring {
  position: relative;
  flex: none;
  width: 104px;
  height: 104px;
}

.dsx-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dsx-ring__track,
.dsx-ring__fill {
  fill: none;
  stroke-width: 7;
}

.dsx-ring__track {
  stroke: var(--dsx-surface-2);
}

.dsx-ring__fill {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-dasharray: 196 239; /* static 82% of 2πr; DrawSVG takes over when live */
}

.dsx-ring__value {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  color: var(--dsx-text);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.dsx-ring__value small {
  display: block;
  margin-top: 4px;
  color: var(--dsx-muted);
  font-size: 11px;
}

.dsx-score__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
  color: var(--dsx-muted);
  font-size: 11px;
}

.dsx-score__list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.dsx-score__list b {
  color: var(--dsx-text);
  font-weight: 500;
}

@media (max-width: 479px) {
  .dsx-score {
    align-items: flex-start;
  }

  .dsx-ring {
    width: 84px;
    height: 84px;
  }

  .dsx-ring__value {
    font-size: 22px;
  }

  .dsx-score__list {
    grid-template-columns: 1fr;
  }
}

/* --- Screenshot in browser chrome (tilt is applied from JS) --- */
.dsx-hero__shot {
  margin-top: clamp(56px, 8vw, 96px);
  perspective: 1600px;
}

.dsx-hero__shot .dsx-browser {
  max-width: 1040px;
  margin-inline: auto;
  transform-origin: 50% 0;
}

.dsx-hero__img {
  aspect-ratio: 935 / 620; /* crop to nav, KPI cards and the top of the chart */
  object-fit: cover;
  object-position: top;
}


/* ==========================================================================
   2. Integrations
   ========================================================================== */
/* Nodes sit over the SVG using viewBox units, so lines always meet them.
   Desktop viewBox 1100×380, mobile 360×640; sizes use cqw to scale with it. */
.dsx-flow {
  --dsx-vw: 1100;
  --dsx-vh: 380;
  position: relative;
  max-width: 1100px;
  margin: clamp(48px, 7vw, 80px) auto 0;
  aspect-ratio: 1100 / 380;
  container-type: inline-size;
}

.dsx-flow__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dsx-flow__svg--mobile {
  display: none;
}

.dsx-flow__path {
  fill: none;
  stroke: color-mix(in oklab, var(--dsx-accent) 45%, transparent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.dsx-flow__dot {
  fill: var(--dsx-accent);
}

.dsx-flow__dot-halo {
  fill: var(--dsx-accent);
  opacity: 0.22;
}

.dsx-flow__node {
  position: absolute;
  left: calc(var(--x) / var(--dsx-vw) * 100%);
  top: calc(var(--y) / var(--dsx-vh) * 100%);
  translate: -50% -50%; /* separate from transform so GSAP can animate y/scale */
  display: flex;
  align-items: center;
  gap: 1cqw;
  border: 1px solid var(--dsx-border-strong);
  border-radius: 12px;
  background: var(--dsx-surface);
}

.dsx-flow__node--source {
  width: calc(200 / 1100 * 100cqw);
  padding: 1.1cqw 1.3cqw;
}

/* Partner roundels: brand colours left as supplied */
.dsx-flow__logo {
  flex: none;
  width: 3.4cqw;
  height: auto;
  aspect-ratio: 1;
}

.dsx-flow__name {
  font-size: clamp(13px, 1.6cqw, 17px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dsx-flow__hub {
  flex-direction: column;
  gap: 1cqw;
  width: calc(240 / 1100 * 100cqw);
  padding: 2cqw 1.6cqw 1.6cqw;
  border-color: color-mix(in oklab, var(--dsx-accent) 50%, transparent);
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--dsx-accent) 8%, transparent), 0 16px 60px -10px var(--dsx-accent-glow);
}

.dsx-flow__hub img {
  width: 82%;
  height: auto;
}

.dsx-flow__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: clamp(10px, 1cqw, 12px);
}

.dsx-flow__pulse {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dsx-accent);
}

.dsx-flow__pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: dsx-pulse 1.8s ease-out infinite;
}

@keyframes dsx-pulse {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(3.2); opacity: 0; }
}

.dsx-flow__out {
  justify-content: space-between;
  width: calc(180 / 1100 * 100cqw);
  padding: 0.9cqw 1.3cqw;
  border-radius: 999px;
  font-family: var(--dsx-font-mono);
  font-size: clamp(11px, 1.1cqw, 13px);
}

.dsx-flow__out span {
  color: var(--dsx-muted);
}

.dsx-flow__out b {
  font-weight: 500;
}

/* Mobile: vertical diagram (matches the 900px motion breakpoint) */
@media (max-width: 899px) {
  .dsx-flow {
    --dsx-vw: 360;
    --dsx-vh: 640;
    max-width: 420px;
    aspect-ratio: 360 / 640;
  }

  .dsx-flow__svg--desktop {
    display: none;
  }

  .dsx-flow__svg--mobile {
    display: block;
  }

  .dsx-flow__node {
    left: calc(var(--mx) / var(--dsx-vw) * 100%);
    top: calc(var(--my) / var(--dsx-vh) * 100%);
    gap: 2.5cqw;
  }

  .dsx-flow__node--source {
    width: calc(150 / 360 * 100cqw);
    padding: 3cqw 3.4cqw;
  }

  .dsx-flow__logo {
    width: 9cqw;
  }

  .dsx-flow__hub {
    width: calc(220 / 360 * 100cqw);
    padding: 5cqw 4cqw 4cqw;
    gap: 3cqw;
  }

  .dsx-flow__out {
    width: calc(200 / 360 * 100cqw);
    padding: 2.4cqw 4.4cqw;
  }
}


/* ==========================================================================
   3. Meet the founder (video)
   ========================================================================== */
.dsx-founder__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .dsx-founder__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(40px, 6vw, 88px);
  }
}

/* --- Pull quote --- */
.dsx-quote {
  margin-top: 36px;
  padding-left: 20px;
  border-left: 2px solid var(--dsx-accent);
}

.dsx-quote blockquote {
  margin: 0;
}

.dsx-quote blockquote p {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.dsx-quote__by {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.dsx-quote__by b {
  font-weight: 600;
}

.dsx-quote__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--dsx-border-strong);
  border-radius: 50%;
  background: var(--dsx-surface-2);
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 12px;
}

/* --- Poster card (YouTube facade) --- */
.dsx-video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid var(--dsx-border-strong);
  border-radius: var(--dsx-radius);
  background: var(--dsx-surface);
  color: var(--dsx-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 30px 80px -30px var(--dsx-accent-glow);
}

.dsx-video__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--dsx-ease);
}

.dsx-video__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(7, 9, 13, 0.92) 0%, rgba(7, 9, 13, 0.25) 55%, rgba(7, 9, 13, 0.1) 100%);
}

.dsx-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(64px, 9vw, 84px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--dsx-accent);
  color: var(--dsx-bg);
  box-shadow: 0 0 0 10px color-mix(in oklab, var(--dsx-accent) 18%, transparent), 0 12px 40px var(--dsx-accent-glow);
  transition: transform 0.35s var(--dsx-ease);
}

.dsx-video__play svg {
  margin-left: 3px; /* optical centre for the triangle */
}

.dsx-video__meta {
  position: absolute;
  left: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 24px);
  display: grid;
  gap: 4px;
}

.dsx-video__kicker {
  color: var(--dsx-accent);
  font-family: var(--dsx-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dsx-video__title {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dsx-video__soon {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .dsx-video:not(.dsx-video--soon):hover .dsx-video__play {
    transform: scale(1.08);
  }

  .dsx-video:not(.dsx-video--soon):hover .dsx-video__img {
    transform: scale(1.03);
  }
}

/* "Coming soon" state while no YouTube URL is set */
.dsx-video--soon {
  border-style: dashed;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--dsx-surface);
  box-shadow: none;
  cursor: default;
}

.dsx-video--soon .dsx-video__play {
  background: var(--dsx-surface-2);
  color: var(--dsx-muted);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.03);
}

.dsx-video--soon .dsx-video__kicker {
  display: none;
}

.dsx-video--soon .dsx-video__soon {
  position: absolute;
  top: clamp(16px, 3vw, 24px);
  left: clamp(16px, 3vw, 28px);
  display: block;
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Modal --- */
.dsx-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: var(--dsx-gutter);
}

.dsx-modal[hidden] {
  display: none;
}

.dsx-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 9, 0.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dsx-modal__dialog {
  position: relative;
  width: min(1100px, 100%, (100vh - 120px) * 16 / 9);
}

.dsx-modal__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--dsx-border-strong);
  border-radius: var(--dsx-radius);
  background: #000 center / cover no-repeat;
  box-shadow: 0 40px 120px -20px var(--dsx-accent-glow);
  overflow: hidden;
}

.dsx-modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.dsx-modal__close {
  position: absolute;
  top: -52px;
  right: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--dsx-border-strong);
  border-radius: 50%;
  background: var(--dsx-surface);
  color: var(--dsx-text);
  cursor: pointer;
}

.dsx-modal__close:hover {
  background: var(--dsx-surface-2);
}


/* ==========================================================================
   4. The problem (signature)
   Static (no JS / reduced motion): copy steps listed, clean dashboard, screenshot below.
   .dsx-problem--pinned (desktop JS): steps stack, screenshot overlays the stage.
   .dsx-problem--stacked (mobile JS): messy "before" stage, then screenshot "after".
   ========================================================================== */
.dsx-problem__layout {
  display: grid;
  gap: 48px;
}

@media (min-width: 900px) {
  .dsx-problem__layout {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    align-items: center;
    gap: clamp(40px, 5vw, 72px);
  }
}

/* --- Copy steps --- */
.dsx-steps {
  position: relative;
  margin-top: 32px;
}

.dsx-steps__rail {
  display: none;
}

.dsx-steps__list {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dsx-step__num {
  margin-bottom: 8px;
  color: var(--dsx-accent);
  font-family: var(--dsx-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dsx-step__text {
  max-width: 34em;
  margin-top: 8px;
  color: var(--dsx-muted);
}

/* --- Visual: label + stage + screenshot --- */
.dsx-problem__label {
  display: grid;
  margin-bottom: 14px;
  font-family: var(--dsx-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dsx-problem__label > span {
  grid-area: 1 / 1;
}

.dsx-problem__label-today {
  display: none;
  color: var(--dsx-danger);
}

.dsx-problem__label-with,
.dsx-problem__after {
  color: var(--dsx-accent);
}

.dsx-problem__after {
  display: none;
  margin: 40px 0 14px;
  font-family: var(--dsx-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dsx-problem__canvas {
  position: relative;
}

.dsx-problem__shot {
  margin-top: 32px;
}

.dsx-problem__shot img {
  width: 100%;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5));
}

/* --- Stage: a 4-column dashboard grid that pieces snap into --- */
.dsx-stage {
  position: relative;
  aspect-ratio: 16 / 10.5;
  container-type: inline-size;
}

.dsx-stage__grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: 0.8fr 1.6fr 1.1fr;
  grid-template-areas:
    "k1 k2 k3 k4"
    "ch ch ch co"
    "tb tb mx mx";
  gap: 1.4cqw;
}

.dsx-piece {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.dsx-piece__clean {
  position: absolute;
  inset: 0;
}

/* Mess scraps are sized to their content and centred on the tile */
.dsx-piece__mess {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: max-content;
  max-width: 34cqw;
}

/* Clean dashboard tile */
.dsx-piece__clean {
  display: flex;
  flex-direction: column;
  gap: 0.5cqw;
  padding: 1.4cqw 1.6cqw;
  border: 1px solid var(--dsx-border-strong);
  border-radius: 8px;
  background: var(--dsx-surface);
  font-size: clamp(8px, 1.45cqw, 13px);
  line-height: 1.3;
  overflow: hidden;
}

.dsx-tile__label {
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 0.85em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dsx-tile__value {
  font-size: 2.1em;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.dsx-tile__delta {
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 0.8em;
  white-space: nowrap;
}

.dsx-tile__chart {
  flex: 1;
  width: 100%;
  min-height: 0;
  margin-top: 0.6cqw;
  overflow: visible;
}

.dsx-tile__line {
  fill: none;
  stroke: var(--dsx-accent);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.dsx-tile__prior {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

.dsx-tile__callout {
  position: absolute;
  top: 1.2cqw;
  right: 1.4cqw;
  padding: 0.3cqw 0.8cqw;
  border: 1px solid color-mix(in oklab, var(--dsx-accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, var(--dsx-accent) 12%, transparent);
  color: var(--dsx-accent);
  font-family: var(--dsx-font-mono);
  font-size: 0.82em;
  white-space: nowrap;
}

.dsx-tile__bar,
.dsx-tile__split {
  position: relative;
  height: max(5px, 0.8cqw);
  margin-block: 0.4cqw;
  border-radius: 999px;
  background: var(--dsx-surface-2);
  overflow: hidden;
}

.dsx-tile__split {
  background: color-mix(in oklab, var(--dsx-muted) 45%, transparent);
}

.dsx-tile__bar > span,
.dsx-tile__split > span {
  position: absolute;
  inset: 0;
  background: var(--dsx-accent);
  transform: scaleX(var(--v, 1));
  transform-origin: left center;
}

.dsx-tile__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 0.5cqw;
  border-top: 1px solid var(--dsx-border);
  white-space: nowrap;
}

.dsx-tile__row b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Messy "spreadsheet" layer: deliberately light and off-brand */
.dsx-sheet {
  display: flex;
  flex-direction: column;
  gap: 0.4cqw;
  padding: 0.8cqw 1cqw;
  border: 1px solid #b9c0cb;
  border-radius: 2px;
  background: #e9edf2;
  color: #1b2230;
  font-family: var(--dsx-font-mono);
  font-size: clamp(7px, 1.3cqw, 12px);
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.dsx-sheet__fx {
  padding-bottom: 0.4cqw;
  border-bottom: 1px solid #c5ccd6;
  color: #4a5568;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dsx-sheet__head {
  padding: 0.2cqw 0.5cqw;
  background: #d5dbe3;
  font-weight: 700;
}

.dsx-sheet__cell {
  font-size: 1.7em;
  font-weight: 600;
}

.dsx-sheet__cell--err {
  color: #c62828;
}

.dsx-sheet--table {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 0.3cqw 1.2cqw;
}

.dsx-sheet--csv {
  display: block;
  white-space: pre;
  line-height: 1.55;
}

.dsx-sheet--invoice {
  justify-content: center;
  background: #fff;
}

.dsx-note {
  display: flex;
  align-items: center;
  padding: 1.2cqw;
  background: #f6e27a;
  color: #3b3200;
  font-family: var(--dsx-font-mono);
  font-size: clamp(8px, 1.4cqw, 13px);
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Noise that only exists in the messy state */
.dsx-junk {
  position: absolute;
  left: calc(var(--jx) * 1%);
  top: calc(var(--jy) * 1%);
  translate: -50% -50%;
  rotate: calc(var(--jr) * 1deg); /* separate from transform so GSAP can scale/fade */
  padding: 0.5cqw 1cqw;
  border: 1px solid #f5b5b5;
  background: #fde8e8;
  font-family: var(--dsx-font-mono);
  font-size: clamp(8px, 1.3cqw, 12px);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.dsx-junk--tab {
  border: 0;
  border-radius: 4px 4px 0 0;
  background: #217346;
  color: #fff;
  font-weight: 500;
}

.dsx-junk--note {
  border: 0;
  background: #f6e27a;
  color: #3b3200;
  font-weight: 500;
}

/* No JS / reduced motion: clean state only */
.dsx-problem:not(.dsx-problem--live) .dsx-piece__mess,
.dsx-problem:not(.dsx-problem--live) .dsx-junk {
  display: none;
}

/* --- Desktop pinned --- */
.dsx-problem--pinned {
  padding-block: 0;
}

.dsx-problem--pinned .dsx-problem__pin {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-block: 48px;
}

.dsx-problem--pinned .dsx-steps {
  padding-left: 24px;
}

.dsx-problem--pinned .dsx-steps__rail {
  display: block;
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--dsx-border-strong);
  overflow: hidden;
}

.dsx-steps__fill {
  position: absolute;
  inset: 0;
  background: var(--dsx-accent);
  transform-origin: top center;
}

.dsx-problem--pinned .dsx-step {
  grid-area: 1 / 1;
}

.dsx-problem--pinned .dsx-problem__label-today {
  display: block;
}

.dsx-problem--pinned .dsx-problem__shot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
}

/* --- Mobile stacked before/after --- */
.dsx-problem--stacked .dsx-problem__label-today,
.dsx-problem--stacked .dsx-problem__after {
  display: block;
}

.dsx-problem--stacked .dsx-problem__label-with {
  display: none;
}

.dsx-problem--stacked .dsx-problem__shot {
  margin-top: 0;
}


/* ==========================================================================
   5. Metrics bento
   ========================================================================== */
.dsx-bento {
  display: grid;
  gap: 16px;
  margin-top: clamp(48px, 7vw, 72px);
}

@media (min-width: 600px) {
  .dsx-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: dense; /* fill the gap beside NRR on tablet */
  }

  .dsx-bento__tile--arr,
  .dsx-bento__tile--mix,
  .dsx-bento__tile--cat,
  .dsx-bento__tile--arpc {
    grid-column: span 2;
  }
}

@media (min-width: 900px) {
  .dsx-bento {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "arr  arr  mix   mix"
      "arr  arr  churn ups"
      "nrr  cat  cat   cust"
      "arpc cat  cat   cust";
  }

  .dsx-bento__tile--arr,
  .dsx-bento__tile--mix,
  .dsx-bento__tile--cat,
  .dsx-bento__tile--arpc {
    grid-column: auto;
  }

  .dsx-bento__tile--arr { grid-area: arr; }
  .dsx-bento__tile--mix { grid-area: mix; }
  .dsx-bento__tile--churn { grid-area: churn; }
  .dsx-bento__tile--ups { grid-area: ups; }
  .dsx-bento__tile--nrr { grid-area: nrr; }
  .dsx-bento__tile--cat { grid-area: cat; }
  .dsx-bento__tile--cust { grid-area: cust; }
  .dsx-bento__tile--arpc { grid-area: arpc; }
}

.dsx-bento__tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dsx-bento__kicker {
  color: var(--dsx-accent);
  font-family: var(--dsx-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dsx-bento__value {
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.dsx-bento__tile--arr .dsx-bento__value {
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
}

.dsx-bento__meta {
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 12px;
}

.dsx-bento__axis {
  display: flex;
  justify-content: space-between;
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 10px;
}

.dsx-bento__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--dsx-muted);
  font-size: 0.875rem;
}

.dsx-bento__legend b {
  margin-left: 6px;
  color: var(--dsx-text);
  font-family: var(--dsx-font-mono);
  font-weight: 500;
}

.dsx-bento__legend--list {
  flex-direction: column;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.dsx-bento__legend--list li {
  display: flex;
  align-items: center;
}

.dsx-bento__legend--list b {
  margin-left: auto;
}

.dsx-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 2px;
  background: color-mix(in oklab, var(--dsx-muted) 50%, transparent);
}

.dsx-dot--accent {
  background: var(--dsx-accent);
}

.dsx-dot--mid {
  background: color-mix(in oklab, var(--dsx-accent) 50%, var(--dsx-surface-2));
}

/* ARR chart */
.dsx-bento__chart {
  flex: 1;
  width: 100%;
  min-height: 160px;
  margin-top: 20px;
  overflow: visible;
}

.dsx-bento__gridline {
  stroke: var(--dsx-border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.dsx-bento__line {
  fill: none;
  stroke: var(--dsx-accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.dsx-bento__prior {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
}

/* Recurring split bar */
.dsx-split {
  position: relative;
  height: 28px;
  margin-top: auto;
  padding-top: 0;
  border-radius: 6px;
  background: color-mix(in oklab, var(--dsx-muted) 35%, transparent);
  overflow: hidden;
}

.dsx-bento__tile--mix .dsx-split {
  margin-top: 24px;
}

.dsx-split__a {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, color-mix(in oklab, var(--dsx-accent) 70%, var(--dsx-surface)), var(--dsx-accent));
  transform: scaleX(var(--v, 1));
  transform-origin: left center;
}

/* Churn mini bars */
.dsx-minibars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
  margin-top: auto;
}

.dsx-minibars span {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: var(--dsx-accent);
  transform-origin: bottom center;
}

.dsx-minibars--danger span {
  background: color-mix(in oklab, var(--dsx-danger) 75%, transparent);
}

.dsx-minibars--danger span:last-child {
  background: var(--dsx-danger);
}

/* Upsell / downsell */
.dsx-movers {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 0;
  list-style: none;
}

.dsx-movers li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  column-gap: 10px;
}

.dsx-movers__arrow {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: color-mix(in oklab, currentColor 14%, transparent);
  font-size: 12px;
}

.dsx-movers__label {
  color: var(--dsx-muted);
  font-size: 0.8125rem;
}

.dsx-movers b {
  font-family: var(--dsx-font-mono);
  font-size: 1.0625rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* NRR ring */
.dsx-nrr {
  position: relative;
  width: min(150px, 100%);
  margin: 16px auto 4px;
}

.dsx-nrr__ring {
  width: 100%;
  transform: rotate(-90deg);
}

.dsx-nrr .dsx-ring__track,
.dsx-nrr .dsx-ring__fill {
  stroke-width: 9;
}

.dsx-nrr .dsx-ring__fill {
  stroke: var(--dsx-accent);
}

.dsx-nrr__tick {
  stroke: var(--dsx-text);
  stroke-width: 2;
  stroke-linecap: round;
}

.dsx-nrr__value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--dsx-font-mono);
  font-size: 1.375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.dsx-bento__tile--nrr .dsx-bento__meta {
  text-align: center;
}

/* Stacked category columns */
.dsx-stack {
  display: flex;
  align-items: flex-end;
  flex: 1 1 180px; /* grows to fill the tall tile on desktop */
  gap: clamp(10px, 3vw, 28px);
  min-height: 180px;
  margin-top: 0;
  padding-top: 24px;
}

.dsx-stack__col {
  display: flex;
  flex: 1;
  flex-direction: column;
  height: var(--h);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  transform-origin: bottom center;
}

.dsx-stack__col span {
  height: var(--s);
}

.dsx-stack__col span:nth-child(1) {
  background: color-mix(in oklab, var(--dsx-muted) 50%, transparent);
}

.dsx-stack__col span:nth-child(2) {
  background: color-mix(in oklab, var(--dsx-accent) 50%, var(--dsx-surface-2));
}

.dsx-stack__col span:nth-child(3) {
  background: var(--dsx-accent);
}

.dsx-bento__tile--cat .dsx-bento__axis {
  justify-content: space-around;
  margin-top: 8px;
}

.dsx-bento__tile--cat .dsx-bento__legend {
  margin-top: 16px;
}

/* Customer dot grid */
.dsx-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  margin-top: auto;
  padding-top: 20px;
}

.dsx-dots i {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--dsx-surface-2);
}

.dsx-dots .dsx-dots__on {
  background: color-mix(in oklab, var(--dsx-accent) 55%, var(--dsx-surface-2));
}

.dsx-dots .dsx-dots__new {
  background: var(--dsx-accent);
  box-shadow: 0 0 10px var(--dsx-accent-glow);
}

@media (min-width: 600px) and (max-width: 899px) {
  .dsx-dots {
    grid-template-columns: repeat(12, 1fr);
  }
}

.dsx-bento__tile--cust .dsx-bento__axis {
  margin-top: 10px;
}

.dsx-bento__tile--arpc .dsx-bento__value {
  margin-top: auto;
}


/* ==========================================================================
   6. Founder vs investor view
   .dsx-lens--investor swaps grid areas and which visuals show; JS Flips between them.
   ========================================================================== */
.dsx-lens {
  margin-top: clamp(40px, 6vw, 64px);
}

/* --- Segmented toggle --- */
.dsx-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(360px, 100%);
  margin: 0 auto 24px;
  padding: 4px;
  border: 1px solid var(--dsx-border-strong);
  border-radius: 999px;
  background: var(--dsx-surface);
}

/* No JS: the toggle can't work, so the founder view stands on its own */
.dsx-page:not(.dsx-js) .dsx-toggle {
  display: none;
}

.dsx-toggle__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--dsx-accent);
  box-shadow: 0 6px 24px var(--dsx-accent-glow);
}

.dsx-toggle__btn {
  position: relative;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dsx-muted);
  font: 600 0.9375rem/1 var(--dsx-font-sans);
  cursor: pointer;
  transition: color 0.3s var(--dsx-ease);
}

.dsx-toggle__btn[aria-selected="true"] {
  color: var(--dsx-bg);
}

/* --- Panel --- */
.dsx-lens__panel {
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid var(--dsx-border-strong);
  border-radius: calc(var(--dsx-radius) + 6px);
  background: color-mix(in oklab, var(--dsx-surface) 60%, transparent);
}

.dsx-lens__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 14px;
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 11px;
}

.dsx-lens__caption {
  color: var(--dsx-accent);
}

.dsx-lens__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "a a"
    "b c"
    "d e"
    "f f";
  gap: 12px;
}

.dsx-lens--investor .dsx-lens__grid {
  grid-template-areas:
    "f f"
    "a a"
    "b c"
    "e e"
    "d d";
}

@media (max-width: 899px) {
  .dsx-lens .dsx-lens__label {
    white-space: normal;
  }
}

@media (min-width: 900px) {
  .dsx-lens__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(150px, auto));
    grid-template-areas:
      "a a b c"
      "a a d e"
      "f f f f";
  }

  .dsx-lens--investor .dsx-lens__grid {
    grid-template-areas:
      "f f a a"
      "f f b c"
      "e e d d";
  }
}

.dsx-lens__card--a { grid-area: a; }
.dsx-lens__card--b { grid-area: b; }
.dsx-lens__card--c { grid-area: c; }
.dsx-lens__card--d { grid-area: d; }
.dsx-lens__card--e { grid-area: e; }
.dsx-lens__card--f { grid-area: f; }

.dsx-lens__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid var(--dsx-border);
  border-radius: var(--dsx-radius);
  background: var(--dsx-surface);
  overflow: hidden;
}

.dsx-lens__label {
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dsx-lens__value {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dsx-lens__card--a .dsx-lens__value {
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
}

.dsx-lens__unit {
  display: none;
  margin-left: 4px;
  color: var(--dsx-muted);
  font-size: 0.5em;
  font-weight: 500;
}

.dsx-lens__sub {
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 12px;
}

.dsx-lens__sub.dsx-up {
  color: var(--dsx-accent);
}

.dsx-lens__sub.dsx-down {
  color: var(--dsx-danger);
}

.dsx-lens__chart {
  flex: 1;
  width: 100%;
  min-height: 70px;
  margin-top: 12px;
  overflow: visible;
}

/* F: monthly bars (founder) vs score ring (investor) */
.dsx-lens__card--f {
  flex-direction: row;
  align-items: flex-end;
  gap: 24px;
}

.dsx-lens__f-copy {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 6px;
}

.dsx-lens__bars {
  flex: 1;
  height: 64px;
  margin-top: 0;
}

.dsx-lens__ring {
  display: none;
  width: min(180px, 42%);
  margin-left: auto;
  transform: rotate(-90deg);
}

.dsx-lens__ring .dsx-ring__track,
.dsx-lens__ring .dsx-ring__fill {
  stroke-width: 9;
}

.dsx-lens__ring .dsx-ring__fill {
  stroke: var(--dsx-accent);
}

.dsx-lens--investor .dsx-lens__card--f {
  align-items: center;
}

.dsx-lens--investor .dsx-lens__bars {
  display: none;
}

.dsx-lens--investor .dsx-lens__ring,
.dsx-lens--investor .dsx-lens__unit {
  display: inline-block;
}

@media (max-width: 599px) {
  .dsx-lens__card--f {
    flex-direction: column;
    align-items: stretch;
  }

  .dsx-lens__bars {
    flex: none;
    width: 100%;
  }

  .dsx-lens--investor .dsx-lens__card--f {
    align-items: stretch;
  }

  .dsx-lens__ring {
    width: 120px;
    margin: 4px auto 0;
  }
}

@media (min-width: 900px) {
  /* Investor: score card is the big one, so stack its copy over the ring */
  .dsx-lens--investor .dsx-lens__card--f {
    flex-direction: column;
    justify-content: space-between;
  }

  .dsx-lens--investor .dsx-lens__card--f .dsx-lens__f-copy {
    align-self: stretch;
  }

  .dsx-lens--investor .dsx-lens__ring {
    width: min(220px, 55%);
    margin: 0 auto;
  }

  .dsx-lens--investor .dsx-lens__card--f .dsx-lens__value {
    font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  }
}

/* --- Investor read-out lists --- */
.dsx-readout {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 900px) {
  .dsx-readout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dsx-readout__col {
  padding: 20px 22px;
  border: 1px solid var(--dsx-border);
  border-radius: var(--dsx-radius);
  background: var(--dsx-surface);
}

.dsx-readout__title {
  margin-bottom: 12px;
  color: var(--dsx-text);
  font-family: var(--dsx-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dsx-readout__title.dsx-up {
  color: var(--dsx-accent);
}

.dsx-readout__title.dsx-down {
  color: var(--dsx-danger);
}

.dsx-readout ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--dsx-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.dsx-readout li {
  position: relative;
  padding-left: 16px;
}

.dsx-readout li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 6px;
  height: 1px;
  background: var(--dsx-muted);
}


/* ==========================================================================
   7. Who it's for (deliberately quiet)
   ========================================================================== */
.dsx-audience__grid {
  display: grid;
  gap: 16px;
  margin-top: clamp(40px, 6vw, 64px);
}

@media (min-width: 600px) {
  .dsx-audience__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .dsx-audience__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dsx-audience__card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
}

.dsx-card.dsx-audience__card > * + * {
  margin-top: 12px;
}

.dsx-audience__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border: 1px solid color-mix(in oklab, var(--dsx-accent) 30%, transparent);
  border-radius: 10px;
  background: color-mix(in oklab, var(--dsx-accent) 10%, transparent);
  color: var(--dsx-accent);
}

.dsx-audience__icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dsx-audience__text {
  color: var(--dsx-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.dsx-card.dsx-audience__card > .dsx-audience__tags {
  margin-top: auto;
  padding-top: 20px;
}

.dsx-audience__tags {
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}


/* ==========================================================================
   8. Proof
   ========================================================================== */
.dsx-proof__card {
  position: relative;
  display: grid;
  margin-top: clamp(40px, 6vw, 64px);
  border: 1px solid var(--dsx-border-strong);
  border-radius: calc(var(--dsx-radius) + 6px);
  background: var(--dsx-surface);
  overflow: hidden;
  isolation: isolate;
}

@media (min-width: 900px) {
  .dsx-proof__card {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  }
}

.dsx-proof__quote {
  position: relative;
  margin: 0;
  padding: clamp(28px, 5vw, 56px);
}

.dsx-proof__mark {
  position: absolute;
  top: clamp(4px, 1vw, 12px);
  left: clamp(16px, 3vw, 36px);
  z-index: -1;
  color: color-mix(in oklab, var(--dsx-accent) 22%, transparent);
  font-family: Georgia, serif;
  font-size: clamp(120px, 14vw, 180px);
  line-height: 1;
}

.dsx-proof__quote blockquote {
  margin: 0;
}

.dsx-proof__quote blockquote p {
  font-size: clamp(1.375rem, 1.05rem + 1.2vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.dsx-proof__quote .dsx-quote__by {
  margin-top: 28px;
}

.dsx-proof__stat {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: clamp(28px, 5vw, 56px);
  border-top: 1px solid var(--dsx-border);
  background: radial-gradient(circle at 30% 40%, color-mix(in oklab, var(--dsx-accent) 14%, transparent), transparent 70%);
}

@media (min-width: 900px) {
  .dsx-proof__stat {
    border-top: 0;
    border-left: 1px solid var(--dsx-border);
  }
}

.dsx-proof__num {
  color: var(--dsx-text);
  font-family: var(--dsx-font-mono);
  font-size: clamp(4rem, 2.5rem + 6vw, 7.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.dsx-proof__num > span:first-child {
  background: linear-gradient(180deg, var(--dsx-text), var(--dsx-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dsx-proof__label {
  max-width: 18em;
  color: var(--dsx-muted);
  font-size: 1.0625rem;
  line-height: 1.5;
}


/* Trust row */
.dsx-proof__trust {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  text-align: center;
}

.dsx-proof__trust-line {
  color: var(--dsx-muted);
  font-family: var(--dsx-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dsx-proof__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Logo + name pairs (Xero, QuickBooks, SAS) */
.dsx-proof__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: left;
}

.dsx-proof__brand img {
  flex: none;
  width: 32px;
  height: 32px;
}


/* ==========================================================================
   9. Book a demo
   ========================================================================== */
.dsx-demo::after {
  /* soft glow behind the form, echoing the hero */
  content: "";
  position: absolute;
  right: -10%;
  bottom: 0;
  z-index: -2;
  width: min(900px, 120vw);
  aspect-ratio: 1.4;
  pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--dsx-accent) 16%, transparent), transparent);
}

.dsx-demo__grid {
  display: grid;
  gap: 48px;
  align-items: start;
}

@media (min-width: 900px) {
  .dsx-demo__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(40px, 6vw, 88px);
  }

  .dsx-demo__intro {
    position: sticky;
    top: 96px; /* WP: allow for the theme's sticky header */
  }
}

/* --- Terminal echo --- */
.dsx-echo {
  margin-top: 32px;
  border: 1px solid var(--dsx-border-strong);
  border-radius: var(--dsx-radius);
  background: var(--dsx-surface);
  font-family: var(--dsx-font-mono);
  overflow: hidden;
}

.dsx-echo__body {
  padding: clamp(18px, 3vw, 26px);
}

.dsx-echo__cmd {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
}

.dsx-echo__head {
  margin-top: 18px;
  color: var(--dsx-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dsx-echo__list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--dsx-font-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.dsx-echo__list li {
  display: flex;
  gap: 10px;
}

.dsx-echo__tick {
  flex: none;
  color: var(--dsx-accent);
  font-family: var(--dsx-font-mono);
}

.dsx-demo__trust {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--dsx-muted);
  font-size: 0.875rem;
}

.dsx-demo__trust img {
  width: 28px;
  height: 28px;
}

/* --- Form card --- */
.dsx-form-card {
  position: relative;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid color-mix(in oklab, var(--dsx-accent) 38%, transparent);
  border-radius: calc(var(--dsx-radius) + 4px);
  background: var(--dsx-surface);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--dsx-accent) 6%, transparent), 0 40px 100px -40px var(--dsx-accent-glow);
  overflow: hidden;
}

/* Thin accent highlight along the top edge */
.dsx-form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--dsx-accent), transparent);
}

.dsx-demo__contact {
  margin-top: 16px;
  color: var(--dsx-muted);
  font-size: 0.875rem;
  text-align: center;
}

.dsx-demo__contact a {
  color: var(--dsx-text);
  text-underline-offset: 3px;
}

/* --- Form fields ---
   WP: these selectors already include .gform_wrapper, so a Gravity Forms embed
   inside .dsx-page inherits the look. For WPForms add .wpforms-container alongside. */
.dsx-page :is(.dsx-form, .gform_wrapper) {
  display: grid;
  gap: 18px;
}

.dsx-form__row {
  display: grid;
  gap: 18px;
}

@media (min-width: 600px) {
  .dsx-form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dsx-field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.dsx-page :is(.dsx-form, .gform_wrapper) label {
  color: var(--dsx-text);
  font-size: 0.875rem;
  font-weight: 500;
}

.dsx-field__opt {
  color: var(--dsx-muted);
  font-weight: 400;
}

.dsx-page :is(.dsx-form, .gform_wrapper) :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--dsx-border-strong);
  border-radius: 10px;
  background: var(--dsx-bg);
  color: var(--dsx-text);
  font: 400 1rem/1.4 var(--dsx-font-sans); /* 16px stops iOS zooming on focus */
  transition: border-color 0.2s var(--dsx-ease), background-color 0.2s var(--dsx-ease);
}

.dsx-page :is(.dsx-form, .gform_wrapper) textarea {
  min-height: 96px;
  resize: vertical;
}

.dsx-page :is(.dsx-form, .gform_wrapper) select {
  padding-right: 40px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a93a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

/* The "Select one" default option reads muted until a real option is chosen */
.dsx-page :is(.dsx-form, .gform_wrapper) select:has(option[value=""]:checked) {
  color: var(--dsx-muted);
}

.dsx-page :is(.dsx-form, .gform_wrapper) option {
  background: var(--dsx-surface);
  color: var(--dsx-text);
}

.dsx-page :is(.dsx-form, .gform_wrapper) :is(input, select, textarea):hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.dsx-page :is(.dsx-form, .gform_wrapper) :is(input, select, textarea):focus {
  border-color: var(--dsx-accent);
  outline: 2px solid color-mix(in oklab, var(--dsx-accent) 35%, transparent);
  outline-offset: 1px;
}

/* Same specificity as the field rules above, and later, so it wins (incl. hover/focus) */
.dsx-page :is(.dsx-form, .gform_wrapper) :is(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--dsx-danger);
}

.dsx-field__error {
  min-height: 0;
  color: var(--dsx-danger);
  font-size: 0.8125rem;
}

.dsx-field__error:empty {
  display: none;
}

/* Checkboxes */
.dsx-field--check {
  grid-template-columns: 20px 1fr;
  column-gap: 12px;
  align-items: start;
}

.dsx-field--check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--dsx-accent);
  cursor: pointer;
}

.dsx-page :is(.dsx-form, .gform_wrapper) .dsx-field--check label {
  color: var(--dsx-muted);
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}

.dsx-field--check label a {
  color: var(--dsx-text);
  text-underline-offset: 3px;
}

.dsx-field--check .dsx-field__error {
  grid-column: 2;
}

.dsx-field--check input[aria-invalid="true"] {
  outline: 2px solid var(--dsx-danger);
  outline-offset: 2px;
}

/* Submit + loading state */
.dsx-form__submit {
  margin-top: 6px;
  min-height: 52px;
}

.dsx-form__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in oklab, var(--dsx-bg) 30%, transparent);
  border-top-color: var(--dsx-bg);
  border-radius: 50%;
  animation: dsx-spin 0.7s linear infinite;
}

@keyframes dsx-spin {
  to { transform: rotate(360deg); }
}

.dsx-form__submit.dsx-is-loading {
  cursor: progress;
}

.dsx-form__submit.dsx-is-loading .dsx-form__submit-label {
  display: none;
}

.dsx-form__submit.dsx-is-loading .dsx-form__spinner {
  display: block;
}

/* Success panel */
.dsx-success {
  display: grid;
  gap: 14px;
  padding-block: 12px;
  outline: none;
}

.dsx-success__cmd {
  font-family: var(--dsx-font-mono);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
}

.dsx-success__title {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.dsx-success__meta {
  color: var(--dsx-muted);
}


/* ==========================================================================
   0. Sticky CTA pill
   ========================================================================== */
.dsx-sticky {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 900; /* WP: below the video modal (10000); check against cookie banners / chat widgets */
  padding-inline: 24px;
  box-shadow: 0 12px 40px -8px var(--dsx-accent-glow), 0 4px 16px rgba(0, 0, 0, 0.5);
}

@media (max-width: 599px) {
  .dsx-sticky {
    left: 0;
    right: 0;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: max-content;
    margin-inline: auto; /* centred without translate, which GSAP would fold into its transform */
  }
}


/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .dsx-page *,
  .dsx-page *::before,
  .dsx-page *::after {
    transition-duration: 0.01ms !important;
  }

  .dsx-terminal__cursor,
  .dsx-flow__pulse::after {
    animation: none;
  }
}
