/* DoseRelay — conversion demo (document assembly story) */

/* —— Page rhythm —— */
.home-tight header.hero-minimal {
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom-color: color-mix(in srgb, var(--border) 85%, transparent);
}

.home-tight h1 {
  font-size: clamp(1.65rem, 4vw, 2.2rem);
  margin-bottom: 0.45rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.home-tight .hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.18rem);
  color: var(--muted);
  max-width: 28em;
  margin-bottom: 0;
  letter-spacing: -0.01em;
}

/* Premium footer strip for proof */
.proof-caption {
  letter-spacing: -0.01em;
  margin-top: 1.1rem;
  padding-top: 0.25rem;
  position: relative;
  z-index: 1;
}

.product-proof.is-hero-demo {
  overflow: visible;
}

.home-tight .tight-section {
  max-width: 38em;
}

.home-tight footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  opacity: 0.95;
}

.home-tight .hero-cta {
  display: none; /* CTA lives after demo */
}

.home-tight h2 {
  margin: 1.45rem 0 0.5rem;
  font-size: 1.15rem;
}

.home-tight .tight-section p {
  margin-bottom: 0.65rem;
  font-size: 1.02rem;
}

.home-tight .compact-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.9rem;
  list-style: none;
  margin: 0.4rem 0 0.2rem;
  padding: 0;
}

.home-tight .compact-pills li {
  margin: 0;
  font-size: 0.95rem;
  padding: 0.45rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

@media (max-width: 560px) {
  .home-tight .compact-pills {
    grid-template-columns: 1fr;
  }
}

/* —— Product demo hero —— */
.product-proof.is-hero-demo {
  margin-top: 0.15rem;
}

.product-proof.is-hero-demo > h2 {
  display: none;
}

.demo-watchline {
  text-align: center;
  font-size: clamp(0.98rem, 2.1vw, 1.12rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  max-width: 34em;
  margin: 0 auto 1rem;
  line-height: 1.4;
}

.proof-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: center;
  margin: 0.5rem 0 0.55rem;
  padding: 1.35rem 0.9rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  /* allow PDF scale + captions without clipping text below */
  overflow: visible;
}

/* Mobile tabs */
.proof-mobile-tabs {
  display: none;
  grid-column: 1 / -1;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 0.2rem;
  gap: 0.2rem;
  background: var(--surface-soft, var(--code-bg));
  border: 1px solid var(--border);
  border-radius: 999px;
  box-sizing: border-box;
}

.proof-tab {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.proof-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

/* Mobile: tabbed Chat | Report (no infinite sausage) */
@media (max-width: 899px) {
  .proof-stage {
    padding: 1rem 0.75rem 1.15rem;
    gap: 0.75rem;
  }

  .proof-mobile-tabs {
    display: flex;
  }

  .wa-phone-wrap {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .wa-phone {
    width: min(100%, 100%);
  }

  .wa-phone-inner {
    height: min(68vh, 640px);
    max-height: 640px;
  }

  .proof-pdf {
    max-width: 100%;
  }

  .proof-pdf-wrap {
    max-width: 100%;
  }

  /* larger report type on mobile */
  .mini-kpi-num {
    font-size: 1.7rem;
  }

  .mini-stat-num {
    font-size: 1.25rem;
  }

  .mini-report {
    font-size: 0.78rem;
    padding: 1rem 0.95rem 1rem;
  }

  .mini-report-title {
    font-size: 1.02rem;
  }

  .proof-connector {
    display: none;
  }

  .proof-connector-mobile {
    display: none; /* tabs replace mid-stack label noise */
  }

  /* show one panel at a time */
  .proof-stage[data-mobile-view="chat"] [data-panel="report"] {
    display: none !important;
  }

  .proof-stage[data-mobile-view="report"] [data-panel="chat"] {
    display: none !important;
  }

  .demo-watchline {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
  }

  .home-tight h1 {
    font-size: clamp(1.45rem, 6.5vw, 1.85rem);
  }

  .home-tight .hero-sub {
    font-size: 1rem;
  }

  .home-tight header.hero-minimal {
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
  }
}

@media (min-width: 900px) {
  .proof-mobile-tabs {
    display: none !important;
  }
}

@media (min-width: 900px) {
  .proof-stage {
    grid-template-columns: minmax(300px, 380px) minmax(128px, 160px) minmax(340px, 460px);
    gap: 1rem 1.25rem;
    padding: 1.75rem 1.5rem 2.1rem;
    justify-content: center;
    justify-items: center;
    /* single optical axis: phone center ↔ arrow ↔ PDF center */
    align-items: center;
  }

  .proof-connector {
    padding-top: 0;
    align-self: center;
  }

  .wa-phone-wrap,
  .proof-pdf-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .product-proof.is-hero-demo {
    /* room under scaled PDF so it never covers caption */
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .proof-stage.is-story-done {
    padding-bottom: 2.4rem;
  }
}

.chip-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

/* Packet assembly tray — fixed high-contrast (readable on light + dark stage) */
.packet-tray {
  width: max-content;
  max-width: 9.5rem;
  min-width: 4.2rem;
  min-height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate3d(0, 4px, 0);
  transition:
    opacity 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}

.packet-tray.is-on {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.packet-shell {
  width: max-content;
  min-width: 3.8rem;
  max-width: 9.2rem;
  padding: 0.4rem 0.5rem 0.35rem;
  border-radius: 10px;
  border: 1px solid #cfd6df;
  background: #ffffff;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  transform: scale(0.96);
  opacity: 0.92;
  /* grow sideways as chips stack */
  transition:
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.28s ease,
    min-width 0.32s cubic-bezier(0.22, 0.61, 0.36, 1),
    max-width 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.packet-shell.is-armed {
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

/* Dock launch: shrink toward report without layout thrash */
.packet-shell.is-launching {
  transform: scale(0.86) translate3d(12px, 0, 0);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.packet-shell[data-n="1"] { min-width: 4.2rem; }
.packet-shell[data-n="2"] { min-width: 5.6rem; }
.packet-shell[data-n="3"] { min-width: 6.8rem; }
.packet-shell[data-n="4"] { min-width: 7.8rem; }
.packet-shell[data-n="5"] { min-width: 8.6rem; }

.packet-ghost {
  z-index: 9;
  pointer-events: none;
  box-sizing: border-box;
}

.packet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  justify-content: center;
  min-height: 1.15rem;
}

.packet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.14rem 0.36rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  color: #0b3d5c;
  -webkit-text-fill-color: #0b3d5c;
  background: #e3f0f9;
  border: 1px solid #9ec2dc;
  opacity: 0;
  transform: translate3d(0, 4px, 0) scale(0.9);
  /* tags ~350ms */
  transition:
    opacity 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.packet-chip.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.packet-chip-ico {
  font-size: 0.7rem;
  line-height: 1;
}

.packet-chip-txt {
  line-height: 1;
}

.packet-label {
  margin-top: 0.22rem;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4b5563;
  -webkit-text-fill-color: #4b5563;
}

/* Dark theme: keep packet as light “paper” module (still readable) */
[data-theme="dark"] .packet-shell {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
}

.fly-chip {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cfd6df;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  white-space: nowrap;
  transition:
    transform 0.48s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.48s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
  z-index: 8;
}

.fly-chip-ico {
  font-size: 0.8rem;
  line-height: 1;
}

.fly-chip-txt {
  line-height: 1;
}

/* Connector */
.proof-connector {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  text-align: center;
  min-width: 6.5rem;
  z-index: 2;
}

.proof-value {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #4b5563;
  -webkit-text-fill-color: #4b5563;
  line-height: 1.35;
}

.proof-value strong {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
}

.pipe-status-label {
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
}

/* Dark stage: explicit toggle or OS dark (when not forced light) */
[data-theme="dark"] .proof-value {
  color: #aeb6c2;
  -webkit-text-fill-color: #aeb6c2;
}

[data-theme="dark"] .proof-value strong {
  color: #f1f5f9;
  -webkit-text-fill-color: #f1f5f9;
}

[data-theme="dark"] .pipe-status-label {
  color: #f1f5f9;
  -webkit-text-fill-color: #f1f5f9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .proof-value {
    color: #aeb6c2;
    -webkit-text-fill-color: #aeb6c2;
  }
  :root:not([data-theme="light"]) .proof-value strong {
    color: #f1f5f9;
    -webkit-text-fill-color: #f1f5f9;
  }
  :root:not([data-theme="light"]) .pipe-status-label {
    color: #f1f5f9;
    -webkit-text-fill-color: #f1f5f9;
  }
}

/* Forced light always wins */
[data-theme="light"] .proof-value {
  color: #4b5563 !important;
  -webkit-text-fill-color: #4b5563 !important;
}

[data-theme="light"] .proof-value strong {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

[data-theme="light"] .pipe-status-label {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

.proof-connector-arrow {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.proof-connector-arrow svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.proof-connector-arrow.is-pulse {
  animation: arrow-soft-pulse 1.8s ease-in-out infinite;
}

.proof-connector-arrow.is-done {
  animation: none;
  transform: scale(1.06);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

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

.proof-fill {
  width: 100%;
  max-width: 4.5rem;
  height: 3px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}

.proof-fill span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

/* Pipeline micro-status under arrow */
.pipe-status {
  min-height: 1.15rem;
  max-width: 7.5rem;
  opacity: 0;
  transform: translate3d(0, 4px, 0);
  transition:
    opacity 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}

.pipe-status.is-on {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.pipe-status-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  line-height: 1.25;
}

[data-theme="dark"] .pipe-status-label {
  color: #e8eaed;
  -webkit-text-fill-color: #e8eaed;
}

/* Reduce work while story runs */
.proof-stage.is-story-running {
  pointer-events: none;
}

.proof-stage.is-story-running .wa-replay {
  pointer-events: auto;
}

.proof-connector-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.proof-connector-mobile svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--accent);
}

@media (min-width: 900px) {
  .proof-connector { display: flex; }
  .proof-connector-mobile { display: none; }
}

/* Captions under stage columns */
.stage-caption {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin: 0 0 0.45rem;
}

.stage-caption-pdf {
  color: var(--text);
}

.proof-pdf-wrap {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* PDF card — hero product artefact */
.proof-pdf {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  text-decoration: none !important;
  color: #1a1a1a !important;
  display: block;
  z-index: 2;
}

.proof-pdf:hover,
.proof-pdf:focus,
.proof-pdf:visited,
.proof-pdf:active {
  color: #1a1a1a !important;
  text-decoration: none !important;
}

.proof-pdf-card {
  background: #ffffff !important;
  border-radius: 14px;
  border: 1px solid #dbe3ec;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 18px 42px rgba(15, 23, 42, 0.1);
  transition:
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a;
  /* slightly dim until complete — phone leads, then PDF becomes hero */
  filter: brightness(0.97);
}

.proof-stage.is-story-running .proof-pdf-card {
  filter: brightness(0.96);
}

.proof-pdf:hover .proof-pdf-card {
  transform: translateY(-3px);
  box-shadow:
    0 26px 52px rgba(15, 23, 42, 0.16),
    0 8px 18px rgba(15, 23, 42, 0.08);
  filter: brightness(1);
}

.proof-pdf-card.is-complete,
.proof-stage.is-story-done .proof-pdf-card {
  /* smaller lift so scaled PDF doesn't cover caption */
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.035) contrast(1.025);
  box-shadow:
    0 28px 56px rgba(15, 23, 42, 0.16),
    0 0 0 1px color-mix(in srgb, var(--accent) 28%, #d8dee6),
    0 0 40px rgba(0, 91, 150, 0.08);
}

/* Final complete badge under flow */
.report-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.28);
  text-align: center;
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition:
    opacity 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.report-done.is-on {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.report-done[hidden] {
  display: none !important;
}

.report-done.is-on[hidden] {
  display: flex !important;
}

.report-done-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.report-done strong {
  font-size: 0.68rem;
  font-weight: 750;
  color: #15803d;
  -webkit-text-fill-color: #15803d;
  letter-spacing: -0.01em;
}

.report-done span {
  font-size: 0.58rem;
  font-weight: 600;
  color: #4b5563;
  -webkit-text-fill-color: #4b5563;
}

[data-theme="dark"] .report-done strong {
  color: #86efac;
  -webkit-text-fill-color: #86efac;
}

[data-theme="dark"] .report-done span {
  color: #9ca3af;
  -webkit-text-fill-color: #9ca3af;
}

/* Data-flow rail: dots travel toward PDF */
.flow-rail {
  position: relative;
  width: 100%;
  max-width: 5.5rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0.15rem 0;
}

.flow-rail-line {
  position: absolute;
  left: 0.15rem;
  right: 1.35rem;
  top: 50%;
  height: 2px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 35%, var(--border));
  transform: translateY(-50%);
}

.flow-rail-dot {
  position: absolute;
  left: 0.2rem;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  transform: translate3d(0, -50%, 0);
  opacity: 0;
}

.proof-connector.is-active .flow-rail-dot {
  animation: flow-dot 2.0s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: calc(var(--d, 0) * 0.48s);
}

@keyframes flow-dot {
  0% {
    opacity: 0;
    transform: translate3d(0, -50%, 0) scale(0.7);
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translate3d(3.2rem, -50%, 0) scale(0.85);
  }
}

.flow-rail-head {
  position: relative;
  z-index: 1;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flow-rail-head svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.proof-connector.is-active .flow-rail-head {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.flow-rail.is-done .flow-rail-dot {
  animation: none;
  opacity: 0;
}

.flow-rail.is-done .flow-rail-head {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.12);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* Pipeline checklist between phone and PDF */
.pipe-steps {
  list-style: none;
  margin: 0.15rem 0 0.35rem;
  padding: 0;
  width: 9.4rem; /* fixed: no layout jank when labels change */
  min-width: 9.4rem;
  max-width: 9.4rem;
  text-align: left;
  box-sizing: border-box;
}

.pipe-steps li {
  position: relative;
  margin: 0;
  padding: 0.18rem 0 0.18rem 1.05rem;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
  line-height: 1.25;
  transition:
    color 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pipe-steps li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.42rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  border: 1.5px solid #94a3b8;
  background: transparent;
  transition:
    background 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.3s ease;
}

.pipe-steps li.is-active {
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  font-weight: 750;
}

.pipe-steps li.is-active::before {
  border-color: #005b96;
  background: #005b96;
  box-shadow: 0 0 0 3px rgba(0, 91, 150, 0.18);
}

.pipe-steps li.is-done {
  color: #475569;
  -webkit-text-fill-color: #475569;
}

.pipe-steps li.is-done::before {
  border-color: #16a34a;
  background: #16a34a;
}

.pipe-steps li.is-ready {
  color: #15803d;
  -webkit-text-fill-color: #15803d;
  font-weight: 750;
}

.pipe-steps li.is-ready::before {
  border-color: #16a34a;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

[data-theme="dark"] .pipe-steps li {
  color: #6b7280;
  -webkit-text-fill-color: #6b7280;
}

[data-theme="dark"] .pipe-steps li.is-active {
  color: #f1f5f9;
  -webkit-text-fill-color: #f1f5f9;
}

[data-theme="dark"] .pipe-steps li.is-done {
  color: #9ca3af;
  -webkit-text-fill-color: #9ca3af;
}

[data-theme="dark"] .pipe-steps li.is-ready {
  color: #86efac;
  -webkit-text-fill-color: #86efac;
}

@media (max-width: 899px) {
  .pipe-steps {
    display: none;
  }

  .stage-caption {
    font-size: 0.68rem;
  }

  .proof-pdf-wrap {
    max-width: 100%;
  }
}

/* Mini report + assembly states */
.mini-report {
  display: block !important;
  background: #ffffff !important;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a;
  padding: 0.9rem 0.9rem 0.95rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.7rem;
  line-height: 1.35;
  border-bottom: 1px solid #e8ebf0;
  min-height: 260px;
}

/* Baseline week always readable; updates pulse via is-lit / is-updated */
.mini-report [data-sec] {
  transition:
    box-shadow 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  border-radius: 6px;
}

.mini-report [data-sec].is-lit {
  box-shadow: 0 0 0 2px rgba(0, 91, 150, 0.32);
  background-color: rgba(0, 91, 150, 0.07);
  /* breathe ~500–600ms total with JS clear */
  transition:
    box-shadow 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mini-report [data-sec].is-morph-in,
.mini-report [data-sec].is-dock {
  transform: scale(1.025);
  box-shadow: 0 0 0 2px rgba(0, 91, 150, 0.28);
  background-color: rgba(0, 91, 150, 0.05);
}

.mini-report [data-num].is-ticked {
  display: inline-block;
  animation: num-settle 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes num-settle {
  0% { transform: translate3d(0, 3px, 0); opacity: 0.55; }
  100% { transform: translate3d(0, 0, 0); opacity: 1; }
}

.score-den {
  font-weight: 650;
  opacity: 0.55;
  font-size: 0.72em;
}

/* —— Premium mini-report hierarchy —— */
.mini-report-top {
  display: block;
  margin-bottom: 0.65rem;
  padding: 0;
}

.mini-report-id {
  min-width: 0;
}

.mini-report-kicker {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 650;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b;
  margin-bottom: 0.2rem;
}

.mini-report-title {
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  line-height: 1.2;
}

/* Big days-logged KPI */
.mini-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0 0 0.7rem;
  padding: 0.55rem 0.6rem 0.55rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e8edf3;
}

.mini-kpi-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.mini-kpi-num {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.mini-kpi-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b;
  white-space: nowrap;
}

.mini-kpi-bar {
  height: 4px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}

.mini-kpi-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #005b96 0%, #2d8fd4 100%);
  transform: scaleX(0.86);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Equal metric cards */
.mini-report-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  padding: 0;
  border-bottom: none;
}

.mini-stat {
  text-align: center;
  padding: 0.45rem 0.2rem 0.4rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e8edf3;
  min-width: 0;
}

.mini-stat-num {
  display: block;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.mini-stat-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b;
}

/* legacy score block */
.mini-report-score {
  display: none;
}

.mini-report-watch {
  margin-bottom: 0.5rem;
  padding: 0.2rem;
  border-radius: 6px;
}

.mini-report-watch-h {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280 !important;
  -webkit-text-fill-color: #6b7280;
  margin-bottom: 0.28rem;
}

.mini-report-flag {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  padding: 0.28rem 0.35rem;
  border-radius: 4px;
  margin-bottom: 0.22rem;
  background: #f8fafc;
  border-left: 3px solid #94a3b8;
}

.mini-report-flag.is-red { border-left-color: #dc2626; background: #fef2f2; }
.mini-report-flag.is-amber { border-left-color: #d97706; background: #fffbeb; }

.mini-report-flag b {
  display: block;
  font-size: 0.64rem;
  color: #111827 !important;
  -webkit-text-fill-color: #111827;
}

.mini-report-flag span {
  font-size: 0.55rem;
  color: #4b5563 !important;
  -webkit-text-fill-color: #4b5563;
}

.mini-report-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.18rem;
  padding: 0.15rem;
  border-radius: 6px;
}

.mini-report-day {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 0.22rem 0.1rem 0.25rem;
  text-align: center;
  background: #f0fdf4;
}

.mini-report-day.is-warn { background: #fff7ed; border-color: #fed7aa; }
.mini-report-day.is-bad { background: #fef2f2; border-color: #fecaca; }

.mini-report-day b {
  display: block;
  font-size: 0.48rem;
  letter-spacing: 0.02em;
  color: #374151 !important;
  -webkit-text-fill-color: #374151;
  margin-bottom: 0.12rem;
}

.mini-report-day i {
  display: block;
  font-style: normal;
  font-size: 0.58rem;
  font-weight: 700;
  color: #111827 !important;
  -webkit-text-fill-color: #111827;
}

.mini-report-day em {
  display: block;
  margin-top: 0.12rem;
  font-style: normal;
  font-size: 0.48rem;
  color: #6b7280 !important;
  -webkit-text-fill-color: #6b7280;
}

.mini-report-diary {
  margin-top: 0.55rem;
  padding: 0.25rem;
  border-radius: 6px;
  border-top: 1px solid #eef1f5;
  padding-top: 0.45rem;
}

.mini-report-diary .diary-empty {
  margin: 0;
  font-size: 0.62rem;
  color: #9ca3af !important;
  -webkit-text-fill-color: #9ca3af;
  font-style: italic;
  transition: opacity 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mini-report-diary .diary-empty.is-gone {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.mini-report-diary p[data-diary-line] {
  margin: 0 0 0.22rem;
  font-size: 0.62rem;
  color: #374151 !important;
  -webkit-text-fill-color: #374151;
  opacity: 0;
  transform: translate3d(0, 4px, 0);
  transition:
    opacity 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mini-report-diary p[data-diary-line].is-shown {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Today day chip — pending → logged */
.mini-report-day.is-pending {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-style: dashed;
  opacity: 0.72;
}

.mini-report-day.is-logged {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-style: solid;
  opacity: 1;
  animation: day-in 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes day-in {
  from { transform: scale(0.94); opacity: 0.5; }
  to { transform: scale(1); opacity: 1; }
}

/* New watch finding */
.mini-report-flag.is-new {
  border-left-color: #d97706;
  background: #fffbeb;
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition:
    opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mini-report-flag.is-new.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.wa-bot-today [data-live-focus].is-ticked,
.wa-bot-head [data-live-focus-bot].is-ticked {
  display: inline-block;
  animation: num-settle 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.wa-replay.is-hint {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.proof-tab.is-hint {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

.proof-pdf-meta {
  padding: 0.72rem 0.9rem 0.8rem;
  border-top: 1px solid #e8ebf0;
  background: #fafbfc;
}

.proof-pdf-meta strong {
  display: block;
  font-size: 0.94rem;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a;
  margin-bottom: 0.12rem;
}

.proof-pdf-meta span {
  font-size: 0.8rem;
  color: #5a5f66 !important;
  -webkit-text-fill-color: #5a5f66;
}

.proof-caption {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
  text-align: center;
}

.proof-caption a { white-space: nowrap; }

/* Phone wrap + micro */
.wa-phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  z-index: 2;
}

.wa-phone {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.wa-phone-wrap:hover .wa-phone {
  transform: perspective(900px) rotateY(-1deg) translateY(-2px);
}

.wa-phone-inner {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 28px rgba(0, 168, 132, 0.06);
}

.wa-replay {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1.5px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  background: var(--accent-soft);
  color: var(--accent);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.2s ease, transform 0.15s ease;
}

.wa-replay svg {
  flex-shrink: 0;
}

.wa-replay:hover:not(:disabled) {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-1px);
}

.wa-replay:disabled { opacity: 0.55; cursor: default; }
.wa-replay:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.wa-replay[hidden] { display: none !important; }

.wa-row.is-parsing .wa-bubble {
  box-shadow: 0 0 0 1px rgba(0, 168, 132, 0.35);
}

.wa-row.is-listening .wa-wave span {
  animation: wa-wave-listen 0.65s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  transform-origin: center bottom;
}

.wa-row.is-listening .wa-wave span:nth-child(odd) { animation-delay: 0.07s; }
.wa-row.is-listening .wa-wave span:nth-child(3n) { animation-delay: 0.14s; }

@keyframes wa-wave-listen {
  0%, 100% { transform: scaleY(0.65); opacity: 0.5; }
  50% { transform: scaleY(1.3); opacity: 1; }
}

.wa-voice-progress {
  height: 2px;
  margin: 0.28rem 0 0.1rem 1.55rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.wa-voice-progress i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: rgba(233, 237, 239, 0.75);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.wa-row.is-parsing .wa-bubble {
  transition: box-shadow 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .fly-chip,
  .proof-connector-arrow.is-pulse,
  .wa-row.is-listening .wa-wave span,
  .proof-pdf-card,
  .wa-phone {
    animation: none !important;
    transition: none !important;
  }
  .wa-phone-wrap:hover .wa-phone,
  .proof-pdf:hover .proof-pdf-card,
  .proof-pdf-card.is-complete,
  .proof-stage.is-story-done .proof-pdf-card {
    transform: none !important;
  }
}

.wa-demo-capture {
  display: inline-block;
  background: #0f1419;
  padding: 24px;
}

/* —— Phone frame —— */
.wa-phone {
  --wa-green: #00a884;
  --wa-out: #005c4b;
  --wa-out-meta: #8ecbb8;
  --wa-in: #1f2c34;
  --wa-in-text: #e9edef;
  --wa-meta: #8696a0;
  --wa-header: #1f2c34;
  --wa-panel: #0b141a;
  --wa-composer: #1f2c34;
  --wa-tick: #53bdeb;
  --wa-btn-green: #00a884;
  --wa-list-bg: #1f2c34;
  --wa-list-line: #2a3942;
  --wa-input: #2a3942;

  width: min(100%, 390px);
  margin: 0 auto;
  border-radius: 28px;
  background: #0a0e12;
  padding: 10px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 28px 56px rgba(0, 0, 0, 0.38),
    0 8px 18px rgba(0, 0, 0, 0.22);
}

.wa-phone-inner {
  border-radius: 28px;
  overflow: hidden;
  background: var(--wa-panel);
  display: flex;
  flex-direction: column;
  /* taller / more phone-like proportions */
  height: 720px;
  max-height: min(82vh, 760px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--wa-in-text);
  position: relative;
}

/* Status bar */
.wa-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.85rem 0.2rem;
  background: var(--wa-header);
  font-size: 0.78rem;
  font-weight: 600;
  color: #e9edef;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.wa-status-icons {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.92;
}

.wa-status-icons svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
}

/* Chat header */
.wa-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem 0.55rem 0.4rem;
  background: var(--wa-header);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.wa-back {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e9edef;
  flex-shrink: 0;
}

.wa-back svg {
  width: 20px;
  height: 20px;
  display: block;
}

.wa-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #0d2130;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.wa-avatar img,
.wa-avatar svg {
  width: 22px;
  height: 22px;
  display: block;
}

.wa-header-text {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.wa-header-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #e9edef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-header-sub {
  font-size: 0.74rem;
  color: var(--wa-meta);
  margin-top: 0.12rem;
}

.wa-header-menu {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e9edef;
  opacity: 0.9;
}

.wa-header-menu svg {
  width: 18px;
  height: 18px;
}

/* Messages area */
.wa-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.55rem 0.55rem 0.75rem;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  background-color: #0b141a;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.018) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 32%, rgba(255, 255, 255, 0.015) 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 70%, rgba(255, 255, 255, 0.012) 0 1px, transparent 1.5px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.035' stroke-width='1'%3E%3Cpath d='M18 28c6-8 16-8 20 0M62 22c4-6 12-5 14 2M96 36c-5-4-12-2-12 5M24 68c8-2 12 6 6 12M70 78c6 4 14 0 12-8M100 92c-8 2-10 10-4 12M40 100c4-6 14-4 12 4'/%3E%3Ccircle cx='50' cy='44' r='3'/%3E%3Ccircle cx='88' cy='58' r='2.5'/%3E%3Cpath d='M12 90h8M14 94h4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, auto, auto, 120px 120px;
}

.wa-messages::-webkit-scrollbar {
  width: 4px;
}

.wa-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

/* Bubbles — motion hierarchy: messages ~220ms */
.wa-row {
  display: flex;
  margin: 0.2rem 0;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Soft overscroll kick when new message lands */
.wa-messages.is-nudge {
  animation: chat-nudge 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes chat-nudge {
  0% { transform: translate3d(0, 0, 0); }
  40% { transform: translate3d(0, 3px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Force high-contrast chat text (phone is always dark) */
.wa-row.is-in .wa-bubble,
.wa-row.is-in .wa-bubble-text,
.wa-row.is-in .wa-bot-head,
.wa-row.is-in .wa-bot-note,
.wa-row.is-in .wa-bot-today {
  color: #e9edef !important;
  -webkit-text-fill-color: #e9edef;
}

.wa-row.is-in .wa-bot-note,
.wa-row.is-in .wa-bot-today,
.wa-row.is-in .wa-time {
  color: #c5ccd2 !important;
  -webkit-text-fill-color: #c5ccd2;
}

.wa-row.is-out .wa-bubble,
.wa-row.is-out .wa-bubble-text {
  color: #e9edef !important;
  -webkit-text-fill-color: #e9edef;
}

/* Hidden steps while story runs — out of flow */
.wa-phone.is-animating .wa-row:not(.is-visible) {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.wa-phone.is-animating .wa-row.is-visible {
  position: relative;
  visibility: visible;
  height: auto;
  overflow: visible;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
}

.wa-phone.is-animating .wa-row.is-visible.is-entered {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.wa-phone.is-animating .wa-row.is-out.is-visible:not(.is-entered) {
  transform: translate3d(12px, 8px, 0);
}

.wa-phone.is-animating .wa-row.is-in.is-visible:not(.is-entered) {
  transform: translate3d(-10px, 8px, 0);
}

.wa-phone.is-static .wa-row,
.wa-phone.is-done .wa-row {
  opacity: 1;
  transform: none;
}

.wa-row.is-out {
  justify-content: flex-end;
}

.wa-row.is-in {
  justify-content: flex-start;
}

.wa-bubble {
  position: relative;
  max-width: 88%;
  padding: 0.42rem 0.55rem 0.28rem 0.58rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.38;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.wa-row.is-out .wa-bubble {
  background: var(--wa-out);
  color: #e9edef;
  border-top-right-radius: 4px;
}

.wa-row.is-in .wa-bubble {
  background: var(--wa-in);
  color: var(--wa-in-text);
  border-top-left-radius: 4px;
}

.wa-bubble-text {
  white-space: pre-wrap;
  margin: 0;
}

.wa-meta-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.22rem;
  margin-top: 0.18rem;
  min-height: 0.95rem;
}

.wa-time {
  font-size: 0.68rem;
  color: var(--wa-meta);
  line-height: 1;
}

.wa-row.is-out .wa-time {
  color: var(--wa-out-meta);
}

.wa-ticks {
  width: 15px;
  height: 10px;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.wa-ticks::before,
.wa-ticks::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 4px;
  border-left: 1.6px solid var(--wa-tick);
  border-bottom: 1.6px solid var(--wa-tick);
  transform: rotate(-45deg);
  top: 1px;
}

.wa-ticks::before {
  left: 0;
}

.wa-ticks::after {
  left: 4px;
}

/* Structured bot reply internals */
.wa-bot-head {
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #e9edef;
  font-size: 0.86rem;
  line-height: 1.35;
}

.wa-bot-note {
  display: flex;
  gap: 0.28rem;
  color: #cfd5d9;
  font-style: italic;
  margin: 0.12rem 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.wa-bot-note .wa-ico {
  flex-shrink: 0;
  font-style: normal;
  font-size: 0.82rem;
}

.wa-bot-today {
  margin-top: 0.45rem;
  padding-top: 0.28rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #aeb6bd;
  font-size: 0.8rem;
  line-height: 1.35;
}

/* List message (interactive reply) */
.wa-list {
  max-width: 92%;
  background: var(--wa-list-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
  border-top-left-radius: 4px;
}

.wa-list-body {
  padding: 0.5rem 0.65rem 0.4rem;
  font-size: 0.875rem;
  line-height: 1.38;
  color: var(--wa-in-text);
}

.wa-list-body .wa-meta-line {
  margin-top: 0.3rem;
}

.wa-list-actions {
  border-top: 1px solid var(--wa-list-line);
}

.wa-list-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.62rem 0.5rem;
  color: var(--wa-btn-green);
  font-weight: 600;
  font-size: 0.9rem;
  border-top: 1px solid var(--wa-list-line);
}

.wa-list-btn:first-child {
  border-top: none;
}

.wa-list-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Voice note */
.wa-voice {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 210px;
  padding: 0.35rem 0.45rem 0.22rem 0.4rem !important;
}

.wa-voice-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #123048;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.wa-voice-avatar img,
.wa-voice-avatar svg {
  width: 22px;
  height: 22px;
}

/* User photo avatar (demo cat) — full bleed circle */
.wa-voice-avatar.is-user {
  overflow: visible;
  background: #1a242c;
  border: none;
}

.wa-voice-avatar.is-user::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
  z-index: 0;
  pointer-events: none;
}

.wa-voice-avatar.is-user img {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
}

.wa-voice-avatar.is-user .wa-mic-badge {
  z-index: 2;
}

.wa-voice-avatar .wa-mic-badge {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--wa-green);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--wa-out);
}

.wa-voice-avatar .wa-mic-badge svg {
  width: 8px;
  height: 8px;
  fill: #fff;
}

.wa-voice-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 0.1rem;
}

.wa-voice-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.wa-play {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #d1d7db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wa-play svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.wa-wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1.5px;
  height: 22px;
  min-width: 0;
}

.wa-wave span {
  display: block;
  width: 2px;
  border-radius: 2px;
  background: rgba(233, 237, 239, 0.55);
  height: var(--h, 8px);
}

.wa-voice-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 1.6rem;
  padding-right: 0.1rem;
}

.wa-voice-dur {
  font-size: 0.7rem;
  color: var(--wa-out-meta);
}

/* Typing indicator */
.wa-typing {
  display: none;
  align-items: center;
  gap: 0.28rem;
  padding: 0.55rem 0.75rem;
  background: var(--wa-in);
  border-radius: 10px;
  border-top-left-radius: 4px;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.wa-typing.is-on {
  display: inline-flex;
}

.wa-typing span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #8696a0;
  animation: wa-dot 1.05s ease-in-out infinite;
}

.wa-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.wa-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes wa-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* Composer */
.wa-composer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.45rem 0.5rem;
  background: var(--wa-panel);
  flex-shrink: 0;
}

.wa-composer-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--wa-composer);
  border-radius: 999px;
  padding: 0.42rem 0.55rem;
  min-height: 42px;
}

.wa-composer-input .wa-ico-btn {
  color: #8696a0;
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wa-composer-input .wa-ico-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wa-composer-placeholder {
  flex: 1;
  color: #8696a0;
  font-size: 0.92rem;
}

.wa-composer-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #8696a0;
  padding-right: 0.15rem;
}

.wa-composer-actions svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.wa-mic {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--wa-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.wa-mic svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

/* Animation state helpers */
.wa-row[hidden],
.wa-typing-row[hidden] {
  display: none !important;
}

.wa-typing-row {
  display: flex;
  justify-content: flex-start;
  margin: 0.18rem 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wa-row {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .wa-typing span {
    animation: none !important;
  }

  .proof-pdf:hover .proof-pdf-card {
    transform: none;
  }
}

/* Capture helper for social screenshots */
.wa-demo-capture {
  display: inline-block;
  background: #0f1419;
  padding: 24px;
}
