/* Automation 04 live demo: campaign setup, Behind the scenes log and the lead sheet (Google Sheet
   or HubSpot view). Stage chrome, controls and the tabs come from demo.css and site.css. Every
   rule is scoped under #demo and every class invented here starts with lg-. Layout: setup on the
   left, log over sheet on the right from 1024px; one column with a Behind the scenes / Lead sheet
   carousel below 1024px. */

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

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

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

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

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

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

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

#demo .lg-demo-bar .tab-m {
  min-width: 0;
  min-height: 1.3em;
  white-space: normal;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

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

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

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

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

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

@media (max-width: 639px) {
  #demo .lg-demo-bar .tab {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto;
    row-gap: 0;
  }

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

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

/* The step title wraps to two lines instead of ending in an ellipsis (04-visual-03) */
#demo .demo-status,
#demo .demo-status-text {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* ---------- Grid: setup on the left; the log and the sheet on the right ---------- */

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

#demo .lg-col-setup {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

#demo .lg-controls {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
}

#demo .lg-side {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}

#demo .lg-label {
  min-height: 40px;
}

#demo .lg-setup {
  flex: 1;
  display: flex;
  min-height: 640px;
}

#demo .lg-side-nav-hide {
  display: none;
}

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

/* ---------- Campaign setup panel ---------- */

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

#demo .lg-su-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

#demo .lg-su-app {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1;
}

#demo .lg-su-id {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

#demo .lg-su-id b {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--bone);
  line-height: 1.2;
}

#demo .lg-su-id .mono {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ash);
  line-height: 1.2;
}

#demo .lg-su-chip {
  margin-left: auto;
  flex: none;
  padding: 4px 7px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
}

#demo .lg-su-chip.is-running {
  color: var(--accent);
  border-color: rgb(255 255 255 / 0.4);
}

#demo .lg-su-chip.is-running::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
  animation: lg-dot 1.6s ease-in-out infinite;
}

#demo .lg-su-chip.is-complete {
  color: var(--ok);
  border-color: hsl(152 60% 48% / 0.4);
}

#demo .lg-su-chip.is-scheduled {
  color: var(--info);
  border-color: hsl(214 85% 66% / 0.4);
}

#demo .lg-su-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 16px;
}

#demo .lg-su-f {
  min-width: 0;
}

#demo .lg-su-l,
#demo .lg-su-r {
  display: block;
  margin-bottom: 5px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .lg-su-lrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

#demo .lg-su-lrow .lg-su-l {
  margin-bottom: 5px;
}

#demo .lg-su-r {
  margin-bottom: 5px;
}

#demo .lg-input,
#demo .lg-su-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  box-sizing: border-box;
  padding: 0 12px;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15.5px;
  color: var(--bone);
  min-width: 0;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#demo .lg-input-ic {
  display: grid;
  flex: none;
  place-items: center;
  width: 14px;
  height: 14px;
  color: var(--ash);
}

#demo .lg-input-ic svg,
#demo .lg-su-row > svg {
  width: 14px;
  height: 14px;
}

#demo .lg-input-v {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .lg-input-ph {
  position: absolute;
  left: 38px;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: hsl(36 8% 60% / 0.6);
  pointer-events: none;
}

#demo .lg-input.is-typing {
  border-color: rgb(255 255 255 / 0.7);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.12);
}

#demo .lg-caret {
  display: none;
  width: 1.5px;
  height: 15px;
  margin-left: -6px;
  background: var(--accent);
  animation: lg-blink 1s steps(2) infinite;
}

#demo .lg-input.is-typing .lg-caret {
  display: block;
}

#demo .lg-su-srcs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#demo .lg-src {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14.5px;
  color: var(--bone-70);
  transition: border-color 0.3s, color 0.3s;
}

#demo .lg-src-box {
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: background-color 0.3s;
}

#demo .lg-src-box svg {
  width: 9px;
  height: 9px;
  color: var(--accent-ink);
  opacity: 0;
  transition: opacity 0.2s;
}

#demo .lg-src.is-on {
  color: var(--bone);
  border-color: rgb(255 255 255 / 0.4);
}

#demo .lg-src.is-on .lg-src-box {
  background: var(--accent);
  border-color: var(--accent);
}

#demo .lg-src.is-on .lg-src-box svg {
  opacity: 1;
}

#demo .lg-su-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px;
  margin: -2px;
  border-radius: 8px;
}

#demo .lg-rule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.06);
  font-size: 14px;
  color: var(--bone);
  transition: border-color 0.3s, background-color 0.3s;
}

#demo .lg-rule svg {
  flex: none;
  width: 10px;
  height: 10px;
  color: var(--accent);
}

#demo .lg-su-rules.is-hot .lg-rule {
  border-color: var(--accent);
  background: rgb(255 255 255 / 0.14);
}

#demo .lg-su-rules.is-pulse .lg-su-chips {
  animation: lg-glow 1.2s var(--ease-std) 1;
}

#demo .lg-su-sched .lg-su-row {
  justify-content: flex-start;
}

#demo .lg-su-sv {
  font-size: 15px;
  color: var(--bone);
  white-space: nowrap;
}

#demo .lg-su-row > svg {
  flex: none;
  color: var(--accent);
}

#demo .lg-tog {
  position: relative;
  flex: none;
  margin-left: auto;
  width: 30px;
  height: 17px;
  border-radius: 999px;
  background: var(--accent);
}

#demo .lg-tog::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-ink);
}

#demo .lg-su-sched.is-hot .lg-su-row {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.14);
}

#demo .lg-su-sched.is-pulse .lg-su-row {
  animation: lg-glow 1.2s var(--ease-std) 1;
}

#demo .lg-su-run {
  display: grid;
  gap: 11px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line-soft);
}

#demo .lg-runbtn {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s, transform 0.18s var(--ease-std), color 0.2s;
}

#demo .lg-runbtn::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

#demo .lg-runbtn.is-pressed {
  transform: scale(0.96);
  background: var(--accent-soft);
}

#demo .lg-runbtn.is-running {
  background: rgb(255 255 255 / 0.16);
  color: var(--accent);
}

#demo .lg-runbtn.is-running::before {
  display: none;
}

#demo .lg-spin {
  display: none;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lg-spin 0.8s linear infinite;
}

#demo .lg-runbtn.is-running .lg-spin {
  display: block;
}

#demo .lg-runmsg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 36px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--bone-70);
}

#demo .lg-runmsg-ic {
  display: grid;
  place-items: center;
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

#demo .lg-runmsg-ic::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ash);
}

#demo .lg-runmsg.is-done .lg-runmsg-ic::before {
  display: none;
}

#demo .lg-runmsg-ic svg {
  width: 14px;
  height: 14px;
  color: var(--ok);
}

#demo .lg-runmsg.is-pending .lg-runmsg-ic::before {
  width: 10px;
  height: 10px;
  background: transparent;
  border: 2px solid var(--accent);
  border-right-color: transparent;
  border-radius: 50%;
  animation: lg-spin 0.8s linear infinite;
}

#demo .lg-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

#demo .lg-stage {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#demo .lg-stage i {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  transition: background-color 0.4s, opacity 0.4s;
}

#demo .lg-stage b {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .lg-stage.is-active i {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-soft) 50%, var(--accent) 100%);
  background-size: 200% 100%;
  animation: lg-shim 1.2s linear infinite;
}

#demo .lg-stage.is-active b {
  color: var(--bone);
}

#demo .lg-stage.is-done i {
  background: var(--ok);
  opacity: 0.8;
}

#demo .lg-stage.is-done b {
  color: var(--bone-70);
}

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

#demo .lg-log {
  flex: 1 1 0;
  height: 232px;
  min-height: 0;
  margin: 0;
  padding: 16px 16px 4px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 28px);
  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 .lg-col-log {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

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

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

#demo .lg-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: lg-log-new 1.2s var(--ease-std) forwards;
}

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

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

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

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

#demo .lg-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;
}

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

#demo .lg-log-done.is-poor {
  color: var(--ash);
}

/* Icon colours by kind: gold while pending, green once landed */
#demo .lg-log-e--event .lg-log-ic,
#demo .lg-log-e--rules .lg-log-ic,
#demo .lg-log-e--idle .lg-log-ic {
  color: var(--ash);
}

#demo .lg-log-e--start .lg-log-ic,
#demo .lg-log-e--record .lg-log-ic,
#demo .lg-log-e--export .lg-log-ic,
#demo .lg-log-e--done .lg-log-ic,
#demo .lg-log-e--notify .lg-log-ic {
  color: var(--ok);
}

#demo .lg-log-e--search .lg-log-ic,
#demo .lg-log-e--visit .lg-log-ic,
#demo .lg-log-e--score .lg-log-ic,
#demo .lg-log-e--merge .lg-log-ic,
#demo .lg-log-e--schedule .lg-log-ic {
  color: var(--accent);
}

#demo .lg-log-e--search.is-done .lg-log-ic,
#demo .lg-log-e--visit.is-done .lg-log-ic,
#demo .lg-log-e--score.is-done .lg-log-ic,
#demo .lg-log-e--merge.is-done .lg-log-ic {
  color: var(--ok);
}

#demo .lg-log-e--skip .lg-log-ic {
  color: var(--info);
}

#demo .lg-log-e--remove .lg-log-ic,
#demo .lg-log-e--flag .lg-log-ic {
  color: var(--danger);
}

#demo .lg-log-e.is-seed .lg-log-t {
  color: var(--bone-50);
}

#demo .lg-log-e--idle {
  padding-top: 0;
}

#demo .lg-log-e--idle .lg-log-t {
  color: var(--ash);
}

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

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

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

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

#demo .lg-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: lg-shim 1.4s linear infinite;
}

/* Jump: a centred pill on a hairline, no icon tile */
#demo .lg-log-e--jump {
  grid-template-columns: minmax(0, 1fr);
  padding: 14px 0;
}

#demo .lg-log-e--jump .lg-log-ic,
#demo .lg-log-e--jump .lg-log-tm {
  display: none;
}

#demo .lg-log-e--jump .lg-log-b {
  display: flex;
  justify-content: center;
}

#demo .lg-log-e--jump .lg-log-row {
  justify-content: center;
}

#demo .lg-log-e--jump .lg-log-t {
  padding: 5px 12px;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--bone);
}

/* Cards inside an entry */
#demo .lg-cnt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 560px;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--elev);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

#demo .lg-cnt-r {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

#demo .lg-cnt-l {
  font-size: 14px;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .lg-cnt-bar {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

#demo .lg-cnt-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: background-color 0.4s;
}

#demo .lg-cnt-bar.is-ok i {
  background: var(--ok);
}

#demo .lg-cnt-v {
  font-size: 13px;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* The mini web page being read */
#demo .lg-scan {
  position: relative;
  width: 100%;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-sizing: border-box;
}

#demo .lg-scan-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  background: #eef0f2;
}

#demo .lg-scan-bar > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cfd4d9;
}

#demo .lg-scan-url {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 11.5px;
  color: #5b6570;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

#demo .lg-scan-url svg {
  width: 9px;
  height: 9px;
  flex: none;
}

#demo .lg-scan-page {
  position: relative;
  padding: 10px 14px 12px;
  color: #1d2733;
}

#demo .lg-scan-brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

#demo .lg-scan-brand b {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #22313f;
}

#demo .lg-scan-brand span {
  font-size: 11.5px;
  color: #5b6570;
  white-space: nowrap;
}

#demo .lg-scan-title {
  margin: 8px 0 4px;
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 600;
  color: #1d2733;
}

#demo .lg-scan-ln {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  margin: 4px 0;
  padding: 1px 3px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #3a4651;
  border-radius: 3px;
  outline: 1.5px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.3s, background-color 0.3s;
}

#demo .lg-scan-ln span {
  color: #5b6570;
  margin-right: 2px;
}

#demo .lg-scan-ln.is-found {
  outline-color: var(--accent);
  background: hsl(45 90% 94%);
}

#demo .lg-scan-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#demo .lg-scan-sk {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

#demo .lg-scan-sk i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: #e9ecef;
}

#demo .lg-scan-socs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

#demo .lg-scan-soc {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e9ecef;
  color: #3a4651;
  font-size: 9.5px;
  font-weight: 700;
  outline: 1.5px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.3s, background-color 0.3s;
}

#demo .lg-scan-soc.is-found {
  outline-color: var(--accent);
  background: hsl(45 90% 94%);
}

#demo .lg-scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgb(255 255 255 / 0.55);
  pointer-events: none;
}

#demo .lg-scan.is-done .lg-scan-beam {
  display: none;
}

#demo .lg-scan-sum {
  display: none;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 9px 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: var(--bone-70);
}

#demo .lg-scan.is-done {
  background: var(--elev);
  border-color: var(--line);
}

#demo .lg-scan.is-done .lg-scan-sum {
  display: block;
}

#demo .lg-scan.is-done .lg-scan-bar,
#demo .lg-scan.is-done .lg-scan-page {
  display: none;
}

#demo .lg-chk.is-na {
  border-style: dashed;
  color: var(--ash);
}

#demo .lg-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 560px;
  margin-top: 8px;
}

#demo .lg-rchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--bone);
}

#demo .lg-rchip::before {
  content: "✓";
  color: var(--accent);
  font-size: 12px;
}

#demo .lg-score {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  max-width: 560px;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

#demo .lg-ring.is-spin {
  background: conic-gradient(var(--accent) 0 26%, var(--line) 26% 100%);
  animation: lg-spin 1s linear infinite;
}

#demo .lg-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--elev);
}

#demo .lg-ring-n {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}

#demo .lg-ring.is-spin .lg-ring-n {
  opacity: 0;
}

#demo .lg-reason {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--bone-70);
}

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

#demo .lg-sh--s {
  width: 60%;
}

#demo .lg-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

#demo .lg-chk {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .lg-chk.is-pass {
  color: var(--ok);
  border-color: hsl(152 60% 48% / 0.35);
}

#demo .lg-merge {
  max-width: 560px;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--elev);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

#demo .lg-merge-r {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding: 3px 0;
}

#demo .lg-merge-r b {
  font-size: 14px;
  font-weight: 500;
  color: var(--bone);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#demo .lg-merge-r .mono {
  font-size: 13px;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .lg-merge-r .is-same {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

#demo .lg-merge-k {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ok);
}

#demo .lg-note {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  max-width: 520px;
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  animation: lg-note-in 0.5s var(--ease-out) both;
}

#demo .lg-note-av {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

#demo .lg-note-h {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#demo .lg-note-h b {
  font-size: 15px;
  font-weight: 600;
  color: var(--bone);
}

#demo .lg-note-chip {
  padding: 2px 5px;
  border: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .lg-note-tm {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--ash);
  white-space: nowrap;
}

#demo .lg-note-w {
  margin: 3px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ash);
}

#demo .lg-note-m {
  margin: 6px 0 8px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--bone);
}

#demo .lg-note-btn {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--bone);
  cursor: default;
}

/* ---------- Lead sheet panel: label row, counter, view switch ---------- */

#demo .lg-col-sheet {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

#demo .lg-sheet-label {
  flex-wrap: wrap;
  row-gap: 8px;
  min-height: 40px;
}

#demo .lg-counter {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 0 auto;
  white-space: nowrap;
}

#demo .lg-counter > .mono {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .lg-counter-n {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}

#demo .lg-counter-d {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 2px;
  font-size: 12px;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  animation: lg-delta 0.9s var(--ease-out) 1;
}

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

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

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

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

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

#demo .lg-out {
  position: relative;
  flex: 1 1 0;
  min-height: 300px;
}

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

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

/* ---------- Google Sheet (light) ---------- */

#demo .lg-gs,
#demo .lg-hs {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1.5em 3em -1.2em rgba(0, 0, 0, 0.6);
  font-family: var(--font-sans);
  font-size: 13.5px;
  box-sizing: border-box;
}

#demo .lg-gs {
  --gs-paper: #ffffff;
  --gs-chrome: #f9fbfd;
  --gs-head: #f8f9fa;
  --gs-grid: #e1e3e6;
  --gs-frozen: #c7c9cc;
  --gs-ink: #1f1f1f;
  --gs-muted: #5f6368;
  --gs-menu: #444746;
  --gs-link: #1155cc;
  --gs-green: #188038;
  --gs-row-good: #eef7f1;
  --gs-good-bg: #e6f4ea;
  --gs-good: #137333;
  --gs-mid-bg: #fef7e0;
  --gs-mid: #9a5300;
  --gs-poor-bg: #f1f3f4;
  --gs-poor: #80868b;
  --gs-star: #f4b400;
  --gs-tab-on-bg: #e1e9f7;
  --gs-tab-on: #0b57d0;
  --gs-share-bg: #c2e7ff;
  --gs-share: #001d35;
  --rh: 26px;
  background: var(--gs-paper);
  color: var(--gs-ink);
}

#demo .lg-gs-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 44px;
  padding: 0 12px;
  background: var(--gs-chrome);
  border-bottom: 1px solid var(--gs-grid);
  box-sizing: border-box;
}

#demo .lg-gs-glyph {
  position: relative;
  flex: none;
  width: 16px;
  height: 21px;
  border-radius: 3px;
  background: var(--gs-green);
}

#demo .lg-gs-glyph i {
  position: absolute;
  left: 3px;
  right: 3px;
  height: 2px;
  background: #ffffff;
}

#demo .lg-gs-glyph i:nth-child(1) { top: 5px; }
#demo .lg-gs-glyph i:nth-child(2) { top: 9.5px; }
#demo .lg-gs-glyph i:nth-child(3) { top: 14px; }

#demo .lg-gs-tt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#demo .lg-gs-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--gs-ink);
  white-space: nowrap;
}

#demo .lg-gs-menu {
  font-size: 13px;
  color: var(--gs-menu);
  word-spacing: 10px;
  white-space: nowrap;
}

#demo .lg-gs-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
  font-size: 13px;
  color: var(--gs-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#demo .lg-gs-meta b {
  font-weight: 600;
  color: var(--gs-ink);
}

#demo .lg-gs-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gs-green);
  flex: none;
}

#demo .lg-gs-share {
  flex: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gs-share-bg);
  color: var(--gs-share);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

@container (max-width: 759px) {
  #demo .lg-gs-share {
    display: none;
  }
}

@container (max-width: 699px) {
  #demo .lg-gs-syn {
    display: none;
  }
}

@container (max-width: 559px) {
  #demo .lg-gs-menu {
    display: none;
  }
}

#demo .lg-gs-lrow,
#demo .lg-gs-hrow {
  display: grid;
  grid-template-columns: 28px var(--cols, 1fr);
  flex: none;
  box-sizing: border-box;
}

#demo .lg-gs-lrow {
  height: 20px;
  background: var(--gs-head);
  border-bottom: 1px solid var(--gs-grid);
  font-size: 12.5px;
  color: var(--gs-muted);
}

#demo .lg-gs-corner {
  border-right: 1px solid var(--gs-grid);
}

#demo .lg-gs-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--gs-grid);
  min-width: 0;
  overflow: hidden;
}

#demo .lg-gs-hrow {
  height: 26px;
  background: var(--gs-paper);
  border-bottom: 2px solid var(--gs-frozen);
}

#demo .lg-gs-num {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gs-head);
  border-right: 1px solid var(--gs-grid);
  font-size: 12.5px;
  color: var(--gs-muted);
}

#demo .lg-gs-hd {
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  border-right: 1px solid var(--gs-grid);
  min-width: 0;
}

#demo .lg-gs-body {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--rh) - 1px), var(--gs-grid) calc(var(--rh) - 1px), var(--gs-grid) var(--rh));
  background-size: 100% var(--rh);
}

#demo .lg-gs-body::after {
  display: none;
}

#demo .lg-gs-tabs {
  margin-top: auto;
}

#demo .lg-gs-gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 28px;
  background: var(--gs-head);
  border-right: 1px solid var(--gs-grid);
  overflow: hidden;
}

#demo .lg-gs-gnum {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--i) * var(--rh));
  height: var(--rh);
  line-height: var(--rh);
  text-align: center;
  font-size: 12.5px;
  color: var(--gs-muted);
}

#demo .lg-gs-row {
  position: absolute;
  left: 28px;
  right: 0;
  top: calc(var(--i) * var(--rh));
  height: var(--rh);
  display: grid;
  grid-template-columns: var(--cols, 1fr);
  background: var(--gs-paper);
  box-sizing: border-box;
  transition: top 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s, background-color 0.4s, color 0.4s;
}

#demo .lg-gs-row.is-good {
  background: var(--gs-row-good);
}

#demo .lg-gs-row.is-gone {
  opacity: 0;
}

#demo .lg-gs-row.is-flash {
  animation: lg-gs-flash 1.4s ease-out 1;
}

#demo .lg-gs-c {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 8px;
  border-right: 1px solid var(--gs-grid);
  border-bottom: 1px solid var(--gs-grid);
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

#demo .lg-gs-c--email,
#demo .lg-gs-c--site {
  font-size: 13px;
}

#demo .lg-gs-row.is-poor .lg-gs-c {
  color: var(--gs-poor);
}

#demo .lg-gs-row.is-marked .lg-gs-c {
  color: #9aa0a6;
}

#demo .lg-gs-row.is-marked .lg-gs-name {
  text-decoration: line-through;
}

#demo .lg-gs-c.is-invalid {
  background: #fce8e6;
  color: #c5221f;
  text-decoration: line-through;
}

#demo .lg-gs-c.is-match {
  box-shadow: inset 0 0 0 1.5px var(--accent);
  background: #fff4cf;
}

#demo .lg-gs-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#demo .lg-gs-tag {
  flex: none;
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

#demo .lg-gs-tag--dup { background: #fef7e0; color: #b06000; }
#demo .lg-gs-tag--crm { background: #e8f0fe; color: #1967d2; }
#demo .lg-gs-tag--closed { background: #f1f3f4; color: #5f6368; }
#demo .lg-gs-tag--merged { background: #e6f4ea; color: #137333; }
#demo .lg-gs-tag--fresh { background: #f3e8fd; color: #8430ce; }

#demo .lg-gs-link {
  color: var(--gs-link);
  text-decoration: underline;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .lg-gs-soc {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 15px;
  height: 15px;
  margin-right: 3px;
  border-radius: 3px;
  background: #e8eaed;
  color: #3c4043;
  font-size: 10px;
  font-weight: 700;
}

#demo .lg-gs-none {
  color: var(--gs-muted);
}

#demo .lg-gs-rt {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

#demo .lg-gs-star {
  width: 11px;
  height: 11px;
  color: var(--gs-star);
}

#demo .lg-gs-c--reviews,
#demo .lg-gs-c--rating {
  font-variant-numeric: tabular-nums;
}

#demo .lg-gs-c--fit {
  justify-content: center;
}

#demo .lg-band {
  display: inline-block;
  min-width: 26px;
  padding: 1px 7px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#demo .lg-band--good {
  background: var(--gs-good-bg);
  color: var(--gs-good);
}

#demo .lg-band--mid {
  background: var(--gs-mid-bg);
  color: var(--gs-mid);
}

#demo .lg-band--poor {
  background: var(--gs-poor-bg);
  color: var(--gs-poor);
}

#demo .lg-band.is-pop {
  animation: lg-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 1;
}

#demo .lg-gs-pend {
  color: #9aa0a6;
}

#demo .lg-gs-shim {
  display: block;
  width: 26px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8eaed 0%, #f6f7f8 50%, #e8eaed 100%);
  background-size: 200% 100%;
  animation: lg-shim 1.2s linear infinite;
}

#demo .lg-gs-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gs-muted);
  font-size: 13px;
  font-family: var(--font-sans);
}

#demo .lg-gs-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 32px;
  padding: 0 8px;
  background: var(--gs-chrome);
  border-top: 1px solid var(--gs-grid);
  box-sizing: border-box;
}

#demo .lg-gs-plus,
#demo .lg-gs-mnu {
  color: var(--gs-muted);
  font-size: 16.5px;
  line-height: 1;
}

#demo .lg-gs-tab {
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--gs-muted);
  white-space: nowrap;
}

#demo .lg-gs-tab.is-on {
  background: var(--gs-tab-on-bg);
  color: var(--gs-tab-on);
}

#demo .lg-gs-probe,
#demo .lg-hs-probe {
  position: absolute;
  left: -9999px;
  top: 0;
  visibility: hidden;
  white-space: nowrap;
  font-size: 13.5px;
  padding: 0;
}

/* ---------- HubSpot list view (light; no logo) ---------- */

#demo .lg-hs {
  --hs-nav: #2d3e50;
  --hs-ink: #33475b;
  --hs-muted: #516f90;
  --hs-line: #dfe3eb;
  --hs-head: #f5f8fa;
  --hs-link: #0091ae;
  --hs-tag: #eaf0f6;
  --hs-new-bg: #e5f8f6;
  --hs-new: #00a38d;
  --hrh: 30px;
  background: #ffffff;
  color: var(--hs-ink);
}

#demo .lg-hs-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  height: 34px;
  padding: 0 14px;
  background: var(--hs-nav);
  box-sizing: border-box;
}

#demo .lg-hs-grid {
  display: grid;
  grid-template-columns: repeat(3, 3px);
  gap: 2px;
  flex: none;
}

#demo .lg-hs-grid i {
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.85);
}

#demo .lg-hs-nv {
  position: relative;
  height: 34px;
  line-height: 34px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

#demo .lg-hs-nv.is-on {
  color: #ffffff;
}

#demo .lg-hs-nv.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #ffffff;
}

#demo .lg-hs-search {
  margin-left: auto;
  padding: 4px 10px;
  width: 150px;
  box-sizing: border-box;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .lg-hs-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #7fd1de;
  color: #2d3e50;
  font-size: 12px;
  font-weight: 700;
}

@container (max-width: 599px) {
  #demo .lg-hs-search {
    display: none;
  }
}

#demo .lg-hs-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--hs-line);
  min-width: 0;
}

#demo .lg-hs-ttl {
  font-size: 17.5px;
  font-weight: 600;
  color: var(--hs-ink);
  white-space: nowrap;
}

#demo .lg-hs-list {
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--hs-tag);
  font-size: 13px;
  color: var(--hs-ink);
  white-space: nowrap;
}

#demo .lg-hs-cnt {
  margin-left: auto;
  font-size: 13.5px;
  color: var(--hs-muted);
  white-space: nowrap;
}

#demo .lg-hs-cnt b {
  font-weight: 600;
  color: var(--hs-ink);
}

#demo .lg-hs-thead,
#demo .lg-hs-row {
  display: grid;
  grid-template-columns: var(--hcols, 1fr);
  align-items: center;
  box-sizing: border-box;
}

#demo .lg-hs-thead {
  flex: none;
  height: 30px;
  background: var(--hs-head);
  border-bottom: 1px solid var(--hs-line);
}

#demo .lg-hs-th {
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hs-muted);
  white-space: nowrap;
  overflow: hidden;
}

#demo .lg-hs-tbody {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

#demo .lg-hs-row {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--i) * var(--hrh));
  height: var(--hrh);
  border-bottom: 1px solid var(--hs-line);
  background: #ffffff;
  transition: top 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s, background-color 0.4s;
}

#demo .lg-hs-row.is-gone {
  opacity: 0;
}

#demo .lg-hs-row.is-flash {
  animation: lg-gs-flash 1.4s ease-out 1;
}

#demo .lg-hs-row.is-marked .lg-hs-name {
  text-decoration: line-through;
  color: #9aa0a6;
}

#demo .lg-hs-c {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 10px;
  font-size: 14px;
  color: var(--hs-ink);
  white-space: nowrap;
  overflow: hidden;
}

#demo .lg-hs-cb {
  flex: none;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 1px solid #cbd6e2;
  border-radius: 2px;
}

#demo .lg-hs-av {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--hs-tag);
  color: var(--hs-muted);
  font-size: 12px;
  font-weight: 600;
}

#demo .lg-hs-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--hs-link);
  font-weight: 500;
}

#demo .lg-hs-dom {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--hs-muted);
}

#demo .lg-hs-fit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#demo .lg-hs-fit--none {
  font-weight: 400;
  color: var(--hs-muted);
}

#demo .lg-hs-fit.is-pop {
  animation: lg-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 1;
}

#demo .lg-hs-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

#demo .lg-hs-tag {
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--hs-tag);
  color: var(--hs-ink);
  font-size: 12.5px;
  white-space: nowrap;
}

#demo .lg-hs-tag--fresh,
#demo .lg-hs-tag--unscored,
#demo .lg-hs-tag--good,
#demo .lg-hs-tag--mid {
  background: var(--hs-new-bg);
  color: var(--hs-new);
}

#demo .lg-hs-tag--poor {
  background: #f1f3f4;
  color: #5f6368;
}

#demo .lg-hs-tag--dup {
  background: #fef7e0;
  color: #b06000;
}

#demo .lg-hs-tag--crm {
  background: #e8f0fe;
  color: #1967d2;
}

#demo .lg-hs-tag--closed {
  background: #f1f3f4;
  color: #5f6368;
}

#demo .lg-hs-tag--invalid {
  background: #fce8e6;
  color: #c5221f;
}

#demo .lg-hs-tag--merged {
  background: #e6f4ea;
  color: #137333;
}

#demo .lg-hs-own {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hs-ink);
}

#demo .lg-hs-av2 {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #7fd1de;
  color: #2d3e50;
  font-size: 11px;
  font-weight: 700;
}

#demo .lg-hs-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hs-muted);
  font-size: 13px;
  font-family: var(--font-sans);
}

/* ---------- Sizes by width ---------- */

@media (min-width: 1280px) {
  #demo .lg-grid {
    grid-template-columns: 288px minmax(0, 1fr);
    column-gap: 28px;
  }

  #demo .lg-setup {
    min-height: 700px;
  }

  #demo .lg-log {
    height: 276px;
    flex: none;
  }

  #demo .lg-gs {
    --rh: 26px;
  }

  #demo .lg-hs {
    --hrh: 30px;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  #demo .lg-grid {
    grid-template-columns: 272px minmax(0, 1fr);
    column-gap: 24px;
  }

  #demo .lg-setup {
    min-height: 660px;
  }

  #demo .lg-log {
    height: 262px;
    flex: none;
  }

  #demo .lg-gs {
    --rh: 24px;
  }

  #demo .lg-hs {
    --hrh: 28px;
  }

  #demo .lg-col-setup .demo-label-r {
    display: none;
  }

  #demo .lg-gs-hrow,
  #demo .lg-gs-lrow {
    font-size: 13px;
  }
}

/* ---------- Below 1024px: one column, the Behind the scenes / Lead sheet carousel ---------- */

@media (max-width: 1023px) {
  #demo .lg-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  #demo .lg-col-setup {
    grid-column: 1;
    grid-row: 1;
  }

  #demo .lg-setup {
    min-height: 0;
  }

  #demo .lg-controls {
    grid-column: 1;
    grid-row: 2;
  }

  #demo .lg-side {
    grid-column: 1;
    grid-row: 3;
    display: flex;
    gap: 0;
    height: 560px;
    overflow: hidden;
    grid-template-rows: none;
  }

  #demo .lg-side > .demo-col {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  #demo .lg-side[data-show="sheet"] > .lg-col-log,
  #demo .lg-side[data-show="log"] > .lg-col-sheet {
    display: none;
  }

  #demo .lg-side .lg-log {
    flex: 1 1 0;
    height: auto;
  }

  #demo .lg-side-nav-hide {
    display: none;
  }

  #demo .demo-side-nav {
    grid-column: 1;
    grid-row: 4;
    display: inline-flex;
    justify-self: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-sizing: border-box;
  }

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

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

  #demo .lg-col-sheet .lg-sheet-label {
    min-height: 40px;
  }

  #demo .lg-out {
    min-height: 340px;
    height: 100%;
  }

  #demo .lg-col-sheet {
    height: 100%;
  }

  #demo .lg-setup .lg-su-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #demo .lg-controls {
    justify-self: center;
  }
}

@media (min-width: 560px) and (max-width: 1023px) {
  #demo .lg-su-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 13px 16px;
  }

  #demo .lg-su-rules,
  #demo .lg-su-f:has(.lg-su-srcs) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  #demo .demo-status {
    white-space: normal;
    overflow: visible;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #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;
    min-height: 4.6em;
  }

  #demo .demo-grid {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  #demo .lg-side {
    height: 560px;
  }

  #demo .lg-gs-body,
  #demo .lg-hs-tbody {
    min-height: 0;
  }

  #demo .lg-gs-c--email,
  #demo .lg-gs-c--site {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  #demo .lg-demo-bar .demo-note {
    display: none;
  }

  #demo .lg-counter {
    margin-left: 0;
  }
}

@media (pointer: coarse) {
  #demo .lg-view button,
  #demo .demo-side-nav button,
  #demo .lg-runbtn {
    min-height: 44px;
  }

  #demo .lg-src {
    min-height: 40px;
  }
}

/* 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;
}

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

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

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

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

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

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

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

@keyframes lg-blink {
  to {
    visibility: hidden;
  }
}

@keyframes lg-glow {
  0% {
    box-shadow: 0 0 0 0 rgb(255 255 255 / 0.5);
  }
  100% {
    box-shadow: 0 0 0 10px rgb(255 255 255 / 0);
  }
}

@keyframes lg-gs-flash {
  from {
    box-shadow: inset 3px 0 0 var(--accent);
    background-color: #fff8e1;
  }
  to {
    box-shadow: inset 3px 0 0 transparent;
  }
}

@keyframes lg-pop {
  from {
    transform: scale(0.7);
  }
  to {
    transform: scale(1);
  }
}

@keyframes lg-delta {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes lg-note-in {
  from {
    opacity: 0;
    transform: translateY(8px);
    box-shadow: 0 0 28px -6px rgb(255 255 255 / 0.45);
  }
  to {
    opacity: 1;
    transform: none;
    box-shadow: 0 0 0 0 rgb(255 255 255 / 0);
  }
}

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

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

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

/* Phones: the Behind the scenes label keeps its words together */
@media (max-width: 640px) {
  #demo .lg-col-log .lg-label,
  #demo .lg-col-sheet .lg-label,
  #demo .lg-su-head {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  #demo .lg-col-log .lg-label,
  #demo .lg-col-sheet .lg-label {
    align-items: flex-start;
  }

  #demo .lg-col-log .lg-label .demo-label-r {
    white-space: normal;
  }

  #demo .lg-scan-ln {
    font-size: 12.5px;
  }

  /* Count rows: the label and the bar narrow, the value may wrap its unit onto a second line */
  #demo .lg-cnt-r {
    grid-template-columns: 84px minmax(0, 1fr) auto;
    gap: 8px;
  }

  #demo .lg-cnt-v {
    white-space: normal;
    text-align: right;
  }
}

@media (max-width: 480px) {
  #demo .lg-label .mono:first-child {
    white-space: nowrap;
  }

  #demo .lg-log-e {
    gap: 10px;
  }
}
