/* Automation 11 live demo: store admin (Store events), "Behind the scenes" (automation log and
   counters) and "Team and customer" (Slack channel or WhatsApp). Stage chrome, controls and the
   phone come from demo.css and phone.css. Every rule is scoped under #demo and every class
   invented here starts with so-. Layout: store | log + team at 1280px and up; store | carousel
   from 901 to 1279px; store above a Behind the scenes / Team and customer carousel at 900px and
   below. The two simulated skins (store admin and Slack) declare their own palette on their root. */

#demo [hidden] {
  display: none !important;
}

#demo {
  --so-h: 600px;
  --so-amber: hsl(30 88% 56%);
}

#demo-stage {
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}

/* ---------- Tabs: four equal pills; label and meta stacked in each pill ---------- */

#demo .so-demo-bar {
  align-items: flex-start;
}

#demo .so-demo-bar .tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

#demo .so-demo-bar .tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 3px;
  align-items: center;
  padding: 12px 20px;
  text-align: left;
}

#demo .so-demo-bar .tab-n {
  grid-row: 1 / span 2;
}

#demo .so-demo-bar .tab-l,
#demo .so-demo-bar .tab-m {
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
}

#demo .so-demo-bar .tab-l {
  grid-column: 2;
  grid-row: 1;
}

#demo .so-demo-bar .tab-m {
  grid-column: 2;
  grid-row: 2;
}

#demo .so-demo-bar .demo-note {
  margin-left: auto;
}

@media (max-width: 1099px) {
  #demo .so-demo-bar .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #demo .so-demo-bar .demo-note {
    margin-left: 0;
  }
}

@media (max-width: 639px) {
  #demo .so-demo-bar .tab {
    grid-template-rows: auto;
    row-gap: 0;
  }

  #demo .so-demo-bar .tab-n,
  #demo .so-demo-bar .tab-l {
    grid-row: auto;
  }

  #demo .so-demo-bar .tab-m {
    display: none;
  }

  #demo .so-demo-bar .tab-l {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
  }
}

/* ---------- Grid ---------- */

#demo .so-grid {
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

#demo .so-col-store {
  min-width: 0;
}

#demo .so-label {
  min-height: 40px;
  gap: 16px;
}

#demo .so-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

#demo .so-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 28px;
  align-items: stretch;
  min-width: 0;
}

#demo .so-col-log,
#demo .so-col-team {
  min-width: 0;
}

#demo .so-mini {
  display: none;
}

#demo .so-nav {
  display: none;
}

#demo .so-controls {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

/* ---------- Store admin (light skin, declared here) ---------- */

#demo .so-store {
  --sa-bar: #1a1a1a;
  --sa-bar-ink: #e3e3e3;
  --sa-bg: #f1f1f1;
  --sa-card: #ffffff;
  --sa-ink: #303030;
  --sa-muted: #616161;
  --sa-faint: #8a8a8a;
  --sa-line: #e3e3e3;
  --sa-brand: #2f6f73;
  --sa-new: hsl(45 90% 96%);
  --sa-ok-bg: #cdfee1;
  --sa-ok: #0c5132;
  --sa-warn-bg: #ffeb78;
  --sa-warn: #4f4700;
  --sa-bad-bg: #fedad9;
  --sa-bad: #8e0b21;
  --sa-info-bg: #e0f0ff;
  --sa-info: #00527c;

  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: var(--so-h);
  border: 1px solid hsl(0 0% 100% / 0.08);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--sa-bg);
  font-family: var(--font-sans);
  color: var(--sa-ink);
}

#demo .so-store-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  flex: none;
  padding: 0 12px;
  background: var(--sa-bar);
}

#demo .so-store-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 6px;
  background: var(--sa-brand);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
}

#demo .so-store-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--sa-bar-ink);
}

#demo .so-store-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sa-faint);
}

#demo .so-store-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #29c46b;
}

#demo .so-store-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  flex: none;
  height: 36px;
  padding: 0 8px;
  background: var(--sa-card);
  border-bottom: 1px solid var(--sa-line);
}

#demo .so-store-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sa-muted);
  white-space: nowrap;
}

#demo .so-store-pill.is-on {
  background: var(--sa-bg);
  color: var(--sa-ink);
}

#demo .so-store-pill.is-hit::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  animation: so-bar 1.6s ease-out forwards;
}

#demo .so-feed {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  overflow: hidden;
  background: var(--sa-bg);
}

/* Focus card: the one store event the scenario is about */
#demo .so-ev {
  position: relative;
  flex: none;
  padding: 12px 12px 10px;
  background: var(--sa-card);
  border: 1px solid var(--sa-line);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

#demo .so-ev::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: var(--accent);
  opacity: 0;
}

#demo .so-ev.is-live {
  animation: so-ev-in 0.42s var(--ease-out) both;
}

#demo .so-ev.is-live::before {
  animation: so-mark 1.6s ease-out both;
}

#demo .so-ev-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

#demo .so-ev-tile {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--sa-bg);
  border: 1px solid var(--sa-line);
  color: var(--sa-ink);
}

#demo .so-ev-ico {
  display: inline-grid;
  place-items: center;
}

#demo .so-ev-ico svg,
#demo .so-ico svg {
  width: 15px;
  height: 15px;
}

#demo .so-ev-main {
  min-width: 0;
}

#demo .so-ev-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--sa-ink);
  overflow-wrap: break-word;
}

#demo .so-ev-sub {
  margin: 2px 0 0;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--sa-muted);
  overflow-wrap: break-word;
}

#demo .so-ev-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

#demo .so-ev-time {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: #6b6b6b;
  white-space: nowrap;
}

#demo .so-ev-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 130px;
}

#demo .so-ev-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

#demo .so-ev-chip.is-ok {
  background: var(--sa-ok-bg);
  color: var(--sa-ok);
}

#demo .so-ev-chip.is-warn {
  background: var(--sa-warn-bg);
  color: var(--sa-warn);
}

#demo .so-ev-chip.is-bad {
  background: var(--sa-bad-bg);
  color: var(--sa-bad);
}

#demo .so-ev-chip.is-info {
  background: var(--sa-info-bg);
  color: var(--sa-info);
}

#demo .so-ev-chip.is-muted {
  background: var(--sa-bg);
  color: var(--sa-muted);
}

#demo .so-ev-chip.is-gold {
  background: var(--accent);
  color: var(--accent-ink);
}

#demo .so-ev-chip.is-live {
  animation: so-pop 0.4s var(--ease-out) both;
}

#demo .so-ev-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
}

#demo .so-ev-badge.is-live {
  animation: so-pop 0.45s var(--ease-out) both;
}

#demo .so-ev-body {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--sa-line);
}

#demo .so-ev-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 26px;
}

#demo .so-glyph {
  display: block;
  flex: none;
}

#demo .so-glyph svg {
  display: block;
}

#demo .so-ev-name {
  min-width: 0;
  font-size: 14px;
  color: var(--sa-ink);
  overflow-wrap: break-word;
}

#demo .so-ev-qty {
  font-size: 12.5px;
  color: var(--sa-muted);
  white-space: nowrap;
}

#demo .so-ev-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--sa-line);
}

#demo .so-ev-count {
  font-size: 14px;
  color: var(--sa-muted);
}

#demo .so-ev-amt {
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--sa-ink);
}

#demo .so-ev-consent {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 26px;
}

#demo .so-ev-cbox {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--sa-brand);
  color: #fff;
}

#demo .so-ev-cbox svg {
  width: 10px;
  height: 10px;
}

#demo .so-ev-consent span:nth-child(2) {
  min-width: 0;
  font-size: 14px;
  color: var(--sa-ink);
}

#demo .so-ev-consent .so-ev-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sa-muted);
  white-space: nowrap;
}

/* Stock: product tile, Available number, stock bar */
#demo .so-ev-stock {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

#demo .so-ev-avail-l {
  display: block;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sa-muted);
}

#demo .so-ev-avail {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--sa-ink);
}

#demo .so-ev-bar {
  display: block;
  height: 6px;
  margin-top: 6px;
  border-radius: 3px;
  background: var(--sa-line);
  overflow: hidden;
}

#demo .so-ev-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--sa-brand);
  transition: width 0.2s linear;
}

#demo .so-ev[data-tone="warn"] .so-ev-fill {
  background: #e8912d;
}

/* Review: stars, the quote, and the reply the automation posts */
#demo .so-ev-stars {
  display: flex;
  align-items: center;
  gap: 3px;
}

#demo .so-ev-stars svg {
  width: 14px;
  height: 14px;
}

#demo .so-ev-stars-n {
  margin-left: 8px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sa-muted);
}

#demo .so-ev-quote {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--sa-ink);
}

#demo .so-ev-reply {
  margin-top: 10px;
  padding: 8px 10px;
  background: #f7f7f7;
  border-left: 3px solid var(--sa-brand);
  border-radius: 0 6px 6px 0;
}

#demo .so-ev-reply-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--sa-ink);
}

#demo .so-ev-reply-t {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--sa-ink);
}

/* Detail rows and tags */
#demo .so-ev-rows {
  display: flex;
  flex-direction: column;
}

#demo .so-ev-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 26px;
  overflow: hidden;
}

#demo .so-ev-row.is-live {
  animation: so-row-in 0.3s var(--ease-out) both;
}

#demo .so-ev-rk {
  min-width: 0;
  font-size: 13.5px;
  color: var(--sa-muted);
  overflow-wrap: break-word;
}

#demo .so-ev-rv {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sa-ink);
  white-space: nowrap;
}

#demo .so-ev-rv svg {
  width: 12px;
  height: 12px;
}

#demo .so-ev-row.is-ok .so-ev-rv {
  color: var(--sa-ok);
}

#demo .so-ev-row.is-warn .so-ev-rv {
  color: #8a5a00;
}

#demo .so-ev-row.is-gold {
  position: relative;
  padding-left: 8px;
}

#demo .so-ev-row.is-gold::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

#demo .so-ev-row.is-gold .so-ev-rv {
  font-weight: 650;
}

#demo .so-ev-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

#demo .so-ev-tags:empty {
  display: none;
}

#demo .so-ev-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--sa-line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--sa-bg);
  font-size: 13px;
  color: var(--sa-ink);
}

/* Activity card: the store's other recent rows */
#demo .so-act {
  flex: none;
  overflow: hidden;
  background: var(--sa-card);
  border: 1px solid var(--sa-line);
  border-radius: 10px;
}

#demo .so-act-h {
  margin: 0;
  padding: 8px 12px 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b6b6b;
}

#demo .so-act-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px;
  border-top: 1px solid var(--sa-line);
}

#demo .so-act-row.is-new {
  animation: so-act-in 0.35s var(--ease-out) both;
}

#demo .so-act-row.is-new::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  animation: so-mark 1.6s ease-out both;
}

#demo .so-act-ic {
  display: grid;
  place-items: center;
  color: var(--sa-muted);
}

#demo .so-act-ic svg {
  width: 14px;
  height: 14px;
}

#demo .so-act-main {
  min-width: 0;
}

#demo .so-act-t {
  margin: 0;
  font-size: 14px;
  color: var(--sa-ink);
  overflow-wrap: break-word;
}

#demo .so-act-s {
  margin: 1px 0 0;
  font-size: 13px;
  color: var(--sa-muted);
  overflow-wrap: break-word;
}

#demo .so-act-r {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

#demo .so-act-v {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--sa-ink);
  white-space: nowrap;
}

#demo .so-act-tm {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #6b6b6b;
  white-space: nowrap;
}

#demo .so-act-r .so-act-chip {
  font-size: 12px;
  padding: 1px 6px;
}

/* ---------- Behind the scenes ---------- */

#demo .so-logp {
  display: flex;
  flex-direction: column;
  height: var(--so-h);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

#demo .so-count {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  flex: none;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

#demo .so-cnt {
  position: relative;
  min-width: 0;
}

#demo .so-cnt-l {
  display: block;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
  overflow-wrap: break-word;
  color: var(--ash);
}

#demo .so-cnt-n {
  position: relative;
  display: inline-block;
  margin-top: 4px;
}

#demo .so-roll {
  position: relative;
  display: block;
  height: 1.1em;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--bone);
}

#demo .so-roll-v {
  display: block;
}

#demo .so-roll-v.is-out {
  position: absolute;
  left: 0;
  top: 0;
  animation: so-roll-out 0.45s var(--ease-out) forwards;
}

#demo .so-roll-v.is-in {
  animation: so-roll-in 0.45s var(--ease-out) both;
}

#demo .so-cnt-sub {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--ash);
  white-space: nowrap;
}

#demo .so-cnt-sub.is-live {
  animation: so-fade 0.45s var(--ease-out) both;
}

#demo .so-plus {
  position: absolute;
  left: calc(100% + 6px);
  top: 4px;
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--accent);
  pointer-events: none;
  animation: so-plus-up 0.9s var(--ease-out) forwards;
}

#demo .so-log {
  flex: 1 1 0;
  min-height: 0;
  margin: 0;
  padding: 4px 16px 12px;
  list-style: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
}

#demo .so-log-e {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
}

#demo .so-log-e:first-child {
  border-top: 0;
}

#demo .so-log-e.is-live {
  animation: so-log-in 0.35s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 120ms);
}

#demo .so-log-e.is-new::before {
  content: "";
  position: absolute;
  inset: 4px 0;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: var(--r-lg);
  pointer-events: none;
  animation: so-log-new 1.2s var(--ease-std) forwards;
}

#demo .so-log-ic {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--elev);
  color: var(--ash);
}

#demo .so-log-ic svg {
  width: 14px;
  height: 14px;
}

#demo .so-log-b {
  min-width: 0;
}

#demo .so-log-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#demo .so-log-t {
  min-width: 0;
  margin: 0;
  padding-top: 1px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--bone);
  overflow-wrap: anywhere;
}

#demo .so-log-tx.is-swap {
  animation: so-fade 0.4s var(--ease-out) both;
}

#demo .so-log-tm {
  flex: none;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ash);
  white-space: nowrap;
}

/* 1280 to 1359px: the log column is narrower, so entries go to 7px padding (fits the finished state) */
@media (min-width: 1280px) and (max-width: 1359px) {
  #demo .so-side {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
  }

  #demo .so-log-e {
    padding: 6px 0;
  }

  #demo .so-log {
    padding: 2px 16px 8px;
  }

  #demo .so-log-t {
    font-size: 14.5px;
    line-height: 1.35;
  }

  #demo .so-count {
    padding: 8px 16px;
  }

  #demo .so-card {
    padding: 8px 10px;
  }

  #demo .so-rw-cap,
  #demo .so-sp-cap {
    margin-top: 6px;
  }
}

/* Icon colours by kind; a check turns green once its reply has landed */
#demo .so-log-e--event .so-log-ic,
#demo .so-log-e--data .so-log-ic {
  color: var(--ash);
}

#demo .so-log-e--data .so-log-ic {
  color: var(--bone-70);
}

#demo .so-log-e--rule .so-log-ic,
#demo .so-log-e--forecast .so-log-ic,
#demo .so-log-e--ai .so-log-ic,
#demo .so-log-e--alert .so-log-ic {
  color: var(--accent);
}

#demo .so-log-e--check .so-log-ic,
#demo .so-log-e--guard .so-log-ic {
  color: var(--info);
}

#demo .so-log-e--check.is-done .so-log-ic,
#demo .so-log-e--person .so-log-ic,
#demo .so-log-e--action .so-log-ic,
#demo .so-log-e--consent .so-log-ic,
#demo .so-log-e--send .so-log-ic {
  color: var(--ok);
}

#demo .so-log-e--win .so-log-ic {
  color: var(--accent);
  background: rgb(255 255 255 / 0.12);
}

#demo .so-log-e--idle {
  grid-template-columns: minmax(0, 1fr);
  padding: 7px 0;
}

#demo .so-log-e--idle .so-log-t {
  font-size: 14.5px;
  color: var(--ash);
}

#demo .so-log-e--idle .live-dot {
  margin-right: 8px;
  vertical-align: middle;
}

/* Pending: three dots after the text and a 2px gold shimmer under it */
#demo .so-log-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  vertical-align: middle;
}

#demo .so-log-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  animation: so-dot 1.2s ease-in-out infinite;
}

#demo .so-log-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

#demo .so-log-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

#demo .so-log-shim {
  display: block;
  height: 2px;
  margin-top: 9px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--line) 0%, var(--accent) 50%, var(--line) 100%);
  background-size: 200% 100%;
  animation: so-shim 1.4s linear infinite;
}

/* Cards under an entry (the automation's working, shown) */
#demo .so-card {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 6px;
}

#demo .so-card-t {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ash);
}

/* Meter: order total against the $250 threshold */
#demo .so-meter-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

#demo .so-meter-l {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .so-meter-v {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

#demo .so-meter-track {
  position: relative;
  height: 6px;
  margin: 26px 0 8px;
  border-radius: 3px;
  background: var(--line);
}

#demo .so-meter-fill {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(var(--p, 1));
}

#demo .so-meter.is-live .so-meter-fill {
  animation: so-fill 0.6s var(--ease-out) both;
}

#demo .so-meter-tick {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  background: var(--bone-70);
}

#demo .so-meter-mark {
  position: absolute;
  bottom: 100%;
  margin-bottom: 6px;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
}

#demo .so-meter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

#demo .so-meter-f {
  min-width: 0;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--ash);
}

#demo .so-meter-verdict {
  flex: none;
  padding: 2px 6px;
  border: 1px solid rgb(255 255 255 / 0.5);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

/* Phones: the threshold caption stacks above the verdict chip (visual-02) */
@media (max-width: 480px) {
  #demo .so-meter-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* Short label for the shipping row on phones (visual-01) */
#demo .so-ev-rk .so-rk-s {
  display: none;
}

@media (max-width: 480px) {
  #demo .so-ev-rk .so-rk-l {
    display: none;
  }

  #demo .so-ev-rk .so-rk-s {
    display: inline;
  }
}

/* Key-value rows: the order's shipping and billing check */
#demo .so-kv {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  margin: 0;
}

#demo .so-kv dt,
#demo .so-kv dd {
  height: 22px;
  margin: 0;
  display: flex;
  align-items: center;
}

#demo .so-kv dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .so-kv dd {
  min-width: 0;
  font-size: 14.5px;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .so-kv dd.is-ok {
  color: var(--ok);
}

/* Sales speed: 14 days of sales bars against the average */
#demo .so-spark-plot {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 44px;
}

#demo .so-sp-bar {
  flex: 1 1 0;
  min-width: 0;
  height: 0;
  border-radius: 1px 1px 0 0;
  background: hsl(42 30% 94% / 0.22);
  transform-origin: bottom center;
}

#demo .so-sp-bar.is-last {
  background: hsl(42 30% 94% / 0.5);
}

#demo .so-spark.is-live .so-sp-bar {
  animation: so-grow 0.5s var(--ease-out) both;
}

#demo .so-sp-avg {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed var(--accent);
}

#demo .so-sp-avgl {
  position: absolute;
  right: 0;
  transform: translateY(-100%);
  margin-top: -3px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  white-space: nowrap;
}

#demo .so-sp-cap {
  margin: 8px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ash);
}

/* Stock runway: the chart the reorder decision is made from */
#demo .so-rw-host {
  position: relative;
  width: 100%;
  min-height: 140px;
}

#demo .so-rw-svg {
  display: block;
  overflow: visible;
}

#demo .so-rw-grid {
  stroke: var(--line);
  stroke-width: 1;
}

#demo .so-rw-ax,
#demo .so-rw-lbl,
#demo .so-rw-add {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  fill: var(--ash);
}

#demo .so-rw-add {
  fill: var(--accent);
}

#demo .so-rw-lbl {
  letter-spacing: 0.02em;
}

#demo .so-rw-val {
  font-family: var(--font-sans);
  font-size: 13px;
  fill: var(--bone-70);
}

#demo .so-rw-out {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  fill: var(--danger);
}

#demo .so-rw-cvl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  fill: rgb(255 255 255);
}

#demo .so-rw-lead {
  stroke: var(--ash);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

#demo .so-rw-band {
  fill: hsl(152 60% 48% / 0.1);
}

#demo .so-rw-a,
#demo .so-rw-b,
#demo .so-rw-new {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#demo .so-rw-b.so-rw-old {
  stroke: hsl(36 8% 60% / 0.4);
  stroke-dasharray: 3 3;
}

#demo .so-rw-cov {
  fill: none;
  stroke: rgb(255 255 255 / 0.7);
  stroke-width: 1;
}

#demo .so-rw-dot {
  fill: var(--accent);
}

#demo .so-rw-dot.is-danger {
  fill: var(--danger);
}

#demo .so-rw-dot.is-old {
  fill: hsl(36 8% 60% / 0.6);
}

#demo .so-rw-out.is-old {
  fill: hsl(36 8% 60%);
}

#demo .so-rw-a.is-draw,
#demo .so-rw-b.is-draw2 {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

#demo .so-rw-a.is-draw {
  animation: so-draw 0.58s var(--ease-std) forwards;
}

#demo .so-rw-b.is-draw2 {
  animation: so-draw 0.12s var(--ease-std) 0.58s forwards;
}

#demo .so-rw-new.is-draw3 {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: so-draw 0.9s var(--ease-std) forwards;
}

#demo .so-rw-cap {
  margin: 8px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--ash);
}

/* What the AI read: review text with the phrases it marked */
#demo .so-quote-tx {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--bone-70);
}

#demo .so-q-m {
  position: relative;
  color: var(--bone);
}

#demo .so-q-m::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  transform-origin: left center;
}

#demo .so-q-m.is-ok::after {
  background: hsl(152 60% 48% / 0.7);
}

#demo .so-q-m.is-bad {
  background: hsl(0 70% 52% / 0.14);
}

#demo .so-q-m.is-bad::after {
  background: var(--danger);
}

#demo .so-quote.is-live .so-q-m::after {
  animation: so-scalex 0.3s var(--ease-std) 0.3s both;
}

#demo .so-quote.is-live .so-q-m::after {
  transform: scaleX(0);
}

#demo .so-quote .so-card-t {
  margin-top: 8px;
}

/* Draft reply typed out in Saltmere's voice */
#demo .so-draft-tx {
  margin: 6px 0 0;
  min-height: 3.2em;
  font-size: 15px;
  line-height: 1.5;
  color: var(--bone);
}

#demo .so-draft-tx.is-typing::after {
  content: "";
  display: inline-block;
  width: 1.5px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: so-caret 0.9s steps(1) infinite;
}

#demo .so-draft-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

#demo .so-draft-chip {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
}

/* Consent: the opt-in box the automation checked before any message */
#demo .so-consent {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

#demo .so-cs-box {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #2f6f73;
  color: #fff;
}

#demo .so-cs-box svg {
  width: 11px;
  height: 11px;
}

#demo .so-cs-l {
  display: block;
  font-size: 15px;
  line-height: 1.3;
  color: var(--bone);
}

#demo .so-cs-m {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .so-cs-st {
  padding: 2px 6px;
  border: 1px solid hsl(152 60% 48% / 0.4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ok);
  white-space: nowrap;
}

/* Doc: the page the answer came from (03's doc card) */
#demo .so-doc {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: var(--elev);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

#demo .so-doc-t {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .so-doc-l {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--bone-70);
}

#demo .so-doc-l + .so-doc-l {
  margin-top: 4px;
}

/* ---------- Team and customer ---------- */

#demo .so-view {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 3px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 999px;
}

#demo .so-view button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  color: var(--ash);
  transition: color 0.2s, background-color 0.2s;
}

#demo .so-view button svg {
  flex: none;
  width: 13px;
  height: 13px;
}

#demo .so-view button:hover {
  color: var(--bone);
}

#demo .so-view button[aria-pressed="true"] {
  background: var(--bone);
  color: var(--ink);
}

#demo .so-view button.has-dot::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

#demo .so-label > .mono:first-child {
  flex: none;
  white-space: nowrap;
}

#demo .so-team-label {
  min-width: 0;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

#demo .so-sl-day {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin: 0 0 12px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sl-muted);
}

#demo .so-sl-day::before,
#demo .so-sl-day::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--sl-line);
}

#demo .so-team {
  position: relative;
  height: var(--so-h);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

/* Slack skin (dark), declared on the views that draw Slack */
#demo .so-slack,
#demo .so-toast {
  --sl-bg: #1a1d21;
  --sl-raise: #222529;
  --sl-line: rgba(255, 255, 255, 0.1);
  --sl-ink: #d1d2d3;
  --sl-bright: #f8f8f8;
  --sl-muted: #ababad;
  --sl-green: #007a5a;
  --sl-green-2: #148567;
  --sl-new: rgba(242, 199, 68, 0.08);
  --sl-at-bg: rgba(242, 199, 68, 0.2);
  --sl-at: #f2c744;
  --sa-brand: #2f6f73;
}

#demo .so-slack {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--sl-bg);
  border: 1px solid var(--sl-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--sl-ink);
}

#demo .so-sl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
  height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--sl-line);
}

#demo .so-sl-chan {
  font-size: 16px;
  font-weight: 700;
  color: var(--sl-bright);
}

#demo .so-sl-people {
  display: inline-flex;
  align-items: center;
}

#demo .so-av {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: -6px;
  border-radius: 50%;
  border: 2px solid var(--sl-bg);
  background: var(--av, #666);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: #fff;
}

#demo .so-av:first-child {
  margin-left: 0;
}

#demo .so-sl-count {
  margin-left: 8px;
  font-size: 14px;
  color: var(--sl-muted);
}

#demo .so-sl-list {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 14px;
  overflow: hidden;
}

#demo .so-sl-seed {
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr);
  gap: 10px;
  flex: none;
  margin-bottom: 10px;
  opacity: 0.72;
}

#demo .so-sl-bar {
  border-radius: 2px;
}

#demo .so-sl-s1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

#demo .so-sl-stime {
  flex: none;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #c2c3c5;
  white-space: nowrap;
}

#demo .so-sl-stitle {
  min-width: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--sl-bright);
  overflow-wrap: break-word;
}

#demo .so-sl-s2 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 2px 0 0;
  min-width: 0;
  font-size: 14px;
  color: var(--sl-muted);
  line-height: 1.35;
}

#demo .so-sl-tick {
  display: inline-grid;
  flex: none;
  width: 12px;
  height: 12px;
  color: var(--sl-muted);
}

#demo .so-sl-tick svg {
  width: 12px;
  height: 12px;
}

#demo .so-sl-msg {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  flex: none;
  padding: 8px 6px;
  border-radius: 6px;
}

#demo .so-sl-msg.is-live {
  animation: so-sl-in 0.36s var(--ease-out) both, so-sl-hl 2.4s ease-out both;
}

#demo .so-sl-app {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 22%;
  background: var(--sa-brand);
  color: #fff;
}

#demo .so-sl-app svg {
  width: 18px;
  height: 18px;
}

#demo .so-sl-body {
  min-width: 0;
}

#demo .so-sl-l1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  line-height: 1.2;
}

#demo .so-sl-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--sl-bright);
}

#demo .so-sl-badge {
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--sl-raise);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sl-muted);
}

#demo .so-sl-time {
  font-size: 13.5px;
  color: var(--sl-muted);
}

#demo .so-sl-title {
  margin: 3px 0 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--sl-bright);
}

#demo .so-sl-at {
  display: inline-block;
  margin-right: 6px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--sl-at-bg);
  color: var(--sl-at);
  font-weight: 700;
}

#demo .so-sl-text {
  margin: 2px 0 0;
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--sl-ink);
}

#demo .so-sl-att {
  margin-top: 8px;
  padding: 2px 0 2px 12px;
  border-left: 4px solid var(--accent);
}

#demo .so-sl-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

#demo .so-sl-k {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--sl-bright);
}

#demo .so-sl-v {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  color: var(--sl-ink);
}

#demo .so-sl-ql {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sl-muted);
}

#demo .so-sl-q {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--sl-ink);
}

#demo .so-sl-att .so-sl-fields + .so-sl-ql {
  margin-top: 8px;
}

#demo .so-sl-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  transition: opacity 0.4s var(--ease-std);
}

#demo .so-sl-btns.is-used {
  opacity: 0.55;
}

#demo .so-sl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: var(--sl-ink);
  transition: background-color 0.2s, color 0.2s;
}

#demo .so-sl-btn.is-primary {
  background: var(--sl-green);
  border-color: var(--sl-green);
  color: #fff;
}

#demo .so-sl-btn.is-press {
  background: var(--sl-green-2);
  color: transparent;
}

#demo .so-sl-btn.is-press::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: so-spin 0.7s linear infinite;
}

#demo .so-sl-tk {
  display: inline-grid;
  width: 12px;
  height: 12px;
}

#demo .so-sl-tk svg {
  width: 12px;
  height: 12px;
}

#demo .so-sl-res {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--sl-muted);
}

#demo .so-sl-res .so-av {
  width: 16px;
  height: 16px;
  margin: 0;
  border: 0;
  font-size: 10px;
}

#demo .so-sl-res svg {
  flex: none;
  width: 12px;
  height: 12px;
  color: #2eb67d;
}

#demo .so-sl-input {
  flex: none;
  height: 46px;
  padding: 8px 14px;
  border-top: 1px solid var(--sl-line);
}

#demo .so-sl-input span {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 15px;
  color: var(--sl-muted);
}

/* WhatsApp: the phone, the Slack toast over it and the gold Cart recovered badge */
#demo .so-wa {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  --phone-fs: 11.5px;
}

#demo .so-demo-phone {
  flex: none;
}

#demo .so-wa-media {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  margin: -0.42em -0.6em 0.5em;
  padding: 0.6em 0.7em 0.5em;
  border-radius: 0.65em 0.65em 0 0;
  background: radial-gradient(120% 90% at 50% 20%, #f4ece0, #e3d6c3);
}

#demo .so-wa-tiles {
  display: flex;
  align-items: flex-end;
  gap: 0.2em;
}

#demo .so-wa-tiles .so-glyph {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

#demo .so-wa-cap {
  font-size: 0.7em;
  letter-spacing: 0.02em;
  color: #6b5d48;
}

#demo .so-wa-link {
  display: inline-block;
  margin-top: 0.2em;
  color: var(--wa-link);
}

#demo .so-wa-btn-ico {
  flex: none;
}

#demo .so-toast {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 4;
  padding: 9px 12px;
  background: var(--sl-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid #2eb67d;
  border-radius: 10px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.42s var(--ease-out), transform 0.42s var(--ease-out);
  pointer-events: none;
}

#demo .so-toast.is-on {
  opacity: 1;
  transform: none;
}

#demo .so-toast-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#demo .so-toast-av {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 22%;
  background: var(--sa-brand);
  color: #fff;
}

#demo .so-toast-av svg {
  width: 11px;
  height: 11px;
}

#demo .so-toast-h {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--sl-muted);
}

#demo .so-toast-t {
  margin: 4px 0 0;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--sl-bright);
}

#demo .so-recovered {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 14px 30px -12px rgb(255 255 255 / 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
}

#demo .so-recovered.is-on {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
}

#demo .so-recovered.is-live {
  animation: so-rec-in 0.48s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

#demo .so-recovered.is-live::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: so-ring 0.9s ease-out both;
  pointer-events: none;
}

#demo .so-rec-ico {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
}

#demo .so-rec-ico svg {
  width: 16px;
  height: 16px;
}

/* Carousel: 1279px and below, one pane at a time */
@media (max-width: 1279px) {
  #demo .so-grid {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
  }

  #demo .so-right {
    gap: 12px;
  }

  #demo .so-nav {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 999px;
    justify-self: start;
  }

  #demo .so-nav button {
    position: relative;
    min-height: 32px;
    height: auto;
    box-sizing: border-box;
    padding: 0 14px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 15px;
    line-height: 1.2;
    color: var(--ash);
  }

  #demo .so-nav button[aria-pressed="true"] {
    background: var(--bone);
    color: var(--ink);
  }

  #demo .so-nav button.has-dot::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
  }

  #demo .so-side {
    display: flex;
    overflow: hidden;
    gap: 0;
  }

  #demo .so-side > .demo-col {
    flex: none;
    width: 100%;
    transition: transform 0.6s var(--ease-out), visibility 0.6s;
  }

  #demo .so-side[data-show="team"] > .so-col-log,
  #demo .so-side:not([data-show="team"]) > .so-col-team {
    visibility: hidden;
  }

  #demo .so-side[data-show="team"] > .demo-col {
    transform: translateX(-100%);
  }

  #demo .demo-status,
  #demo .demo-status-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

#demo .demo-status {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

#demo .demo-status-text {
  overflow: visible;
  text-overflow: clip;
}

/* 900px and below: one column; the store panel is shorter, the carousel sits under it */
@media (max-width: 900px) {
  #demo .so-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 16px;
  }

  #demo .so-store {
    flex: none;
    height: 480px;
    min-height: 0;
  }

  #demo .so-right {
    display: flex;
    flex-direction: column;
  }

  #demo .so-nav {
    order: 2;
  }

  #demo .so-side {
    order: 3;
  }

  #demo .so-side > .demo-col {
    transition: transform 0.6s var(--ease-out), visibility 0.6s;
  }

  #demo .demo-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
  }

  #demo .demo-live {
    order: 1;
  }

  #demo .demo-clock {
    order: 2;
    font-size: 12px;
    padding: 5px 10px;
  }

  #demo .demo-status {
    order: 3;
    white-space: normal;
    overflow: visible;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    min-height: 4.6em;
  }

  #demo .so-controls {
    padding: 12px 16px;
  }
}

/* Phones: one-line status of the newest entry sits above the carousel */
@media (max-width: 640px) {
  #demo .so-mini {
    display: block;
    order: 1;
    margin: 0;
    padding: 0 2px;
    min-width: 0;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    line-height: 1.4;
    overflow-wrap: break-word;
    color: var(--ash);
  }

  #demo .so-nav {
    order: 2;
  }

  #demo .so-side {
    order: 3;
  }

  #demo .so-ev-chips {
    max-width: 110px;
  }

  #demo .so-store-pill {
    font-size: 13px;
    padding: 4px 8px;
  }

  #demo .so-sl-msg {
    padding: 8px 2px;
  }

  #demo .so-sl-list {
    padding: 12px 10px;
  }

  /* Phones: the log keeps its fixed height and scrolls inside (no stage jump as entries arrive) */
  #demo .so-mini {
    min-height: 2.8em;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  #demo .so-view button,
  #demo .so-nav button {
    min-height: 40px;
  }
}

#demo .demo-speed button {
  position: relative;
}

#demo .demo-speed button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
  #demo .demo-ctl,
  #demo .demo-speed button {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  #demo .so-ev-head {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  #demo .so-ev-side {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
  }

  #demo .so-ev-chips {
    max-width: none;
    justify-content: flex-start;
  }

  #demo .so-label {
    flex-wrap: wrap;
    row-gap: 8px;
    min-height: 0;
  }

  #demo .so-label > .so-view {
    max-width: 100%;
  }

  #demo .so-demo-phone {
    --phone-fs: 11px;
  }
}

@media (min-width: 1280px) {
  #demo .so-wa {
    --phone-fs: 12.5px;
  }
}

@media (min-width: 1280px) {
  #demo .so-grid {
    grid-template-columns: 340px minmax(0, 1fr);
  }
}

/* Touch: bigger targets for the switch and the side nav */
@media (pointer: coarse) {
  #demo .so-view button,
  #demo .so-nav button {
    min-height: 44px;
  }
}

/* Workflow link under the stage: 44px tap target */
#demo .demo-after {
  margin-top: 8px;
}

#demo .demo-after .link-mono {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 0;
}

/* Presale-style caption: the space is always reserved, the text hides on tabs without one */
#demo .so-demo-caption {
  margin: 16px 0 0;
  max-width: 60ch;
  min-height: calc(1.5em * 2);
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-transform: none;
  color: var(--bone-70);
}

#demo .so-demo-caption.is-off {
  visibility: hidden;
}

/* ---------- Keyframes ---------- */

@keyframes so-ev-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes so-mark {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes so-bar {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes so-pop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  60% {
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes so-row-in {
  from {
    opacity: 0;
    height: 0;
  }
  to {
    opacity: 1;
    height: 26px;
  }
}

@keyframes so-act-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes so-roll-out {
  to {
    opacity: 0;
    transform: translateY(-100%);
  }
}

@keyframes so-roll-in {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
}

@keyframes so-plus-up {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes so-fade {
  from {
    opacity: 0;
  }
}

@keyframes so-log-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes so-log-new {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes so-dot {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes so-shim {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes so-fill {
  from {
    transform: scaleX(0);
  }
}

@keyframes so-grow {
  from {
    transform: scaleY(0);
  }
}

@keyframes so-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes so-scalex {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes so-caret {
  50% {
    opacity: 0;
  }
}

@keyframes so-sl-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes so-sl-hl {
  from {
    background: var(--sl-new);
  }
  to {
    background: transparent;
  }
}

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

@keyframes so-rec-in {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.6);
  }
}

@keyframes so-ring {
  from {
    box-shadow: 0 0 0 0 rgb(255 255 255 / 0.55);
  }
  to {
    box-shadow: 0 0 0 18px transparent;
  }
}

/* ---------- Static (seeked finished state) and reduced motion: nothing animates ---------- */

#demo .so-demo-stage.is-static *,
#demo .so-demo-stage.is-static *::before,
#demo .so-demo-stage.is-static *::after {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #demo .so-demo-stage *,
  #demo .so-demo-stage *::before,
  #demo .so-demo-stage *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* The gold phrase of the heading moves to its own line as a whole */
#demo .sec-title .gold-i {
  display: inline-block;
}
