/* Sen Labs site styles.
   White ground, soft green tints, pill controls, one typeface (DM Sans, self-hosted).
   Amber marks a missed contact, green marks a recorded or booked one. */

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --tint: #f3f7f2;
  --tint-strong: #e4eee5;
  --ink: #14231c;
  --ink-soft: #56665d;
  --sage: #587561;
  --line: #dfe7e0;
  --line-strong: #c3d1c7;
  --field: #6f8578;
  --green: #1b6a49;
  --green-deep: #0f3b2a;
  --green-wash: #e2efe6;
  --amber-text: #8f5100;
  --amber-fill: #eaa63a;
  --danger: #b3392a;
  --maxw: 1160px;
  --gap: clamp(1.5rem, 4vw, 3.5rem);
  --row-h: 4.25rem;
  --r-card: 20px;
  --shadow: 0 1px 2px rgba(20, 35, 28, 0.05), 0 10px 30px rgba(20, 35, 28, 0.06);
  --font: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 2rem, var(--maxw));
  margin-inline: auto;
}

@media (min-width: 700px) {
  .wrap {
    width: min(100% - 4rem, var(--maxw));
  }
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
}

.skip:focus {
  top: 1rem;
}

/* Header: a floating pill */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: 0.75rem;
  pointer-events: none;
}

.site-header__in {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.75rem;
  padding: 0 0.5rem 0 1.15rem;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand svg {
  width: 1.6rem;
  height: 1.6rem;
}

.nav {
  display: none;
  gap: 2rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

@media (min-width: 820px) {
  .nav {
    display: flex;
  }
}

/* Buttons, chips, eyebrows */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.7rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 500 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.btn--small {
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
}

.btn--ghost {
  background: var(--bg);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--tint);
  border-color: var(--line-strong);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tint);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

a.chip:hover {
  background: var(--tint-strong);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--sage);
}

.eyebrow--dot::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--sage);
  vertical-align: middle;
  transform: translateY(-1px);
}

.tone {
  color: var(--sage);
}

.link {
  font-weight: 500;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.link:hover {
  color: var(--green);
}

/* Hero */

.hero {
  padding-block: clamp(3rem, 7vw, 5.25rem) clamp(3rem, 6vw, 4.5rem);
  text-align: center;
}

.hero h1 {
  margin-top: 1.1rem;
  font-size: clamp(2.55rem, 6.4vw, 4.4rem);
  font-weight: 450;
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero h1 span {
  display: block;
  text-wrap: balance;
}

.hero__sub {
  max-width: 39rem;
  margin: 1.4rem auto 0;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

/* Hero map: the data a business already has, and what it becomes */

.map {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.25rem, 4vw, 2.75rem);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.map__list {
  display: grid;
  gap: 0.6rem;
  width: 100%;
  max-width: 22rem;
}

.map__item {
  position: relative;
  display: grid;
  gap: 0.1rem;
  align-content: center;
  width: 100%;
  min-height: 4rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  line-height: 1.3;
  text-align: left;
}

.map__item b {
  font-size: 0.9375rem;
  font-weight: 550;
}

.map__item span {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.map__list--out .map__item {
  background: var(--green-wash);
  border-color: #cddfd2;
}

.map__list--out .map__item b {
  color: var(--green-deep);
}

.map__list--out .map__item span {
  color: #3d5a49;
}

/* The last output is the point of the whole map: a specific suggestion */
.map__list--out .map__item--idea {
  padding-block: 0.8rem 0.85rem;
  background: var(--ink);
  border-color: var(--ink);
}

.map__list--out .map__item--idea b {
  color: #fff;
}

.map__list--out .map__item--idea span {
  color: rgba(255, 255, 255, 0.84);
}

.map__item--idea em {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.6875rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.map__cap {
  margin-top: 0.9rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.map__cap b {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink);
}

.map__join {
  position: relative;
  width: 1px;
  height: 2rem;
  margin-block: 1rem;
  background: var(--line-strong);
}

.map__join::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.map__hub {
  order: 4;
  width: min(100%, 19rem);
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.map__hub .brand {
  font-size: 1rem;
}

.map__hub .brand svg {
  width: 1.35rem;
  height: 1.35rem;
}

.map__hub-title {
  margin-top: 0.9rem;
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.map__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.map__tags li {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--tint-strong);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--green-deep);
}

.map__cap--in {
  order: 2;
}

.map__join--in {
  order: 3;
}

.map__join--out {
  order: 5;
}

.map__list--out {
  order: 6;
}

.map__cap--out {
  order: 7;
}

@media (min-width: 1000px) {
  .map {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3rem minmax(14rem, 17.5rem) 3rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
  }

  .map__list {
    gap: 0.75rem;
    grid-row: 1;
    max-width: none;
  }

  .map__list li {
    position: relative;
    display: flex;
    align-items: center;
  }

  .map__item {
    max-width: 19.5rem;
  }

  .map__list--in {
    grid-column: 1;
  }

  .map__list--in li {
    justify-content: flex-end;
    padding-right: 1.5rem;
  }

  .map__list--out {
    grid-column: 5;
  }

  .map__list--out li {
    padding-left: 1.5rem;
  }

  /* Each item draws a stub toward the hub and its own piece of the shared
     vertical line, so the lines stay joined whatever height the items take. */
  .map__list li::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 1.5rem;
    height: 1px;
    background: var(--line-strong);
  }

  .map__list li::before {
    content: "";
    position: absolute;
    top: -0.375rem;
    bottom: -0.375rem;
    width: 1px;
    background: var(--line-strong);
  }

  .map__list li:first-child::before {
    top: 50%;
  }

  .map__list li:last-child::before {
    bottom: 50%;
  }

  .map__list--in li::after,
  .map__list--in li::before {
    right: 0;
  }

  .map__list--out li::after,
  .map__list--out li::before {
    left: 0;
  }

  .map__join {
    width: auto;
    height: 1px;
    margin: 0;
    grid-row: 1;
  }

  .map__join::after {
    left: auto;
    right: -3px;
    top: -3px;
    bottom: auto;
  }

  .map__join--in {
    grid-column: 2;
  }

  .map__join--out {
    grid-column: 4;
  }

  .map__hub {
    grid-column: 3;
    grid-row: 1;
    width: auto;
  }

  .map__cap {
    grid-row: 2;
    margin-top: 1.5rem;
  }

  .map__cap--in {
    grid-column: 1;
    padding-right: 1.5rem;
    text-align: right;
  }

  .map__cap--out {
    grid-column: 5;
    padding-left: 1.5rem;
    text-align: left;
  }
}

/* Background facts under the hero */

.facts {
  display: grid;
  gap: 1.25rem 2.5rem;
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  text-align: left;
}

.facts > div {
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.facts dd {
  margin-top: 0.3rem;
}

@media (min-width: 560px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Sections */

.section {
  padding-block: clamp(4rem, 9vw, 7.25rem);
}

.section--tint {
  background: var(--tint);
}

.head {
  max-width: 45rem;
  margin-inline: auto;
  text-align: center;
}

.h2 {
  margin-top: 0.9rem;
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 450;
  line-height: 1.07;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.h2 span {
  display: block;
}

.lead {
  max-width: 38rem;
  margin: 1.1rem auto 0;
  color: var(--ink-soft);
}

/* Services */

.caps {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
}

@media (min-width: 640px) {
  .caps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .caps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cap {
  padding: 1.5rem 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg);
}

.cap__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: var(--tint-strong);
  color: var(--green-deep);
}

.cap__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cap h3 {
  margin-top: 1.1rem;
  font-size: 1.1875rem;
  font-weight: 550;
  letter-spacing: -0.025em;
}

.cap p {
  margin-top: 0.4rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Examples: two cards on the page, each opening its example in a dialog */

.xcards {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
}

@media (min-width: 860px) {
  .xcards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.xcard {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.xcard:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.xcard h3 {
  margin-top: 0.7rem;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 450;
  line-height: 1.14;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.xcard__text {
  margin-top: 0.7rem;
  color: var(--ink-soft);
}

.xcard__flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0;
  margin-top: 1.4rem;
}

.xcard__flow li {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--tint);
  font-size: 0.875rem;
  font-weight: 500;
}

.xcard__flow li:last-child {
  background: var(--green-wash);
  color: var(--green-deep);
}

/* A short connector between the steps of the flow */
.xcard__flow li + li {
  margin-left: 1.5rem;
  position: relative;
}

.xcard__flow li + li::before {
  content: "";
  position: absolute;
  left: -1.15rem;
  top: 50%;
  width: 0.8rem;
  height: 1px;
  background: var(--line-strong);
}

@media (max-width: 479px) {
  .xcard__flow {
    gap: 0.4rem;
  }

  .xcard__flow li + li {
    margin-left: 0;
  }

  .xcard__flow li + li::before {
    display: none;
  }
}

.xcard__go {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.75rem;
  font-weight: 500;
}

.xcard__arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: background-color 0.15s ease;
}

.xcard__arrow svg {
  width: 1rem;
  height: 1rem;
}

.xcard:hover .xcard__arrow {
  background: var(--green-deep);
}

.modal {
  width: min(100% - 1.5rem, 1180px);
  max-width: none;
  max-height: calc(100dvh - 1.5rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(20, 35, 28, 0.28);
  overflow: auto;
  overscroll-behavior: contain;
}

.modal::backdrop {
  background: rgba(20, 35, 28, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.modal[open] {
  animation: modal-in 0.22s ease-out;
}

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

html:has(dialog.modal[open]) {
  overflow: hidden;
}

.modal__bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem 0.75rem clamp(1.25rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.modal__close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: 500 0.9375rem/1 var(--font);
  cursor: pointer;
}

.modal__close:hover {
  background: var(--tint-strong);
}

.modal__close svg {
  width: 0.9rem;
  height: 0.9rem;
}

.modal__body {
  padding: clamp(1.5rem, 3.5vw, 2.5rem) clamp(1.25rem, 3vw, 2.25rem) clamp(2rem, 4vw, 3rem);
}

/* With scripts off, or in a browser without dialogs, show both examples in the page. */

html:not(.js) dialog.modal,
html.no-dialog dialog.modal {
  display: block;
  position: static;
  width: auto;
  max-height: none;
  margin: 1.5rem 0 0;
  box-shadow: none;
}

html:not(.js) .modal__bar form,
html.no-dialog .modal__bar form {
  display: none;
}

.example__head {
  max-width: 44rem;
}

.example__head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.example__head p {
  margin-top: 0.7rem;
  color: var(--ink-soft);
}

.points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* Healthcare example: what arrives, and what lands in the warehouse */

.raw {
  display: grid;
  gap: 1.1rem;
  padding: 1.15rem 1.25rem 1.3rem;
}

.raw__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.raw__doc {
  margin: 0.45rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--tint);
  color: var(--ink);
  font: 400 0.875rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.fields {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.fields th {
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  color: var(--ink-soft);
}

.fields td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.fields td:first-child {
  color: var(--ink-soft);
  white-space: nowrap;
}

.fields td:nth-child(2) {
  font-weight: 550;
}

.ok {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--green);
}

.ok::before {
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 8.3l2.5 2.5 5.1-5.4' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

@media (max-width: 559px) {
  .fields th,
  .fields td {
    padding-inline: 0.9rem;
  }

  .fields th:last-child,
  .fields td:last-child {
    padding-left: 0;
  }

  .ok span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

.panel__foot {
  margin-top: auto;
  padding: 1rem 1.25rem 1.15rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Example systems: two panels replaying the same evening */

.sides {
  position: relative;
  display: grid;
  gap: 2.5rem var(--gap);
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.side {
  display: grid;
  row-gap: 1.1rem;
  min-width: 0;
}

.side__intro h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.side__intro p {
  max-width: 31rem;
  margin-top: 0.35rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .sides {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    row-gap: 0;
  }

  .side {
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 1.35rem;
  }
}

.wire {
  display: none;
}

@media (min-width: 900px) {
  .wire {
    display: block;
    position: absolute;
    left: calc(50% - var(--gap) / 2);
    width: var(--gap);
    bottom: 13.5rem;
    height: 1px;
    background: var(--line-strong);
  }

  .wire i {
    position: absolute;
    top: -4px;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    opacity: 0;
  }

  .wire.is-firing i {
    animation: cross 0.75s cubic-bezier(0.45, 0, 0.3, 1);
  }
}

@media (min-width: 900px) {
  .wire--static {
    bottom: 9rem;
  }

  .wire--static i {
    left: calc(100% - 9px);
    opacity: 1;
  }
}

@keyframes cross {
  0% {
    left: 0;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 9px);
    opacity: 0;
  }
}

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel__cap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  font-weight: 500;
}

.tag {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--tint);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}

.thread {
  position: relative;
  display: grid;
  gap: 0.72rem;
  padding: 1.05rem 1.25rem 1.2rem;
}

.thread::before {
  content: "";
  position: absolute;
  top: 1.7rem;
  bottom: 2.4rem;
  left: calc(1.25rem + 4.1rem + 0.85rem + 4px);
  width: 1px;
  background: var(--line-strong);
}

.thread::before {
  transition: opacity 0.4s ease;
}

.thread.is-empty::before {
  opacity: 0;
}

.ev {
  display: grid;
  grid-template-columns: 4.1rem 9px minmax(0, 1fr);
  column-gap: 0.85rem;
  align-items: start;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.ev time {
  padding-top: 0.06rem;
  text-align: right;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.ev .dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 0.38rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--bg);
}

.ev b {
  display: block;
  font-weight: 600;
}

.ev p {
  color: var(--ink-soft);
}

.ev--in .dot {
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 3px var(--bg);
}

.ev--missed .dot {
  background: var(--amber-fill);
}

.ev--missed b {
  color: var(--amber-text);
}

.ev--done .dot {
  background: var(--green);
}

.ev--done b {
  color: var(--green);
}

.ev.is-pending {
  opacity: 0;
  transform: translateY(6px);
}

.ledger {
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.ledger__head,
.row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 4.6rem minmax(0, 1.2fr);
  column-gap: 1rem;
  align-items: center;
  padding-inline: 1.25rem;
}

.ledger__head {
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.ledger__body {
  position: relative;
  min-height: calc(var(--row-h) * 4);
}

.row {
  height: var(--row-h);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  transition: opacity 0.4s ease;
}

.row.is-entering {
  opacity: 0;
}

.row__who b,
.row__who span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row__who b {
  font-weight: 600;
}

.row__who span {
  color: var(--ink-soft);
}

/* On phones each record takes two lines: who and weight, then status. */

@media (max-width: 559px) {
  :root {
    --row-h: 6.6rem;
  }

  .ledger__head,
  .row {
    grid-template-columns: minmax(0, 1fr) 4.4rem;
    row-gap: 0.35rem;
    align-content: center;
  }

  .ledger__head span:nth-child(3) {
    display: none;
  }

  .row .status {
    grid-column: 1 / -1;
  }
}

.weight {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.weight i {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--tint-strong);
  overflow: hidden;
}

.weight i::after {
  content: "";
  display: block;
  height: 100%;
  width: calc(var(--w, 0) * 1%);
  border-radius: 2px;
  background: var(--green);
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.status {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  column-gap: 0.5rem;
  align-items: baseline;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.status[data-tone="missed"] {
  color: var(--amber-text);
  font-weight: 600;
}

.status[data-tone="missed"]::before {
  background: var(--amber-fill);
}

.status[data-tone="work"]::before {
  background: var(--ink);
}

.status[data-tone="set"]::before {
  background: var(--green);
}

.status[data-tone="done"] {
  color: var(--green);
  font-weight: 600;
}

.status[data-tone="done"]::before {
  background: var(--green);
}

.status[data-tone="queued"]::before {
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--green);
}

.cell-flash {
  animation: flash 1.2s ease-out;
}

@keyframes flash {
  from {
    background: var(--green-wash);
    box-shadow: 0 0 0 6px var(--green-wash);
  }
  to {
    background: transparent;
    box-shadow: 0 0 0 6px transparent;
  }
}

.ledger__foot {
  display: grid;
  gap: 0.55rem;
  margin-top: auto;
  padding: 1rem 1.25rem 1.15rem;
  border-top: 1px solid var(--line);
}

.tally {
  font-size: 0.9375rem;
  font-weight: 600;
  transition: opacity 0.4s ease;
}

.ledger__note {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.demo-bar {
  display: flex;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: 1.25rem;
}

.demo-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.4rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: 500 0.9375rem/1 var(--font);
  cursor: pointer;
}

.demo-toggle::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.demo-toggle[aria-pressed="true"]::before {
  background: var(--line-strong);
}

.demo-toggle:hover {
  background: var(--tint-strong);
}

.demo-toggle[hidden] {
  display: none;
}

/* Until the script has set the first frame, hide the moving parts so the
   finished example does not flash before the replay starts. */

.js [data-demo]:not(.is-ready) .ev,
.js [data-demo]:not(.is-ready) .row,
.js [data-demo]:not(.is-ready) .tally,
.js [data-demo].is-resetting .ev,
.js [data-demo].is-resetting .row,
.js [data-demo].is-resetting .tally {
  opacity: 0;
}

/* Counts from the audit behind the first example, bars drawn to scale */

.audit {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line-strong);
}

.audit__lead {
  max-width: 44rem;
}

.audit__lead p + p {
  margin-top: 0.6rem;
  color: var(--ink-soft);
}

.counts {
  display: grid;
  gap: 1.75rem var(--gap);
  margin-top: 2rem;
}

@media (min-width: 760px) {
  .counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.count__n {
  display: block;
  font-size: clamp(2.5rem, 4.6vw, 3.25rem);
  font-weight: 450;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.count__label {
  display: block;
  margin-top: 0.4rem;
  color: var(--ink-soft);
}

.count__bar {
  width: calc(var(--p) * 1%);
  min-width: 6px;
  height: 6px;
  margin-top: 0.9rem;
  border-radius: 3px;
  background: var(--line-strong);
}

.count--missed .count__bar {
  background: var(--amber-fill);
}

.count--lost .count__bar {
  background: var(--ink);
}

.source {
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* Quotes: rendered only when real, approved quotes are added in the HTML */

.quotes {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 900px) {
  .quotes {
    grid-template-columns: 1fr 1fr;
  }
}

.quote {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg);
}

.quote p {
  font-size: 1.25rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.quote footer {
  margin-top: 0.9rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* Process: six steps, three businesses */

.tabs-row {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.tabs button {
  appearance: none;
  min-height: 2.75rem;
  padding: 0.45rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: 500 1rem/1 var(--font);
  cursor: pointer;
}

.tabs button:hover {
  color: var(--ink);
}

.tabs button[aria-pressed="true"] {
  background: var(--tint-strong);
  color: var(--green-deep);
}

@media (max-width: 479px) {
  .tabs {
    border-radius: 1.75rem;
  }
}

.steps {
  display: grid;
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: 1rem;
  padding-bottom: 1.75rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--tint-strong);
  color: var(--green-deep);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.step::after {
  content: "";
  position: absolute;
  top: 2.25rem;
  bottom: 0;
  left: calc(1.125rem - 0.5px);
  width: 1px;
  background: var(--line-strong);
}

.step:last-child {
  padding-bottom: 0;
}

.step:last-child::after {
  display: none;
}

.step:last-child::before {
  background: var(--green);
  color: #fff;
}

.step h3 {
  padding-top: 0.3rem;
  font-size: 1.125rem;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.step p {
  grid-column: 2;
  margin-top: 0.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.steps[data-scenario="home"] .step p:not(.for-home),
.steps[data-scenario="lab"] .step p:not(.for-lab),
.steps[data-scenario="sales"] .step p:not(.for-sales) {
  display: none;
}

@media (min-width: 1000px) {
  .steps {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 1.75rem;
  }

  .step {
    display: block;
    padding-bottom: 0;
  }

  .step::after {
    top: calc(1.125rem - 0.5px);
    bottom: auto;
    left: 2.25rem;
    right: -1.75rem;
    width: auto;
    height: 1px;
  }

  .step h3 {
    padding-top: 1rem;
  }

  .step p {
    min-height: 7.6rem;
  }
}

.fineprint {
  max-width: 46rem;
  margin: 1.5rem auto 0;
  font-size: 0.9375rem;
  text-align: center;
  color: var(--ink-soft);
}

/* Ways to work together */

.ways {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
}

@media (min-width: 860px) {
  .ways {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.way {
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg);
}

.way h3 {
  margin-top: 0.6rem;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.way p {
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.way .eyebrow {
  margin-top: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--sage);
}

.way .way__eg {
  margin-top: auto;
  padding-top: 1.1rem;
}

.way__eg span {
  display: block;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

/* Closing and footer */

.closing {
  text-align: center;
}

.closing .h2 {
  font-size: clamp(2.25rem, 5.2vw, 3.6rem);
}

.closing .btn {
  margin-top: 2rem;
}

.closing__note {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.site-footer {
  padding-block: 2.5rem 2.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem 3rem;
}

.site-footer__tag {
  margin-top: 0.6rem;
  color: var(--ink-soft);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.site-footer ul a {
  text-decoration: none;
}

.site-footer ul a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 2.5rem;
  color: var(--ink-soft);
}

/* Inner pages */

.page-head {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.page-head__action {
  margin-top: 2rem;
}

.h1 {
  margin-top: 1rem;
  font-size: clamp(2.5rem, 5.6vw, 3.9rem);
  font-weight: 450;
  line-height: 1.04;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.contact {
  display: grid;
  gap: 3rem var(--gap);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

@media (min-width: 900px) {
  .contact {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: start;
  }
}

.form {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.form__pair {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .form__pair {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 500;
}

.field label span {
  font-weight: 400;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--field);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: 400 1.0625rem/1.4 var(--font);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}

.field [aria-invalid="true"],
.field [aria-invalid="true"]:focus-visible {
  border-color: var(--danger);
  border-width: 2px;
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__note {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.form__status {
  font-weight: 500;
}

.form__status:empty {
  display: none;
}

.form__status[data-kind="error"] {
  color: var(--danger);
}

.form__status[data-kind="ok"] {
  color: var(--green);
}

.aside__block + .aside__block {
  margin-top: 2.75rem;
}

.next {
  margin-top: 0.9rem;
  counter-reset: next;
}

.next li {
  position: relative;
  padding: 0.95rem 0 0.95rem 2.75rem;
  border-top: 1px solid var(--line);
  counter-increment: next;
}

.next li::before {
  content: counter(next);
  position: absolute;
  left: 0;
  top: 0.9rem;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--tint-strong);
  color: var(--green-deep);
  font-size: 0.875rem;
  font-weight: 600;
}

.direct {
  margin-top: 0.9rem;
}

.direct > div {
  display: grid;
  gap: 0.1rem;
  padding-block: 0.95rem;
  border-top: 1px solid var(--line);
}

.direct dt {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.prose {
  max-width: 44rem;
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.prose p,
.prose ul {
  margin-top: 0.85rem;
  color: var(--ink-soft);
}

.prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.prose li + li {
  margin-top: 0.4rem;
}

/* Motion preferences */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-demo]:not(.is-ready) .ev,
  .js [data-demo]:not(.is-ready) .row,
  .js [data-demo]:not(.is-ready) .tally {
    opacity: 1;
  }
}
