/* ============================================================
   Re-venue Capability Scroller · paste into CSS panel
   ============================================================ */

.rv-scroller {
  --rv-bg: #F9F8F6;
  --rv-ink: #0A0A0F;
  --rv-ink-muted: #5C5C6A;
  --rv-line: rgba(10, 10, 15, 0.08);
  --rv-card: #FFFFFF;
  --rv-track: #E8EAEC;
  --rv-ui-font: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

  --rv-g1: #E5F7EA;
  --rv-g2: #C6EDD0;
  --rv-g3: #A4E2B6;
  --rv-g4: #82D69D;
  --rv-g5: #62C886;
  --rv-g6: #4FBC76;
  --rv-g7: #3DAE66;
  --rv-g8: #2EA058;
  --rv-purple: #7C7CE8;

  background: var(--rv-bg);
  padding: 24px 0 48px;
  color: var(--rv-ink);
}

.rv-scroller__stage {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.rv-scroller__steps {
  display: flex;
  flex-direction: column;
}

.rv-scroller__step {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3vh 0;
  opacity: 0.4;
  transition: opacity 0.5s ease;
}

.rv-scroller__step--active { opacity: 1; }

.rv-scroller__step-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rv-ink-muted);
  margin-bottom: 14px;
}

.rv-scroller__step-eyebrow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--rv-card);
  border: 1px solid var(--rv-line);
  border-radius: 999px;
  font-size: 10px;
  color: var(--rv-ink);
  letter-spacing: 0;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

.rv-scroller__step--active .rv-scroller__step-eyebrow-num {
  background: var(--rv-g8);
  border-color: var(--rv-g8);
  color: #fff;
}

.rv-scroller .rv-scroller__step-title {
  margin: 0 0 14px;
}

.rv-scroller .rv-scroller__step-body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--rv-ink-muted);
  margin: 0;
  max-width: 460px;
}

.rv-scroller__sticky {
  position: sticky;
  top: 20vh;
  height: 60vh;
  max-height: 540px;
  display: flex;
  align-items: center;
}

.rv-scroller__diagrams {
  position: relative;
  width: 100%;
  aspect-ratio: 1.05 / 1;
  max-height: 100%;
}

.rv-scroller__diagram {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rv-scroller__diagram--active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0s linear 0s;
}

/* ============================================================
   DIAGRAM CHROME - uses UI font stack (mimics real product UI)
   ============================================================ */
.rv-diag {
  background: var(--rv-card);
  border-radius: 14px;
  border: 1px solid var(--rv-line);
  padding: 16px;
  width: 100%;
  font-family: var(--rv-ui-font);
}

.rv-diag__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--rv-ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rv-line);
  font-weight: 500;
}

.rv-diag__head-left { display: inline-flex; align-items: center; gap: 8px; }
.rv-diag__head-divider { display: inline-block; width: 1px; height: 10px; background: var(--rv-line); }
.rv-diag__pulse { display: inline-flex; align-items: center; gap: 6px; }

.rv-diag__pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rv-g6);
  animation: rv-pulse 1.6s ease-in-out infinite;
}

@keyframes rv-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ============================================================
   Diagram 1: Demand Index heatmap
   ============================================================ */
.rv-d1__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.rv-d1__cell {
  border-radius: 6px;
  aspect-ratio: 1.4 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--rv-ink);
  transition: background 0.6s ease, transform 0.5s ease;
}

.rv-d1__cell--improving { animation: rv-d1-pulse 0.8s ease-out; }

@keyframes rv-d1-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.rv-d1__cell--t1 { background: var(--rv-g1); }
.rv-d1__cell--t2 { background: var(--rv-g2); }
.rv-d1__cell--t3 { background: var(--rv-g3); }
.rv-d1__cell--t4 { background: var(--rv-g4); }
.rv-d1__cell--t5 { background: var(--rv-g5); }
.rv-d1__cell--t6 { background: var(--rv-g6); }
.rv-d1__cell--t7 { background: var(--rv-g7); }
.rv-d1__cell--t8 { background: var(--rv-g8); }

/* ============================================================
   Diagram 2: Booking Flow Builder
   ============================================================ */
.rv-d2__canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 800 / 320;
  background-image: radial-gradient(circle, rgba(10,10,15,0.06) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: 0 0;
  border-radius: 8px;
  overflow: hidden;
  min-height: 280px;
}

.rv-d2__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rv-d2__line {
  fill: none;
  stroke: rgba(10, 10, 15, 0.16);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  stroke-linecap: round;
}

.rv-d2__pulse-line {
  fill: none;
  stroke: var(--rv-g6);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 14 1000;
  animation: rv-d2-travel 2.4s linear infinite;
  filter: drop-shadow(0 0 4px rgba(79, 188, 118, 0.4));
}

@keyframes rv-d2-travel {
  0% { stroke-dashoffset: 0; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { stroke-dashoffset: -200; opacity: 0; }
}

.rv-d2__pulse-line:nth-of-type(1) { animation-delay: 0s; }
.rv-d2__pulse-line:nth-of-type(2) { animation-delay: 0.4s; }
.rv-d2__pulse-line:nth-of-type(3) { animation-delay: 0.8s; }
.rv-d2__pulse-line:nth-of-type(4) { animation-delay: 1.4s; }
.rv-d2__pulse-line:nth-of-type(5) { animation-delay: 1.8s; }
.rv-d2__pulse-line:nth-of-type(6) { animation-delay: 2.2s; }

.rv-d2__node {
  position: absolute;
  background: var(--rv-card);
  border-radius: 8px;
  border: 1px solid var(--rv-line);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 1px 3px rgba(10, 10, 15, 0.04);
  font-size: 11px;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.rv-d2__node--start { background: var(--rv-g8); border-color: var(--rv-g8); color: #fff; }
.rv-d2__node--branch { border-left: 3px solid var(--rv-purple); padding-left: 8px; }

.rv-d2__node-icon { font-size: 13px; line-height: 1; }
.rv-d2__node-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }
.rv-d2__node-name { font-weight: 600; font-size: 11px; }
.rv-d2__node-sub { font-size: 9px; color: var(--rv-ink-muted); }
.rv-d2__node--start .rv-d2__node-sub { color: rgba(255,255,255,0.85); }

.rv-d2__node-port {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rv-card);
  border: 1.5px solid var(--rv-purple);
}

.rv-d2__node--start .rv-d2__node-port { border-color: var(--rv-g8); background: var(--rv-g8); }
.rv-d2__node-port--right { right: -3.5px; top: 50%; transform: translateY(-50%); }
.rv-d2__node-port--left { left: -3.5px; top: 50%; transform: translateY(-50%); }

.rv-d2__node--n1 { left: 9%; top: 50%; }
.rv-d2__node--n2 { left: 35%; top: 18%; }
.rv-d2__node--n3 { left: 35%; top: 50%; }
.rv-d2__node--n4 { left: 35%; top: 82%; }
.rv-d2__node--n5 { left: 64%; top: 50%; }
.rv-d2__node--n6 { left: 89%; top: 50%; }

/* ============================================================
   Diagram 3: Capacity & Pricing
   ============================================================ */
.rv-d3__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 12px;
}

.rv-d3__slot { font-weight: 600; color: var(--rv-ink); }
.rv-d3__threshold { color: var(--rv-ink-muted); font-size: 11px; }
.rv-d3__threshold-val { color: var(--rv-g7); font-weight: 600; }

.rv-d3__track {
  position: relative;
  height: 12px;
  background: var(--rv-track);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.rv-d3__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rv-g3) 0%, var(--rv-g6) 60%, var(--rv-g8) 100%);
  border-radius: 999px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rv-d3__threshold-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: var(--rv-ink);
  opacity: 0.4;
  border-radius: 1px;
}

.rv-d3__track-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--rv-ink-muted);
  margin-bottom: 18px;
}

.rv-d3__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.rv-d3__stat {
  background: var(--rv-bg);
  border-radius: 8px;
  padding: 12px 14px;
}

.rv-d3__stat-label {
  font-size: 10px;
  color: var(--rv-ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 4px;
}

.rv-d3__stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--rv-ink);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.rv-d3__stat-delta { font-size: 10px; font-weight: 600; color: var(--rv-g7); }

/* ============================================================
   Diagram 4: Customer Behaviour
   ============================================================ */
.rv-d4__stage {
  position: relative;
  background: var(--rv-bg);
  border-radius: 10px;
  padding: 16px;
  min-height: 240px;
}

.rv-d4__screen-title {
  font-size: 10px;
  color: var(--rv-ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 10px;
}

.rv-d4__rows { display: flex; flex-direction: column; gap: 6px; }

.rv-d4__row {
  background: var(--rv-card);
  border: 1px solid var(--rv-line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.rv-d4__row-name { font-weight: 500; color: var(--rv-ink); }
.rv-d4__row-meta { font-size: 11px; color: var(--rv-ink-muted); margin-top: 2px; }

.rv-d4__qty { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }

.rv-d4__qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--rv-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--rv-ink-muted);
  border: 1px solid var(--rv-line);
}

.rv-d4__qty-val { min-width: 16px; text-align: center; color: var(--rv-ink); }

.rv-d4__row--target {
  border-color: var(--rv-g6);
  box-shadow: 0 0 0 2px rgba(79, 188, 118, 0.15);
}

.rv-d4__nudge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 240px;
  background: var(--rv-card);
  border: 1px solid var(--rv-line);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(10, 10, 15, 0.14);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.rv-scroller__diagram--active .rv-d4__nudge {
  animation: rv-d4-nudge 8s ease-in-out 0.4s infinite;
}

@keyframes rv-d4-nudge {
  0%, 8% { opacity: 0; transform: translateY(20px); }
  18%, 75% { opacity: 1; transform: translateY(0); }
  85%, 100% { opacity: 0; transform: translateY(20px); }
}

.rv-d4__nudge-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--rv-g1);
  color: var(--rv-g8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.rv-d4__nudge-body { flex: 1; min-width: 0; }
.rv-d4__nudge-title { font-size: 12px; font-weight: 600; color: var(--rv-ink); margin-bottom: 3px; line-height: 1.3; }
.rv-d4__nudge-desc { font-size: 10px; color: var(--rv-ink-muted); line-height: 1.4; }
.rv-d4__nudge-saving { display: inline-block; margin-top: 6px; background: var(--rv-g1); color: var(--rv-g8); padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }

/* ============================================================
   Mobile: tabs + single diagram
   ============================================================ */
.rv-scroller__tabs { display: none; }
.rv-scroller__mobile-copy { display: none; }

@media (max-width: 880px) {
  .rv-scroller {
    padding: 16px 0 32px;
  }

  .rv-scroller__stage {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 20px;
  }

  .rv-scroller__steps { display: none; }

  .rv-scroller__sticky {
    position: static;
    height: auto;
    max-height: none;
    display: block;
  }

  .rv-scroller__tabs {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 0 20px 4px;
    margin: 0 -20px 24px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .rv-scroller__tabs::-webkit-scrollbar { display: none; }

  .rv-scroller__tab {
    flex-shrink: 0;
    background: var(--rv-card);
    border: 1px solid var(--rv-line);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    color: var(--rv-ink-muted);
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
  }

  .rv-scroller__tab--active {
    background: var(--rv-ink);
    border-color: var(--rv-ink);
    color: #fff;
  }

  .rv-scroller__mobile-copy {
    display: block;
    text-align: center;
    margin: 0 0 48px;
    padding: 0 12px;
  }

  .rv-scroller .rv-scroller__mobile-copy-title {
    margin: 0 0 12px;
  }

  .rv-scroller .rv-scroller__mobile-copy-body {
    font-size: 16px;
    line-height: 1.55;
    color: var(--rv-ink-muted);
    margin: 0 auto;
    max-width: 480px;
  }

  .rv-scroller__diagrams {
    position: relative;
    width: 100%;
    aspect-ratio: 1.05 / 1;
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .rv-scroller__diagrams::before { display: none; }

  .rv-scroller__diagram {
    position: absolute;
    inset: 0;
  }

 /* ============================================================
   Booking Flow Builder - icon-only mode on smaller mobile only
   ============================================================ */
@media (max-width: 600px) {
  .rv-d2__node-text { display: none; }
  
  .rv-d2__node {
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
    gap: 0;
  }
  
  .rv-d2__node-icon {
    font-size: 16px;
  }
  
  .rv-d2__node-port--right { right: -3.5px; }
  .rv-d2__node-port--left { left: -3.5px; }
}