/* Automation 12 live demo: price check table (competitor prices), "Behind the scenes" log and
   the #pricing-alerts Slack channel. Stage chrome, controls and the clock come from demo.css.
   Every rule is scoped under #demo and every class invented here starts with pm-.
   Layout: table | log | alerts from 1200px (three columns), table | carousel (log / alerts) from
   901 to 1199px, one column with the carousel under the table at 900px and below. The Slack
   palette (--sl-*) lives on .pm-slack; the simulated status tones come from site.css tokens.
   The promo tone (--pm-promo) is defined on #demo. */

#demo {
  --pm-h: 540px;
  --pm-promo: hsl(28 88% 56%);
  --sl-bg: #1a1d21;
  --sl-raise: #222529;
  --sl-text: #d1d2d3;
  --sl-strong: #f8f8f8;
  --sl-muted: #a6a7aa;
  --sl-line: #35373b;
  --sl-btn: #565856;
  --sl-green: #007a5a;
  --sl-online: #2bac76;
  --sl-link: #1d9bd1;
  --sl-app: rgba(255, 255, 255, 0.12);
}

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

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

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

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

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

#demo .pm-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 .pm-demo-bar .tab-n {
  grid-row: 1 / span 2;
}

#demo .pm-demo-bar .tab-l,
#demo .pm-demo-bar .tab-m {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Sub-labels wrap instead of truncating, at a readable size */
#demo .pm-demo-bar .tab-m {
  grid-column: 2;
  grid-row: 2;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
}

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

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

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

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

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

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

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

  /* Equal pill heights: every label gets room for two lines, and the tap target is 44px */
  #demo .pm-demo-bar .tab {
    min-height: 44px;
  }

  #demo .pm-demo-bar .tab-l {
    min-height: 2.4em;
    display: flex;
    align-items: center;
  }
}

/* Phones: the Behind the scenes / Alerts switch is a full 44px tap target and never wraps */
@media (max-width: 640px) {
  #demo .pm-nav button {
    min-height: 44px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    font-size: 12px;
  }
}

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

#demo .pm-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  padding: 24px;
}

#demo .pm-col-table,
#demo .pm-col-log,
#demo .pm-col-slack {
  min-width: 0;
}

#demo .pm-side {
  display: contents;
}

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

/* Each column header is bounded by its own hairline, so the three read as three headers */
#demo .pm-label {
  min-height: 34px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

/* The status sentence wraps to two lines and the bar always reserves them: no ellipsis, no jump */
#demo .demo-status {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
  min-height: calc(2 * 1.35em);
  align-items: flex-start;
}

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

#demo .pm-log,
#demo .pm-slack,
#demo .pm-pt {
  height: var(--pm-h);
}

@media (max-width: 1359px) and (min-width: 1200px) {
  #demo .pm-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 300px;
    gap: 22px;
  }
}

/* 901 to 1199px: table on the left, one pane at a time on the right */
@media (max-width: 1199px) {
  #demo .pm-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 22px;
  }

  #demo .pm-col-table {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  #demo .pm-nav {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    gap: 2px;
    padding: 3px;
    height: 40px;
    box-sizing: border-box;
    align-self: start;
  }

  #demo .pm-side {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    overflow: hidden;
    align-items: stretch;
  }

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

  #demo .pm-side > .demo-col .pm-label {
    display: none;
  }

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

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

#demo .pm-nav button {
  position: relative;
  flex: 1 1 0;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
  transition: color 0.2s, background-color 0.2s;
}

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

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

#demo .pm-controls {
  align-self: flex-start;
}

/* 900px and below: one column, the table, then the Behind the scenes / Alerts carousel */
@media (max-width: 900px) {
  #demo .pm-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  #demo .pm-col-table {
    grid-column: auto;
    grid-row: auto;
    order: 1;
  }

  #demo .pm-nav {
    display: flex;
    order: 2;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }

  #demo .pm-side {
    display: flex;
    order: 3;
    grid-column: auto;
    grid-row: auto;
    height: 520px;
    overflow: hidden;
    gap: 0;
  }

  #demo .pm-side > .demo-col {
    height: 100%;
  }

  #demo .pm-col-log,
  #demo .pm-col-slack {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  #demo .pm-log,
  #demo .pm-slack {
    height: auto;
    flex: 1 1 0;
    min-height: 0;
  }

  #demo .pm-pt {
    height: auto;
  }

  #demo .pm-pt-body {
    flex: none;
  }

  #demo .pm-controls {
    align-self: center;
  }
}

@media (max-width: 640px) {
  #demo .pm-grid {
    padding: 16px;
  }

  #demo .pm-side {
    height: 500px;
  }
}

/* ---------- Price check table (.pm-pt is the panel) ---------- */

#demo .pm-pt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--bone);
}

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

#demo .pm-pt-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--bone);
}

#demo .pm-pt-sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  line-height: 1.35;
  color: var(--ash);
}

#demo .pm-pt-hl {
  min-width: 0;
}

#demo .pm-run-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#demo .pm-run-pill.is-running {
  color: var(--accent);
  border-color: rgb(255 255 255 / 0.4);
}

#demo .pm-run-pill.is-running::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pm-dot 1s ease-in-out infinite;
}

#demo .pm-run-pill.is-done {
  color: var(--ok);
  border-color: hsl(152 60% 48% / 0.4);
}

#demo .pm-run-pill.is-done::before {
  content: "✓";
  font-size: 12px;
  line-height: 1;
}

#demo .pm-pt-thead {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(0, 1fr));
  align-items: center;
  height: 34px;
  flex: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .pm-th {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  height: 100%;
  font-size: 11.5px;
  white-space: nowrap;
}

#demo .pm-th--prod {
  align-items: flex-start;
  justify-content: center;
  padding-left: 14px;
}

#demo .pm-th--store.is-you {
  color: var(--accent);
}

#demo .pm-sq {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--elev);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--bone-70);
  letter-spacing: 0;
  text-transform: none;
}

#demo .pm-sq.is-you {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

#demo .pm-pt-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#demo .pm-pt-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(0, 1fr));
  flex: 1 1 0;
  min-height: 48px;
  border-bottom: 1px solid hsl(34 10% 17% / 0.6);
  transition: opacity 0.4s var(--ease-std), background-color 0.4s var(--ease-std);
}

#demo .pm-pt-row:last-child {
  border-bottom: 0;
}

/* Dimmed rows still hold real information (SKU, prices, stock), so the dim stays above AA */
#demo .pm-pt-row.is-dim {
  opacity: 0.72;
}

#demo .pm-pt-row.is-focus {
  background: var(--elev);
}

#demo .pm-pt-prod {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding-left: 14px;
}

#demo .pm-pt-row.is-focus .pm-pt-prod::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

/* Product names wrap to two lines, never ellipsis, so a name is always readable */
#demo .pm-pt-name {
  display: -webkit-box;
  font-size: 15px;
  line-height: 1.2;
  color: var(--bone);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

#demo .pm-pt-sku {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ash);
  white-space: nowrap;
}

/* One competitor / your cell */
#demo .pm-pc {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

#demo .pm-pc.is-you {
  background: rgb(255 255 255 / 0.045);
}

#demo .pm-pc.is-carried {
  opacity: 0.82;
}

#demo .pm-pc::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tone, var(--danger));
  opacity: 0;
  pointer-events: none;
}

#demo .pm-pc.is-flash::before {
  animation: pm-flash 0.9s var(--ease-std) forwards;
}

#demo .pm-pc.is-flash::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid var(--tone, var(--danger));
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  animation: pm-ring 0.9s var(--ease-std) forwards;
}

#demo .pm-pc-in {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
  min-width: 0;
}

#demo .pm-pc-in.is-fade {
  animation: pm-cell-in 0.16s var(--ease-out) both;
}

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

#demo .pm-pc-in.is-out {
  animation: pm-roll-out 0.45s var(--ease-out) forwards;
  pointer-events: none;
}

#demo .pm-pv {
  font-size: 15.5px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--bone-70);
  white-space: nowrap;
}

#demo .pm-pv--you {
  color: var(--bone);
  font-weight: 600;
}

#demo .pm-pv--down {
  color: #F0705F;
  font-weight: 600;
}

#demo .pm-pv--promo {
  color: var(--pm-promo);
  font-weight: 600;
}

#demo .pm-pv--new {
  color: var(--bone);
}

#demo .pm-pc-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
}

#demo .pm-pc-s {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 4px;
  max-width: 100%;
}

#demo .pm-was {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ash);
  white-space: nowrap;
}

#demo .pm-was.is-oos {
  font-size: 14px;
  line-height: 1.1;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
}

#demo .pm-chip {
  display: inline-block;
  max-width: 100%;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--ash);
  text-align: center;
  white-space: normal;
}

/* The short 'OOS' twin of 'Out of stock' is for phones only (see pm-demo.js chipEl) */
#demo .pm-chip-s {
  display: none;
}

#demo .pm-chip--down {
  color: #F0705F;
  border-color: hsl(0 70% 56% / 0.5);
}

#demo .pm-chip--promo {
  color: var(--pm-promo);
  border-color: hsl(28 88% 56% / 0.5);
}

#demo .pm-chip--ok {
  color: var(--ok);
  border-color: hsl(152 60% 48% / 0.45);
}

#demo .pm-chip--info {
  color: var(--info);
  border-color: hsl(214 85% 66% / 0.5);
}

#demo .pm-chip--ash {
  color: var(--ash);
  border-color: var(--line);
}

#demo .pm-sk {
  display: block;
  width: 26px;
  height: 8px;
  border-radius: 4px;
  background: var(--elev);
}

#demo .pm-chk {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 34px;
  height: 12px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  animation: pm-pulse 1s ease-in-out infinite;
}

#demo .pm-chk i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--accent);
}

#demo .pm-dash {
  font-size: 15px;
  line-height: 1;
  color: var(--ash);
}

#demo .pm-pc-in.is-review {
  padding: 0;
}

#demo .pm-box {
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--info);
  border-radius: 4px;
  pointer-events: none;
}

/* Legend and the bottom block */
#demo .pm-pt-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 36px;
  padding: 0 14px;
  flex: none;
  border-top: 1px solid var(--line);
}

#demo .pm-legend-more {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

#demo .pm-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

#demo .pm-legend-i {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

#demo .pm-legend-i span {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ash);
}

#demo .pm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ash);
}

#demo .pm-dot--down {
  background: var(--danger);
}

#demo .pm-dot--promo {
  background: var(--pm-promo);
}

#demo .pm-dot--oos {
  background: var(--ok);
}

#demo .pm-dot--new {
  background: var(--info);
}

#demo .pm-pt-bottom {
  min-height: 82px;
  flex: none;
  border-top: 1px solid var(--line);
  min-width: 0;
}

#demo .pm-pt-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 100%;
}

#demo .pm-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 10px 14px;
}

#demo .pm-stat + .pm-stat {
  border-left: 1px solid var(--line);
}

#demo .pm-stat-l {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .pm-stat-v {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}

#demo .pm-stat-v.is-gold {
  color: var(--accent);
}

#demo .pm-stat-s {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--ash);
}

#demo .pm-tray {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 10px 14px;
  min-width: 0;
}

#demo .pm-tray-h {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .pm-tray-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}

#demo .pm-tray-none {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ash);
}

#demo .pm-tc {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 5px;
  align-items: start;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

#demo .pm-tc.is-enter {
  animation: pm-card-in 0.35s var(--ease-out) both;
}

#demo .pm-tc > .pm-sq {
  grid-row: 1 / span 2;
}

#demo .pm-tc-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#demo .pm-tc-t {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  color: var(--bone);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#demo .pm-tc-p {
  margin: 0;
  font-size: 12px;
  color: var(--ash);
  white-space: nowrap;
}

#demo .pm-tc-r {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

#demo .pm-tc--new {
  border-color: hsl(214 85% 66% / 0.5);
}

#demo .pm-tc--matched {
  border-color: hsl(152 60% 48% / 0.45);
}

#demo .pm-tc--matched .pm-tc-t {
  color: var(--bone);
}

#demo .pm-tc--review {
  border-style: dashed;
  border-color: hsl(214 85% 66% / 0.6);
}

#demo .pm-tc--rejected .pm-tc-t {
  color: var(--ash);
  text-decoration: line-through;
}

#demo .pm-tc--rejected {
  opacity: 0.85;
}

/* ---------- Behind the scenes: log ---------- */

#demo .pm-log {
  flex: none;
  min-height: 0;
  margin: 0;
  padding: 10px 16px 12px;
  list-style: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

#demo .pm-log.is-overflow {
  scrollbar-color: var(--line) transparent;
}

#demo .pm-col-log,
#demo .pm-col-slack {
  display: flex;
  flex-direction: column;
}

#demo .pm-log-e {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  animation: pm-log-in 0.35s var(--ease-out) both;
}

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

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

#demo .pm-log-e--idle {
  animation: none;
}

#demo .pm-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 .pm-log-ic svg {
  width: 14px;
  height: 14px;
}

#demo .pm-log-ic .live-dot {
  margin: 0;
}

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

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

/* The run entry reserves its second line from the start, so "· 900 checked" never pushes the log down */
#demo .pm-log-e--run .pm-log-t {
  min-height: 2.8em;
}

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

#demo .pm-log-e--quiet .pm-log-t,
#demo .pm-log-e--idle .pm-log-t {
  color: var(--bone-70);
}

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

#demo .pm-log-done {
  color: var(--ok);
}

/* icon colours: status colours mean the same here as everywhere on the page */
#demo .pm-log-e--run .pm-log-ic,
#demo .pm-log-e--lookup .pm-log-ic,
#demo .pm-log-e--match .pm-log-ic {
  color: var(--ok);
}

#demo .pm-log-e--run.is-pending .pm-log-ic,
#demo .pm-log-e--lookup.is-pending .pm-log-ic,
#demo .pm-log-e--match.is-pending .pm-log-ic {
  color: var(--accent);
}

#demo .pm-log-e--change.tone-down .pm-log-ic {
  color: var(--danger);
  border-color: hsl(0 70% 56% / 0.5);
}

#demo .pm-log-e--change.tone-promo .pm-log-ic {
  color: var(--pm-promo);
  border-color: hsl(28 88% 56% / 0.5);
}

#demo .pm-log-e--change.tone-opp .pm-log-ic {
  color: var(--ok);
  border-color: hsl(152 60% 48% / 0.5);
}

#demo .pm-log-e--alert .pm-log-ic {
  color: var(--accent);
}

#demo .pm-log-e--person .pm-log-ic,
#demo .pm-log-e--action .pm-log-ic {
  color: var(--ok);
}

#demo .pm-log-e--review .pm-log-ic,
#demo .pm-log-e--listing .pm-log-ic,
#demo .pm-log-e--guard .pm-log-ic {
  color: var(--info);
}

#demo .pm-log-e--quiet .pm-log-ic {
  color: var(--ash);
}

#demo .pm-log-e--quiet .pm-log-ic svg {
  width: 6px;
  height: 6px;
}

/* pending: three dots and a shimmer bar */
#demo .pm-dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

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

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

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

#demo .pm-shim {
  display: block;
  position: relative;
  height: 2px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--line-soft);
  overflow: hidden;
}

#demo .pm-shim::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: pm-shim 1.4s var(--ease-std) infinite;
}

/* cards under an entry */
#demo .pm-card {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--elev);
  border: 0;
  border-left: 2px solid var(--line);
  border-radius: 0 6px 6px 0;
  min-width: 0;
}

#demo .pm-card--run {
  border-left-color: var(--accent);
}

#demo .pm-log-e.is-done .pm-card--run {
  border-left-color: var(--ok);
}

#demo .pm-card--banner {
  border-left-color: var(--pm-promo);
  padding: 0;
  overflow: hidden;
}

#demo .pm-card--listing {
  border-left-color: var(--info);
}

#demo .pm-card--match.pm-card--ok {
  border-left-color: var(--ok);
}

#demo .pm-card--match.pm-card--info {
  border-left-color: var(--info);
}

#demo .pm-card--ladder {
  border-left-color: var(--line);
}

#demo .pm-kv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  margin: 0;
}

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

#demo .pm-kv dd {
  margin: 0;
  font-size: 14px;
  color: var(--bone-70);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ticker: the page checks of the run */
#demo .pm-tk-win {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 48px;
  overflow: hidden;
}

#demo .pm-tk-l {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  height: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  color: var(--ash);
  white-space: nowrap;
}

#demo .pm-tk-l:last-child {
  color: var(--bone-70);
}

#demo .pm-tk-l.is-new {
  animation: pm-tk-in 0.3s var(--ease-out) both;
}

#demo .pm-tk-n {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .pm-tk-e {
  flex: none;
}

#demo .pm-tk-r.is-changed {
  font-weight: 600;
}

#demo .pm-tk-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

#demo .pm-tk-bar {
  position: relative;
  flex: 1 1 auto;
  height: 2px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
}

#demo .pm-tk-bar span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

#demo .pm-tk-count {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ash);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* mini page capture (promotion banner) */
#demo .pm-bn-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}

#demo .pm-bn-meta {
  font-size: 11.5px;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

#demo .pm-bn-band {
  padding: 8px 10px;
  background: hsl(28 88% 56% / 0.14);
}

#demo .pm-bn-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  line-height: 1.2;
  color: var(--bone);
}

#demo .pm-bn-text {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--pm-promo);
}

/* listing (new competitor listing) */
#demo .pm-li-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

#demo .pm-li-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

#demo .pm-li-t {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  color: var(--bone);
  min-width: 0;
  overflow-wrap: anywhere;
}

#demo .pm-li-p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ash);
}

/* price ladder (log, Slack) */
#demo .pm-lad {
  position: relative;
  height: 80px;
  min-width: 0;
  margin: 4px 0 0;
  font-family: var(--font-sans);
}

#demo .pm-lad-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 36px;
  height: 1px;
  background: var(--line);
}

#demo .pm-lad-dot {
  position: absolute;
  top: 36px;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--bone-50);
  animation: pm-lad-in 0.3s var(--ease-out) both;
  z-index: 2;
}

#demo .pm-lad-dot.is-down {
  background: var(--danger);
}

#demo .pm-lad-dot.is-you {
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  background: var(--elev);
  border: 2px solid var(--accent);
}

#demo .pm-lad-dot.is-inner {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--bone-70);
  border: 0;
}

#demo .pm-lad-gap {
  position: absolute;
  top: 35px;
  height: 2px;
  background: hsl(0 70% 52% / 0.55);
  z-index: 1;
}

#demo .pm-lad-lbl {
  position: absolute;
  top: 0;
  height: 14px;
  line-height: 14px;
  font-size: 13px;
  color: var(--bone-70);
  white-space: nowrap;
}

#demo .pm-lad-lbl.is-low {
  top: 17px;
}

#demo .pm-lad-lbl.is-down {
  color: #F0705F;
}

#demo .pm-lad-lbl.is-you {
  color: var(--accent);
}

/* The gap figure keeps its own label; fixLadders in pm-demo.js moves a colliding store label down */
#demo .pm-lad-lbl.is-gap {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #F0705F;
}

#demo .pm-lad-lbl.is-hide {
  display: none;
}

#demo .pm-lad-lbl.is-target {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
}

#demo .pm-lad-tgt {
  position: absolute;
  top: 27px;
  height: 18px;
  border-left: 1px dashed var(--accent);
  z-index: 1;
}

#demo .pm-lad-tk {
  position: absolute;
  top: 48px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 12px;
  color: var(--ash);
  white-space: nowrap;
}

#demo .pm-lad-out {
  position: absolute;
  left: 0;
  right: 0;
  top: 64px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  line-height: 14px;
  color: var(--ash);
  white-space: normal;
}

/* match card */
#demo .pm-m-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

#demo .pm-m-tile {
  min-width: 0;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: pm-tile-in 0.3s var(--ease-out) both;
}

#demo .pm-m-tile--l {
  animation-name: pm-tile-in-l;
}

#demo .pm-m-tile--r {
  animation-name: pm-tile-in-r;
}

#demo .pm-m-lb {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .pm-m-t {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  color: var(--bone);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#demo .pm-m-meta {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ash);
  overflow-wrap: anywhere;
}

#demo .pm-m-mid {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#demo .pm-m-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
}

#demo .pm-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
}

#demo .pm-ring svg {
  position: absolute;
  inset: 0;
  width: 40px;
  height: 40px;
  transform: rotate(-90deg);
}

#demo .pm-ring circle {
  fill: none;
  stroke-width: 3;
}

#demo .pm-ring-bg {
  stroke: var(--line);
}

#demo .pm-ring-fg {
  stroke: var(--ok);
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 100.53;
}

#demo .pm-card--info .pm-ring-fg {
  stroke: var(--info);
}

#demo .pm-ring-n {
  position: relative;
  font-size: 14px;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}

#demo .pm-m-rows {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

#demo .pm-m-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr) 16px;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  border-top: 1px solid var(--line-soft);
  animation: pm-row-in 0.3s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 90ms + 300ms);
}

#demo .pm-m-a {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .pm-m-v {
  min-width: 0;
  font-size: 13.5px;
  color: var(--bone-70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .pm-m-st {
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  color: var(--ash);
}

#demo .pm-m-st svg {
  width: 12px;
  height: 12px;
}

#demo .pm-m-st.is-same {
  color: var(--ok);
}

#demo .pm-m-st.is-diff {
  color: var(--danger);
}

#demo .pm-m-verdict {
  margin: 8px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#demo .pm-m-verdict.is-ok {
  color: var(--ok);
}

#demo .pm-m-verdict.is-info {
  color: var(--info);
}

/* ---------- Alerts: the #pricing-alerts Slack channel ---------- */

#demo .pm-slack {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--sl-bg);
  color: var(--sl-text);
  overflow: hidden;
  font-family: var(--font-sans);
}

#demo .pm-sl-head {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 14px;
  flex: none;
  border-bottom: 1px solid var(--sl-line);
}

#demo .pm-sl-hash {
  color: var(--sl-muted);
  font-size: 16.5px;
}

#demo .pm-sl-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--sl-strong);
  white-space: nowrap;
}

#demo .pm-sl-spacer {
  flex: 1 1 auto;
}

#demo .pm-sl-avw {
  position: relative;
  display: inline-flex;
  flex: none;
}

#demo .pm-sl-gw {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4e6b57;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#demo .pm-sl-pres {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-sizing: border-box;
  background: transparent;
  border: 2px solid var(--sl-muted);
  box-shadow: 0 0 0 2px var(--sl-bg);
  transition: background-color 0.3s var(--ease-std), border-color 0.3s var(--ease-std);
}

#demo .pm-sl-pres.is-online {
  background: var(--sl-online);
  border-color: var(--sl-online);
}

#demo .pm-sl-mem {
  flex: none;
  margin-left: 6px;
  font-size: 11.5px;
  color: var(--sl-muted);
  white-space: nowrap;
}

#demo .pm-sl-topic {
  margin: 0;
  padding: 6px 14px;
  flex: none;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--sl-muted);
  border-bottom: 1px solid var(--sl-line);
}

/* The thread sits on the composer: short threads start low (no dead band under the topic bar),
   long threads scroll from the bottom */
#demo .pm-sl-msgs {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  padding: 8px 14px;
  overflow: hidden;
}

#demo .pm-sl-msgs > :first-child {
  margin-top: auto;
}

/* A deeper fade at the top edge, so a cut message reads as a fade, not a clip */
#demo .pm-sl-msgs.is-overflow {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 34px);
  mask-image: linear-gradient(180deg, transparent 0, #000 34px);
}

#demo .pm-sl-day {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 10px 0 8px;
}

#demo .pm-sl-day::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--sl-line);
}

#demo .pm-sl-daypill {
  position: relative;
  padding: 2px 10px;
  border: 1px solid var(--sl-line);
  border-radius: 999px;
  background: var(--sl-bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--sl-strong);
}

#demo .pm-sl-msg {
  display: grid;
  gap: 10px;
  align-items: start;
  padding: 6px 0;
}

#demo .pm-sl-msg--seed {
  grid-template-columns: 28px minmax(0, 1fr);
  opacity: 0.72;
}

#demo .pm-sl-msg--alert {
  grid-template-columns: 36px minmax(0, 1fr);
  padding-top: 10px;
}

#demo .pm-sl-msg--alert.is-in {
  animation: pm-sl-in 0.35s var(--ease-out) both;
}

#demo .pm-sl-av {
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
}

#demo .pm-sl-av--28 {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

#demo .pm-sl-av--36 {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

#demo .pm-sl-av svg {
  width: 60%;
  height: 60%;
  stroke: var(--accent-ink);
  stroke-width: 2;
}

#demo .pm-sl-av.is-ring {
  animation: pm-sl-ring 0.9s var(--ease-std) both;
}

#demo .pm-sl-main {
  min-width: 0;
}

#demo .pm-sl-head-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 0;
  line-height: 1.2;
}

#demo .pm-sl-who {
  font-size: 15px;
  font-weight: 700;
  color: var(--sl-strong);
}

#demo .pm-sl-app {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--sl-app);
  color: #c4c4c4;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

#demo .pm-sl-time {
  margin: 0;
  font-size: 13px;
  color: var(--sl-muted);
}

#demo .pm-sl-text {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--sl-text);
  overflow-wrap: anywhere;
}

#demo .pm-sl-kick {
  font-weight: 700;
}

#demo .pm-sl-reply {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--sl-muted);
}

#demo .pm-sl-reply svg,
#demo .pm-sl-result svg {
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 2px;
  color: var(--sl-online);
}

#demo .pm-slack-card {
  margin-top: 6px;
  padding: 2px 0 2px 12px;
  border-left: 4px solid var(--info);
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--sl-text);
  min-width: 0;
}

#demo .pm-sl-l1 {
  margin: 0;
  overflow-wrap: anywhere;
}

#demo .pm-sl-strong {
  font-weight: 600;
  color: var(--sl-strong);
}

#demo .pm-sl-impact {
  margin: 2px 0 0;
}

#demo .pm-sl-vis {
  margin: 8px 0;
  padding: 10px 12px;
  background: var(--sl-raise);
  border-radius: 6px;
  min-width: 0;
}

#demo .pm-sl-vis .pm-lad {
  height: 80px;
  margin: 0;
}

#demo .pm-sl-vis .pm-lad-lbl {
  color: var(--sl-text);
  font-size: 13.5px;
}

#demo .pm-sl-vis .pm-lad-lbl.is-you {
  color: var(--accent);
}

#demo .pm-sl-vis .pm-lad-lbl.is-down {
  color: #F0705F;
}

#demo .pm-sl-vis .pm-lad-line {
  background: var(--sl-line);
}

#demo .pm-sl-vis .pm-lad-out {
  color: var(--sl-muted);
}

#demo .pm-sl-vis .pm-lad-tk {
  color: var(--sl-muted);
}

#demo .pm-sl-vis .pm-lad-dot {
  background: var(--sl-text);
}

#demo .pm-sl-vis .pm-lad-dot.is-down {
  background: var(--danger);
}

#demo .pm-sl-vis .pm-lad-dot.is-you {
  background: var(--sl-raise);
}

#demo .pm-sl-vis .pm-lad-tgt {
  border-left-color: var(--accent);
}

#demo .pm-sl-vis--items {
  padding: 8px 12px;
}

#demo .pm-sl-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
  padding: 3px 0;
  font-size: 14.5px;
  min-width: 0;
}

/* Product names in full: they wrap rather than shrink to a letter */
#demo .pm-sl-iname {
  flex: 1 1 9em;
  min-width: 0;
  color: var(--sl-strong);
  overflow-wrap: anywhere;
}

#demo .pm-sl-iprice {
  flex: none;
  color: var(--sl-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#demo .pm-sl-iprice b {
  font-weight: 600;
}

#demo .pm-sl-more {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--sl-muted);
}

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

#demo .pm-sl-tile {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--sl-line);
  border-radius: 4px;
  background: var(--sl-bg);
}

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

#demo .pm-sl-tt {
  margin: 2px 0 0;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--sl-strong);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Listing meta (store, price, SKU) wraps in full so the two listings can be compared */
#demo .pm-sl-tm {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--sl-muted);
  overflow-wrap: anywhere;
}

#demo .pm-sl-sugg {
  margin: 0;
  color: var(--sl-text);
  overflow-wrap: anywhere;
}

#demo .pm-sl-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

#demo .pm-sl-btn {
  padding: 6px 12px;
  border: 1px solid var(--sl-btn);
  border-radius: 4px;
  background: transparent;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--sl-text);
  cursor: default;
  transition: transform 0.16s var(--ease-std), filter 0.16s var(--ease-std), background-color 0.16s var(--ease-std);
}

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

#demo .pm-sl-btn.is-pressed {
  transform: scale(0.97);
  filter: brightness(1.15);
}

#demo .pm-sl-btn[data-id="no"].is-pressed {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--sl-text);
  transform: none;
  filter: none;
}

#demo .pm-sl-btn[data-id="update"].is-pressed {
  transform: scale(0.97);
  filter: brightness(1.15);
}

/* The price field under the buttons (opens on the press): grid rows 0fr to 1fr */
#demo .pm-sl-field {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease-std);
}

#demo .pm-sl-field.is-open {
  grid-template-rows: 1fr;
}

#demo .pm-sl-field-in {
  min-height: 0;
  overflow: hidden;
}

#demo .pm-sl-field-in > * {
  margin-left: 0;
}

#demo .pm-sl-field-in {
  margin-top: 0;
}

#demo .pm-sl-field.is-open .pm-sl-field-in {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--sl-raise);
  border-radius: 6px;
}

#demo .pm-sl-flabel {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--sl-muted);
}

#demo .pm-sl-frow {
  display: flex;
  align-items: center;
  gap: 8px;
}

#demo .pm-sl-input {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 32px;
  padding: 6px 10px;
  box-sizing: border-box;
  border: 1px solid #868686;
  border-radius: 4px;
  background: transparent;
  font-size: 16px;
  color: var(--sl-strong);
  font-variant-numeric: tabular-nums;
}

#demo .pm-sl-field.is-open .pm-sl-input {
  border-color: var(--sl-link);
  box-shadow: 0 0 0 1px var(--sl-link), 0 0 0 3px rgba(29, 155, 209, 0.3);
}

#demo .pm-sl-input-v {
  white-space: nowrap;
}

#demo .pm-caret {
  display: inline-block;
  width: 1px;
  height: 15px;
  margin-left: 1px;
  background: var(--sl-strong);
  visibility: hidden;
}

#demo .pm-sl-field.is-open .pm-caret {
  visibility: visible;
  animation: pm-caret 1s steps(1) infinite;
}

#demo .pm-sl-skip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
}

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

#demo .pm-sl-skip-t {
  flex: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--sl-muted);
  white-space: nowrap;
}

#demo .pm-sl-skip.is-in,
#demo .pm-sl-result.is-in {
  animation: pm-fade-in 0.35s var(--ease-out) both;
}

/* The result reads as one sentence: check, text, then the time inline after it */
#demo .pm-sl-result {
  display: block;
  margin: 8px 0 0;
  padding: 8px 0 0 12px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--sl-text);
  border-left: 4px solid transparent;
}

#demo .pm-sl-result svg {
  display: inline-block;
  vertical-align: -2px;
  margin: 0 6px 0 0;
}

#demo .pm-sl-result .pm-sl-res-t2 {
  font-size: 12px;
  color: var(--sl-muted);
  white-space: nowrap;
  margin-left: 2px;
}

#demo .pm-sl-comp {
  margin: 0 12px 12px;
  padding: 0 12px;
  height: 38px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex: none;
  border: 1px solid var(--sl-btn);
  border-radius: 8px;
  font-size: 15px;
  color: var(--sl-muted);
}

/* ---------- Controller bits under the stage ---------- */

#demo .pm-demo-caption {
  min-height: calc(1.5em * 2);
  margin: 20px 0 0;
  max-width: 60ch;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-transform: none;
  color: var(--bone-70);
}

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

#demo .demo-after {
  margin-top: 8px;
}

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

/* phones: the controls wrap, the table keeps its full width */
@media (max-width: 480px) {
  #demo .pm-pt-thead,
  #demo .pm-pt-row {
    grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
  }

  #demo .pm-legend-more {
    display: none;
  }

  #demo .pm-pt-name {
    font-size: 14px;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  #demo .pm-pv {
    font-size: 14.5px;
  }

  /* Phones: 'Out of stock' becomes 'OOS' so the badge stays on one line and the row stays short */
  #demo .pm-chip-l {
    display: none;
  }

  #demo .pm-chip-s {
    display: inline;
  }

  #demo .pm-chip {
    white-space: nowrap;
    padding: 1px 3px;
  }

  #demo .pm-pc-in {
    padding: 0 2px;
  }

  #demo .pm-th-l {
    letter-spacing: 0;
  }

  #demo .pm-th {
    font-size: 10.5px;
  }

  #demo .pm-stat-v {
    font-size: 22px;
  }

  #demo .pm-stat {
    padding: 8px 10px;
  }

  /* Stat labels wrap in full on phones instead of truncating */
  #demo .pm-stat-l,
  #demo .pm-stat-s {
    font-size: 10.5px;
    white-space: normal;
  }

  /* The header grows to fit its wrapped subtitle instead of overlapping the column heads */
  #demo .pm-pt-head {
    height: auto;
    min-height: 52px;
    padding: 10px 12px;
  }

  #demo .pm-pt-sub {
    white-space: normal;
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  #demo .pm-chip {
    font-size: 11px;
    padding: 1px 2px;
  }

  #demo .pm-legend-i span {
    font-size: 11px;
  }

  #demo .pm-legend {
    gap: 8px;
  }

  #demo .pm-m-top {
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
  }

  #demo .pm-ring {
    width: 34px;
    height: 34px;
  }

  #demo .pm-ring svg {
    width: 34px;
    height: 34px;
  }

  #demo .pm-ring-n {
    font-size: 13px;
  }

  #demo .pm-m-row {
    grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr) 14px;
  }
}

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

@keyframes pm-dot {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes pm-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes pm-flash {
  0% { opacity: 0.35; }
  100% { opacity: 0; }
}

@keyframes pm-ring {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes pm-cell-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-roll-in {
  from { opacity: 0; transform: translateY(60%); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-roll-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-60%); }
}

@keyframes pm-log-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-new {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes pm-shim {
  from { transform: translateX(-100%); }
  to { transform: translateX(260%); }
}

@keyframes pm-tk-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-lad-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-tile-in-l {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-tile-in-r {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-tile-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pm-row-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-sl-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes pm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pm-sl-ring {
  0% { box-shadow: 0 0 0 0 rgb(255 255 255 / 0); }
  35% { box-shadow: 0 0 0 1.6px rgb(255 255 255 / 0.9); }
  100% { box-shadow: 0 0 0 1.6px rgb(255 255 255 / 0); }
}

@keyframes pm-caret {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* A stage captured with ?static=1, or with reduced motion: the finished state, no motion */
#demo .pm-demo-stage.is-static *,
#demo .pm-demo-stage.is-static *::before,
#demo .pm-demo-stage.is-static *::after {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #demo .pm-demo-stage *,
  #demo .pm-demo-stage *::before,
  #demo .pm-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;
}
