/* The landing page (crates/tally-web/src/landing). It sits over tokens.css and app.css,
   which style the hero's dashboard exactly as the app does; only the frame around it is
   styled here.

   A manual, as the brief asks: numbered chapters with a sticky contents index, "Fig. N"
   captions in mono, hairlines between chapters, and quiet space. Colour is the product's
   own data code and nothing else: sky blue (violet in dark) for visitors and sources,
   coral for money, ink for everything structural. The receipts are the one loud thing.

   Motion is Outpost's bar: the hero's source rotates while a dot travels the dashed trail
   and the amount ticks up; a receipt unfolds step by step and gets its stamp. Hidden
   start states are only ever set by the script (data-armed, data-pending), so without it,
   or with reduced motion, everything is simply there. No inline style anywhere. */

:root {
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --masthead: 60px;
  --receipt-shadow: drop-shadow(0 1px 1px rgba(11, 13, 18, .06)) drop-shadow(0 22px 34px rgba(11, 13, 18, .09));
  --frame-shadow: 0 1px 2px rgba(11, 13, 18, .04), 0 48px 90px -48px rgba(11, 13, 18, .32);
  --dash: var(--faint);
  --mat-sky: #e2eeff;
  --mat-peach: #ffe8dc;
  --mat-mint: #dcf4e8;
  --mat-lilac: #ece5ff;
  --mat-butter: #fff2cc;
  --mat-rose: #ffe2ea;
  --mat-periwinkle: #e4e7ff;
  --mat-shadow: 0 1px 2px rgba(11, 13, 18, .05), 0 22px 44px -26px rgba(11, 13, 18, .28);
  --pin: var(--revenue);
  --pin-ink: #ffffff;
}

:root[data-theme="dark"] {
  --receipt-shadow: drop-shadow(0 0 .6px #3d3d3d) drop-shadow(0 24px 40px rgba(0, 0, 0, .6));
  --frame-shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 48px 90px -40px rgba(0, 0, 0, .8);
  --dash: #525252;
  --mat-sky: #0e1828;
  --mat-peach: #22140d;
  --mat-mint: #0b1d15;
  --mat-lilac: #191230;
  --mat-butter: #1f1907;
  --mat-rose: #251019;
  --mat-periwinkle: #12142e;
  --mat-shadow: 0 0 0 1px rgba(255, 255, 255, .03), 0 24px 48px -24px rgba(0, 0, 0, .8);
  --pin-ink: #0a0a0a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --receipt-shadow: drop-shadow(0 0 .6px #3d3d3d) drop-shadow(0 24px 40px rgba(0, 0, 0, .6));
    --frame-shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 48px 90px -40px rgba(0, 0, 0, .8);
    --dash: #525252;
    --mat-sky: #0e1828;
    --mat-peach: #22140d;
    --mat-mint: #0b1d15;
    --mat-lilac: #191230;
    --mat-butter: #1f1907;
    --mat-rose: #251019;
    --mat-periwinkle: #12142e;
    --mat-shadow: 0 0 0 1px rgba(255, 255, 255, .03), 0 24px 48px -24px rgba(0, 0, 0, .8);
    --pin-ink: #0a0a0a;
  }
}

html {
  scroll-padding-top: calc(var(--masthead) + 20px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

[data-page="landing"] ::selection {
  background: var(--brand-tint);
  color: var(--ink);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.landing {
  flex: 1;
}

.masthead-inner,
.hero,
.manual,
.colophon-inner {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ------------------------------------------------------------------ Masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background-color: color-mix(in srgb, var(--paper) 86%, transparent);
  background-image: var(--chrome);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}

.masthead-inner {
  height: var(--masthead);
  display: flex;
  align-items: center;
  gap: 28px;
}

/* The section links show only where the contents column is hidden (narrow screens,
   below); on wide screens the masthead is the brand, the account link and the call to
   action. */
.masthead-nav {
  display: none;
  gap: 22px;
  font-size: 14px;
}

.masthead-nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

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

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.masthead-sites {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
}

.masthead-sites:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.masthead-cta {
  flex: none;
}

/* ---------------------------------------------------------------------- Hero */

.hero {
  padding-top: 76px;
}

.hero-copy {
  max-width: 1000px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: var(--ink);
}

.hero-line {
  display: block;
}

/* The rotating source: every word in one grid cell, so the line keeps its height and the
   page never moves. Its dashed underline is the trail's dash, in the visitors' colour. */
.rotor {
  display: grid;
  justify-items: start;
  padding-bottom: .06em;
}

.rotor-word {
  grid-area: 1 / 1;
  white-space: nowrap;
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-decoration-color: var(--visitors);
  text-decoration-thickness: .05em;
  text-underline-offset: .13em;
  opacity: 0;
  visibility: hidden;
}

.rotor-word[data-on] {
  opacity: 1;
  visibility: visible;
}

.hero-lede {
  max-width: 60ch;
  margin-top: 28px;
  font-size: 19px;
  line-height: 1.56;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-actions .button {
  height: 48px;
  padding: 0 22px;
  font-size: 15.5px;
}

/* The trial under the calls to action (wave 5, B1). */
.hero-trial {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* The trail: one example sale from its source to its payment. */
.trail {
  position: relative;
  margin-top: 56px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.trail > .example-tag {
  position: absolute;
  top: -10px;
  left: 20px;
}

.trail-steps {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(36px, 1fr) minmax(0, auto) minmax(36px, 1fr) minmax(0, auto);
  align-items: center;
  gap: 0 16px;
  list-style: none;
  padding: 0;
}

.trail-node {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.node-mark {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--visitors);
  background: var(--surface);
}

.node-visit .node-mark {
  background: var(--visitors);
}

.node-sale .node-mark {
  border-color: var(--revenue);
  background: var(--revenue);
  border-radius: 3px;
}

.node-stack {
  display: grid;
  min-width: 0;
}

.node-entry {
  grid-area: 1 / 1;
  display: grid;
  gap: 1px;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
}

.node-entry[data-on] {
  opacity: 1;
  visibility: visible;
}

.node-title {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 620;
  white-space: nowrap;
}

.node-path {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
}

.node-sale .node-title {
  color: var(--revenue-ink);
}

.node-detail {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-detail .flag {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
}

.node-source .node-detail {
  font-family: var(--mono);
  font-size: 12px;
}

/* A dashed connector; the dot rides on a track as wide as the line, which starts one
   width to the left, so the dot (at the track's right edge) goes from end to end. */
.trail-link {
  position: relative;
  height: 18px;
  overflow: hidden;
  background-image: linear-gradient(90deg, var(--dash) 55%, transparent 0);
  background-size: 9px 1.5px;
  background-repeat: repeat-x;
  background-position: 0 50%;
}

.travel {
  position: absolute;
  inset: 0;
  transform: translate3d(-100%, 0, 0);
}

.travel-dot {
  position: absolute;
  top: 50%;
  left: 100%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -9px;
  border-radius: 50%;
  background: var(--visitors);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--visitors) 22%, transparent);
  opacity: 0;
}

.ticker {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* The dashboard in a browser frame. */
.demo {
  position: relative;
  margin-top: 72px;
}

.demo-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--frame-shadow);
}

.demo-bar {
  display: grid;
  grid-template-columns: 1fr minmax(0, auto) 1fr;
  align-items: center;
  gap: 16px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.demo-lights {
  display: flex;
  gap: 7px;
}

.demo-lights span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line);
}

.demo-address {
  min-width: 0;
  overflow: hidden;
  padding: 4px 18px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-tag {
  justify-self: end;
  padding: 2px 8px;
  border: 1px solid var(--revenue-line);
  border-radius: 4px;
  color: var(--revenue-ink);
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.demo-screen {
  padding: 26px 0 22px;
}

.demo-screen .wrap {
  max-width: none;
  padding: 0 26px;
}

/* The example site's name, a level below the page's headline. */
.demo-screen .demo-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 620;
  letter-spacing: -.015em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.demo-note {
  position: absolute;
  right: 4px;
  top: -50px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  color: var(--muted);
  font-size: 13.5px;
  font-style: italic;
}

.demo-note-arrow {
  width: 44px;
  height: 34px;
  margin-top: 6px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------ Figures, labels */

.fig {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.fig-n {
  flex: none;
  padding-top: 1px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: nowrap;
}

.example-tag {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .01em;
}

.fig-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fig-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 620;
}

/* ---------------------------------------------------- The manual and contents */

.manual {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 72px;
  margin-top: 132px;
}

.contents {
  align-self: start;
  position: sticky;
  top: calc(var(--masthead) + 28px);
}

.contents-title {
  margin-bottom: 12px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12.5px;
}

.contents-list {
  display: grid;
  gap: 2px;
  list-style: none;
  padding: 0;
}

.contents-link {
  display: flex;
  gap: 12px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

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

.contents-link[aria-current="true"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.contents-n {
  flex: none;
  width: 1.6em;
  padding-top: 1px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.contents-cta {
  width: 100%;
  margin-top: 26px;
}

.contents-note {
  margin-top: 10px;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.45;
}

.chapters {
  min-width: 0;
  max-width: 880px;
}

.chapter {
  scroll-margin-top: calc(var(--masthead) + 24px);
  padding-bottom: 104px;
}

.chapter + .chapter {
  padding-top: 92px;
  border-top: 1px solid var(--line);
}

.chapter-n {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 14.5px;
}

.chapter-number {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 13px;
  padding-top: 1px;
}

.chapter-title {
  max-width: 19em;
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.06;
  letter-spacing: -.03em;
}

.chapter-text {
  max-width: 62ch;
  margin-top: 20px;
}

.chapter-text p,
.chapter-text li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
}

.chapter-text p + p,
.chapter-text p + ul {
  margin-top: 12px;
}

.chapter-text strong {
  color: var(--ink);
  font-weight: 600;
}

.chapter-text code {
  color: var(--ink-2);
  font-size: .82em;
}

.plain-list {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.plain-list li {
  position: relative;
  padding-left: 22px;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .8em;
  width: 10px;
  border-top: 1.5px dashed var(--dash);
}

.figure {
  margin-top: 38px;
}

/* --------------------------------------------------------- Code, copy buttons */

.code {
  position: relative;
  margin-top: 14px;
}

.code pre {
  margin: 0;
  padding: 16px 96px 16px 18px;
  border-radius: var(--radius-control);
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-lines pre {
  overflow-x: auto;
  white-space: pre;
  overflow-wrap: normal;
}

.code code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.code-copy {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  height: 30px;
  min-width: 74px;
  padding: 0 12px;
  border-color: rgba(230, 238, 250, .26);
  background: transparent;
  color: var(--code-ink);
  font-size: 13px;
}

.code-copy:hover {
  border-color: var(--code-ink);
}

.code-copy[data-copied] .copy-idle {
  opacity: 0;
  transform: translateY(-6px);
}

.code-copy[data-copied] .copy-done {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------ 01 Traffic */

.sources-fig {
  padding: 8px 22px 20px;
}

.sources-head,
.map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.sources-head {
  padding: 12px 0 10px;
  color: var(--faint);
  font-size: 12.5px;
}

.sources-head span:last-child {
  grid-column: 3;
}

.map-rows {
  list-style: none;
  padding: 0;
}

.map-row {
  padding: 11px 0;
  border-top: 1px solid var(--line-2);
}

.map-raw {
  justify-self: start;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
}

.map-arrow {
  position: relative;
  height: 10px;
  background-image: linear-gradient(90deg, var(--dash) 55%, transparent 0);
  background-size: 7px 1.5px;
  background-repeat: repeat-x;
  background-position: 0 50%;
}

.map-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3.5px;
  border-top: 1.5px solid var(--faint);
  border-right: 1.5px solid var(--faint);
  transform: rotate(45deg);
}

.map-source {
  grid-column: 3;
  grid-row: 1;
  color: var(--ink);
  font-weight: 620;
}

.map-channel {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.crawlers {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-top: 6px;
  padding: 16px 16px 14px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-control);
}

.crawlers-label {
  color: var(--muted);
  font-size: 13px;
}

.crawler-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.crawler-list code {
  color: var(--muted);
  font-size: 12.5px;
}

/* ------------------------------------------------------------ 02 Revenue */

.ledger-fig {
  padding: 20px 22px 18px;
}

.ledger-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.ledger-table th {
  padding: 8px 0;
  color: var(--faint);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
}

.ledger-table td {
  padding: 11px 12px 11px 0;
  border-top: 1px solid var(--line-2);
  font-size: 14.5px;
  vertical-align: baseline;
}

.ledger-when {
  color: var(--muted);
  white-space: nowrap;
}

.ledger-how {
  color: var(--muted);
}

.ledger-table .ledger-amount {
  padding-right: 0;
  text-align: right;
  white-space: nowrap;
}

.ledger-table td.ledger-amount {
  color: var(--ink);
  font-weight: 600;
}

.ledger-table tr[data-sign="minus"] td.ledger-amount {
  color: var(--down);
}

.ledger-kind {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 560;
}

.ledger-kind::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--revenue);
}

.kind-refund::before,
.kind-chargeback::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--down);
}

.ledger-table tfoot th,
.ledger-table tfoot td {
  padding-top: 14px;
  border-top: 1.5px solid var(--ink);
}

.ledger-table tfoot th {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 620;
}

.ledger-table tfoot td.ledger-amount {
  color: var(--revenue-ink);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.01em;
}

/* ------------------------------------------------------------ 03 Receipts */

.receipts {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.sale-picks {
  display: grid;
  gap: 10px;
}

.sale-picks-title {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12.5px;
}

.sale-pick {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 14px 16px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.sale-pick:hover {
  border-color: var(--faint);
}

.sale-pick[aria-selected="true"] {
  border-color: var(--ink);
  box-shadow: inset 3px 0 0 var(--revenue);
}

.pick-amount {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.pick-what {
  color: var(--muted);
  font-size: 13.5px;
}

.pick-method {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.pick-method .meter {
  flex: none;
  align-self: center;
}

.pick-method strong {
  color: var(--ink-2);
  font-weight: 600;
}

.credit-rule {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Three marks for the confidence: filled to its level. */
.meter {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.meter span {
  width: 4px;
  border-radius: 1px;
  background: var(--line);
}

.meter span:nth-child(1) { height: 6px; }
.meter span:nth-child(2) { height: 9px; }
.meter span:nth-child(3) { height: 12px; }

.meter[data-level="high"] span,
.meter[data-level="medium"] span:nth-child(-n + 2) {
  background: var(--ink);
}

.meter[data-level="none"] span {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--faint);
}

/* The receipts share one cell, so switching never moves the page; the tallest sets it. */
.receipt-stack {
  display: grid;
  filter: var(--receipt-shadow);
}

.receipt-slip {
  --tooth: 9px;
  position: relative;
  grid-area: 1 / 1;
  min-width: 0;
  padding: 26px 30px calc(30px + var(--tooth));
  background: var(--surface);
  border-radius: 6px 6px 0 0;
  /* The torn bottom edge: a row of teeth cut by a conic-gradient mask. */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--tooth)) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--tooth)) 100%;
  opacity: 0;
  visibility: hidden;
}

.receipt-slip[data-on] {
  opacity: 1;
  visibility: visible;
}

/* Without the script, the picker's links choose by :target. */
.receipts:not([data-js]) .receipt-stack:has(.receipt-slip:target) .receipt-slip[data-on]:not(:target) {
  opacity: 0;
  visibility: hidden;
}

.receipts:not([data-js]) .receipt-slip:target {
  opacity: 1;
  visibility: visible;
}

.receipt-head {
  padding-bottom: 20px;
  border-bottom: 1.5px dashed var(--line);
}

.receipt-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
}

.receipt-amount {
  margin-top: 10px;
  color: var(--revenue-ink);
  font-family: var(--font-display);
  font-size: 50px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}

.receipt-what {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.chain-wrap {
  position: relative;
  padding: 22px 0 10px;
}

.chain-list {
  position: relative;
  display: grid;
  list-style: none;
  padding: 0;
}

.chain-step {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 16px;
  padding: 8px 0 12px;
}

/* A dashed segment from each dot down to the next one. */
.chain-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 31px;
  bottom: -9px;
  width: 2px;
  background-image: linear-gradient(var(--dash) 55%, transparent 0);
  background-size: 1.5px 7px;
  background-repeat: repeat-y;
  background-position: 50% 0;
}

/* The travelling dot: drawn at the bottom of a box as tall as the segment, which starts
   one height up, so moving the box down carries the dot from one dot to the next. */
.chain-step:not(:last-child)::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 3.5px;
  top: 31px;
  bottom: -9px;
  width: 9px;
  background: radial-gradient(circle at 50% calc(100% - 4.5px), var(--visitors) 4px, transparent 4.6px);
  opacity: 0;
  transform: translate3d(0, -100%, 0);
  pointer-events: none;
}

.chain-dot {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 2px solid var(--visitors);
  border-radius: 50%;
  background: var(--surface);
}

.chain-step[data-step="credited"] .chain-dot {
  background: var(--visitors);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--visitors) 20%, transparent);
}

.chain-step:last-child .chain-dot {
  border-color: var(--revenue);
  border-radius: 4px;
  background: var(--revenue);
}

.chain-step[data-step="missing"] .chain-dot {
  border: 1.5px dashed var(--faint);
}

.chain-body {
  min-width: 0;
}

.chain-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
}

.chain-name {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 620;
}

.chain-when {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
}

.chain-what {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
}

.chain-step[data-step="missing"] .chain-name,
.chain-step[data-step="missing"] .chain-what {
  color: var(--muted);
}

.chain-step[data-step="missing"] .chain-when {
  color: var(--down);
}

.step-id {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
}

.step-id-label {
  color: var(--faint);
}

.step-id code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: inherit;
}

.receipt-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 20px;
  padding-top: 18px;
  border-top: 1.5px dashed var(--line);
}

.receipt-foot dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.receipt-foot dd {
  margin-top: 3px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}

.foot-confidence {
  display: flex;
  align-items: center;
  gap: 8px;
}

.receipt-slip[data-linked="no"] .foot-credited dd {
  color: var(--down);
}

.receipt-fix {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.receipt-fix a {
  color: var(--ink);
}

/* The stamp: what the receipt comes to, pressed on at the end of the chain. */
.receipt-stamp {
  position: absolute;
  top: 24px;
  right: 26px;
  padding: 4px 10px 5px;
  border: 2px solid currentColor;
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.005em;
  opacity: .82;
  transform: rotate(-6deg);
  pointer-events: none;
}

.receipt-slip[data-linked="no"] .receipt-stamp {
  color: var(--down);
}

/* ------------------------------------------------------------ 04 Coverage */

.coverage-fig {
  padding: 20px 22px 6px;
}

.coverage-pct {
  margin-top: 12px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 68px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}

.coverage-bar {
  display: block;
  width: 100%;
  height: 10px;
  margin-top: 16px;
  overflow: visible;
}

.coverage-track {
  fill: var(--revenue-bar);
}

.coverage-fill {
  fill: var(--revenue);
  transform-box: fill-box;
  transform-origin: left center;
}

.cov-line {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
}

.cov-fixes-title {
  margin-top: 26px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 620;
}

.cov-fixes {
  list-style: none;
  margin-top: 8px;
  padding: 0;
}

.cov-fix {
  border-top: 1px solid var(--line-2);
}

.cov-fix-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
}

.cov-fix-summary::-webkit-details-marker {
  display: none;
}

.cov-fix-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.cov-fix-cost {
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cov-fix[open] .chevron {
  transform: rotate(180deg);
}

.cov-fix-body {
  padding-bottom: 18px;
}

.cov-fix-body > p {
  max-width: 64ch;
  color: var(--muted);
  font-size: 14.5px;
}

/* ------------------------------------------------------------ 05 Engaged time */

.engaged-fig {
  padding: 20px 22px 18px;
}

.engaged-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 48px;
  margin-top: 16px;
}

.engaged-totals p {
  display: grid;
}

.engaged-label {
  color: var(--muted);
  font-size: 13.5px;
}

.engaged-value {
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.engaged-value.counted {
  color: var(--ink);
}

.engaged-bar {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 18px;
  border-radius: var(--radius-bar);
}

.engaged-segment {
  stroke: var(--surface);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}

.engaged-segment.counted {
  fill: var(--visitors);
}

.engaged-segment.idle {
  fill: var(--line);
}

.spans {
  display: grid;
  margin-top: 16px;
  list-style: none;
  padding: 0;
}

.span-row {
  display: grid;
  grid-template-columns: 12px 64px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line-2);
  font-size: 14px;
}

.span-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.span-row.counted .span-swatch {
  background: var(--visitors);
}

.span-row.idle .span-swatch {
  background: var(--line);
}

.span-time {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
}

.span-what {
  color: var(--ink-2);
}

.span-counted {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.span-row.counted .span-counted {
  color: var(--ink);
  font-weight: 560;
}

/* ------------------------------------------------------------ 06 Privacy */

.modes-fig {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
}

.mode-col {
  min-width: 0;
  padding: 22px 22px 24px;
}

.mode-col + .mode-col {
  border-left: 1px solid var(--line);
}

.mode-col-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.015em;
}

.mode-col-summary {
  min-height: 3em;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.mode-facts-list {
  margin-top: 6px;
}

.mode-fact {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line-2);
}

.mode-fact dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.mode-fact dd {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.45;
}

/* ------------------------------------------------- 07 Switching from DataFast */

.diff-fig {
  padding: 8px;
}

.diff {
  display: grid;
  gap: 2px;
  list-style: none;
  padding: 0;
}

.diff-line {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  padding: 10px 12px 10px 6px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

.diff-line code {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: inherit;
  overflow-wrap: anywhere;
}

.diff-sign {
  color: var(--faint);
  text-align: center;
}

.diff-out {
  background: var(--down-tint);
}

.diff-out .diff-sign {
  color: var(--down);
}

.diff-out code {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--down) 45%, transparent);
}

.diff-in {
  background: var(--brand-tint);
}

.diff-in .diff-sign {
  color: var(--brand);
}

.diff-in code {
  color: var(--ink);
}

.diff-same code {
  color: var(--muted);
}

/* ------------------------------------------------------------ 08 Setup */

.setup-fig {
  padding: 22px;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
  list-style: none;
  padding: 0;
  counter-reset: setup;
}

.setup-step {
  counter-increment: setup;
  min-width: 0;
}

.setup-step-title {
  display: flex;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 620;
}

.setup-step-title::before {
  content: counter(setup);
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--button-bg);
  color: var(--button-ink);
  font-family: var(--mono);
  font-size: 12px;
}

.setup-step-text {
  margin-top: 6px;
  padding-left: 32px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.demo-check {
  position: relative;
}

.demo-check > .example-tag {
  position: absolute;
  top: 10px;
  right: 12px;
}

/* ------------------------------------------------------------ Questions */

.chapter-faq .chapter-title {
  margin-top: 0;
}

.questions {
  margin-top: 28px;
  list-style: none;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.question {
  border-top: 1px solid var(--line);
}

.question-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.question-summary::-webkit-details-marker {
  display: none;
}

/* A plus that becomes a minus. */
.question-sign {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}

.question-sign::before,
.question-sign::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--muted);
  transition: transform .3s var(--ease-out);
}

.question-sign::after {
  transform: rotate(90deg);
}

.question[open] .question-sign::after {
  transform: rotate(0deg);
}

.question-answer {
  max-width: 64ch;
  padding-bottom: 20px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

.faq-more {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14.5px;
}

.faq-more a {
  color: var(--ink);
}

/* ------------------------------------------------------------ Colophon */

.colophon {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}

.colophon-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding-top: 22px;
  padding-bottom: 32px;
}

.colophon-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.colophon-brand .brand-mark svg {
  width: 22px;
  height: 19px;
}

.colophon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
}

.colophon-links a {
  color: var(--muted);
  text-decoration: none;
}

.colophon-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ------------------------------------------------------------ Narrower screens */

@media (max-width: 1100px) {
  .manual {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 44px;
  }

  .receipts {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 960px) {
  .manual {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 96px;
  }

  .contents,
  .demo-note {
    display: none;
  }

  .chapters {
    max-width: none;
  }

  .masthead-nav {
    display: flex;
    margin-left: auto;
  }

  .masthead-actions {
    margin-left: 0;
  }
}

@media (max-width: 800px) {
  .receipts {
    grid-template-columns: minmax(0, 1fr);
  }

  .sale-picks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sale-picks-title,
  .credit-rule {
    grid-column: 1 / -1;
  }

  .credit-rule {
    order: 9;
  }

  .modes-fig {
    grid-template-columns: minmax(0, 1fr);
  }

  .mode-col + .mode-col {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .mode-col-summary {
    min-height: 0;
  }

  .setup-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  /* The trail turns vertical: nodes stacked, the dashes running down between them. */
  .trail-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .trail-link {
    width: 18px;
    height: 30px;
    margin: 4px 0;
    background-image: linear-gradient(var(--dash) 55%, transparent 0);
    background-size: 1.5px 8px;
    background-repeat: repeat-y;
    background-position: 50% 0;
  }

  .travel {
    transform: translate3d(0, -100%, 0);
  }

  .travel-dot {
    top: 100%;
    left: 50%;
    margin: -9px 0 0 -4.5px;
  }

  .node-title,
  .node-detail {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .masthead-inner,
  .hero,
  .manual,
  .colophon-inner {
    padding: 0 16px;
  }

  .hero {
    padding-top: 44px;
  }

  .hero-lede {
    font-size: 17px;
  }

  .trail {
    margin-top: 40px;
    padding: 18px 16px;
  }

  /* The dashboard runs to the screen's edges, like the app on a phone. */
  .demo {
    margin: 52px -16px 0;
  }

  .demo-frame {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .demo .fig {
    padding: 0 16px;
  }

  .demo-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .demo-address {
    padding: 4px 10px;
  }

  .demo-screen {
    padding-top: 20px;
  }

  .demo-screen .wrap {
    padding: 0 12px;
  }

  .demo-screen .demo-name {
    font-size: 26px;
  }

  .chapter {
    padding-bottom: 72px;
  }

  .chapter + .chapter {
    padding-top: 64px;
  }

  .chapter-text p,
  .chapter-text li {
    font-size: 16px;
  }

  .figure {
    margin-top: 28px;
  }

  .sources-fig,
  .ledger-fig,
  .coverage-fig,
  .engaged-fig,
  .setup-fig {
    padding-left: 16px;
    padding-right: 16px;
  }

  .sources-head {
    display: none;
  }

  .map-row {
    grid-template-columns: 28px minmax(0, 1fr);
    row-gap: 4px;
  }

  .map-raw {
    grid-column: 1 / -1;
  }

  .map-arrow {
    grid-column: 1;
    grid-row: 2;
  }

  .map-source,
  .map-channel {
    grid-column: 2;
    grid-row: 2;
  }

  /* The ledger's rows become two lines: day and kind, then where from, and the amount. */
  .ledger-table thead {
    display: none;
  }

  .ledger-table,
  .ledger-table tbody,
  .ledger-table tfoot {
    display: block;
  }

  .ledger-table tfoot tr {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    border-top: 1.5px solid var(--ink);
  }

  .ledger-table tfoot th,
  .ledger-table tfoot td {
    border-top: 0;
  }

  .ledger-table tbody tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 2px 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line-2);
  }

  .ledger-table tbody td {
    padding: 0;
    border: 0;
  }

  .ledger-table tbody .ledger-how {
    grid-column: 1 / 3;
    grid-row: 2;
    font-size: 13.5px;
  }

  .ledger-table tbody td.ledger-amount {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
  }

  .ledger-table tfoot td.ledger-amount {
    font-size: 22px;
  }

  .sale-picks {
    grid-template-columns: minmax(0, 1fr);
  }

  .receipt-slip {
    --tooth: 8px;
    padding: 22px 18px calc(24px + var(--tooth));
  }

  .receipt-amount {
    font-size: 40px;
  }

  /* On a phone the stamp goes under the totals, where there's room for it. */
  .receipt-stamp {
    position: static;
    display: inline-block;
    margin-top: 18px;
    font-size: 14px;
  }

  .receipt-foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-credited {
    grid-column: 1 / -1;
  }

  .coverage-pct {
    font-size: 56px;
  }

  .cov-fix-summary {
    grid-template-columns: minmax(0, 1fr) 12px;
    gap: 4px 12px;
  }

  .cov-fix-cost {
    grid-row: 2;
  }

  .span-row {
    grid-template-columns: 12px 56px minmax(0, 1fr);
  }

  .span-counted {
    grid-column: 3;
  }

  .setup-fig {
    padding-top: 18px;
  }

  /* Room above the live check's message for its label. */
  .demo-check {
    padding-top: 40px;
  }

  .question-summary {
    font-size: 16px;
  }
}

@media (max-width: 460px) {
  .brand-by {
    display: none;
  }

  .masthead-cta {
    height: 36px;
    padding: 0 12px;
    font-size: 13.5px;
  }

  /* The longest source still fits on one line. */
  .hero-title {
    font-size: 10.2vw;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .setup-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .demo-check .live-layer {
    gap: 14px;
  }

  .demo-check .tally-draw,
  .demo-check .tally-draw svg {
    width: 40px;
  }

  .demo-check .live-title {
    font-size: 17px;
  }

  .code pre {
    padding-top: 48px;
    padding-right: 14px;
  }

  /* The demo's numbers fit two to a row on the smallest phones. */
  .demo-screen .kpi {
    padding: 12px;
  }

  .demo-screen .kpi-value {
    font-size: 27px;
  }

  .demo-screen .menu-caption {
    display: none;
  }

  .demo-lights {
    display: none;
  }

  .demo-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* ------------------------------------------------------------ Motion */

@media (prefers-reduced-motion: no-preference) {
  /* The rotating word: in from below, out above, through a short blur. */
  .rotor-word {
    transform: translate3d(0, .42em, 0);
    filter: blur(6px);
    transition: opacity .45s ease, transform .75s var(--ease-out), filter .5s ease, visibility 0s linear .75s;
  }

  .rotor-word[data-on] {
    transform: none;
    filter: none;
    transition-delay: 0s;
  }

  .rotor-word[data-was] {
    transform: translate3d(0, -.42em, 0);
  }

  /* The trail changes in step with the dot: the source with the word, the visit when
     the dot reaches it, the sale when it arrives. */
  .node-entry {
    transform: translate3d(0, 6px, 0);
    transition: opacity .35s ease, transform .55s var(--ease-out), visibility 0s linear .55s;
  }

  .node-entry[data-on] {
    transform: none;
    transition-delay: .05s;
  }

  .trail[data-run] .node-visit .node-entry[data-on] {
    transition-delay: .85s;
  }

  .trail[data-run] .node-sale .node-entry[data-on] {
    transition-delay: 1.7s;
  }

  .trail[data-run] .trail-link:nth-child(2) .travel {
    animation: landing-travel-x .95s var(--ease-in-out) .1s both;
  }

  .trail[data-run] .trail-link:nth-child(4) .travel {
    animation: landing-travel-x .95s var(--ease-in-out) .95s both;
  }

  .trail[data-run] .trail-link:nth-child(2) .travel-dot {
    animation: landing-dot .95s linear .1s both;
  }

  .trail[data-run] .trail-link:nth-child(4) .travel-dot {
    animation: landing-dot .95s linear .95s both;
  }

  @media (max-width: 760px) {
    .trail[data-run] .trail-link .travel {
      animation-name: landing-travel-y;
    }
  }

  .demo-note-arrow path {
    stroke-dasharray: 1;
    animation: landing-draw 1.1s var(--ease-in-out) 1.6s both;
  }

  .demo-note-arrow path + path {
    animation-delay: 2.5s;
    animation-duration: .4s;
  }

  /* A receipt unfolds: the steps one after another while a dot runs down the rail, then
     the totals, then the stamp. */
  .receipts[data-armed] .receipt-slip:not([data-play]) .chain-step,
  .receipts[data-armed] .receipt-slip:not([data-play]) .receipt-foot,
  .receipts[data-armed] .receipt-slip:not([data-play]) .receipt-stamp,
  .receipts[data-armed] .receipt-slip:not([data-play]) .receipt-fix {
    opacity: 0;
  }

  .receipt-slip[data-play] .chain-step {
    animation: landing-unfold .6s var(--ease-out) both;
  }

  .receipt-slip[data-play] .chain-step:nth-child(1) { animation-delay: .15s; }
  .receipt-slip[data-play] .chain-step:nth-child(2) { animation-delay: .5s; }
  .receipt-slip[data-play] .chain-step:nth-child(3) { animation-delay: .85s; }
  .receipt-slip[data-play] .chain-step:nth-child(4) { animation-delay: 1.2s; }
  .receipt-slip[data-play] .chain-step:nth-child(5) { animation-delay: 1.55s; }

  .receipt-slip[data-play] .chain-step::after {
    animation: landing-fade .3s ease both;
    animation-delay: inherit;
  }

  .receipt-slip[data-play] .chain-step:not(:last-child)::before {
    animation: landing-hop .4s var(--ease-in-out) both;
  }

  .receipt-slip[data-play] .chain-step:nth-child(1)::before { animation-delay: .3s; }
  .receipt-slip[data-play] .chain-step:nth-child(2)::before { animation-delay: .65s; }
  .receipt-slip[data-play] .chain-step:nth-child(3)::before { animation-delay: 1s; }
  .receipt-slip[data-play] .chain-step:nth-child(4)::before { animation-delay: 1.35s; }

  .receipt-slip[data-play] .receipt-foot,
  .receipt-slip[data-play] .receipt-fix {
    animation: landing-fade .5s ease 1.9s both;
  }

  .receipt-slip[data-play] .receipt-stamp {
    animation: landing-stamp .45s cubic-bezier(.3, 1.6, .5, 1) 2.2s both;
  }

  .receipt-slip {
    transition: opacity .35s ease, visibility 0s linear .35s;
  }

  .receipt-slip[data-on] {
    transition-delay: 0s;
  }

  /* Coverage fills to its share; the engaged bar plays out like the clock. */
  [data-pending] .coverage-fill,
  [data-pending] .engaged-bar {
    opacity: 0;
  }

  [data-inview] .coverage-fill {
    animation: tally-grow 1.3s var(--ease-out) .2s both;
  }

  [data-inview] .engaged-bar {
    animation: landing-wipe 2.2s var(--ease-in-out) .2s both;
  }

  .cov-fix[open] .cov-fix-body {
    animation: landing-fade .35s ease both;
  }

  .question[open] .question-answer {
    animation: landing-unfold .4s var(--ease-out) both;
  }

  .contents-link {
    transition: background-color .25s ease, border-color .25s ease, color .25s ease;
  }
}

@keyframes landing-travel-x {
  from {
    transform: translate3d(-100%, 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes landing-travel-y {
  from {
    transform: translate3d(0, -100%, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes landing-dot {
  0%,
  100% {
    opacity: 0;
  }
  8%,
  88% {
    opacity: 1;
  }
}

@keyframes landing-hop {
  0% {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }
  15%,
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes landing-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes landing-unfold {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
}

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

@keyframes landing-stamp {
  from {
    opacity: 0;
    transform: rotate(-6deg) scale(1.6);
  }
}

@keyframes landing-wipe {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* ---------------------------------------------------------------- Pricing (09) */

.pricing {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 38px;
}

.price-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 26px 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: inset 0 3px 0 var(--revenue);
}

.price-controls {
  display: grid;
  gap: 10px;
}

.price-controls[hidden] {
  display: none;
}

/* Monthly / Yearly: one squared track, the chosen half filled. */
.price-interval {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-2);
}

.price-interval-option {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: calc(var(--radius-control) - 3px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out),
    box-shadow .2s var(--ease-out);
}

.price-interval-option:hover {
  color: var(--ink);
}

.price-interval-option[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(11, 13, 18, .06);
}

.price-interval-note {
  color: var(--revenue-ink);
  font-size: 12.5px;
  font-weight: 600;
}

.price-steps-title {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13.5px;
}

/* The steps: a row of squared stops, everything up to the chosen one filled. */
.price-steps {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
}

.price-step {
  position: relative;
  padding: 18px 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out),
    background-color .2s var(--ease-out);
}

.price-step::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  transition: background-color .25s var(--ease-out);
}

.price-step:hover {
  border-color: var(--faint);
  color: var(--ink);
}

.price-step[data-filled="true"]::before {
  background: var(--revenue-bar);
}

.price-step[aria-pressed="true"] {
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
}

.price-step[aria-pressed="true"]::before {
  background: var(--revenue);
}

.price-step:focus-visible,
.price-interval-option:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.price-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}

.price-figure {
  display: inline-block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.price-per {
  color: var(--muted);
  font-size: 17px;
}

.price-detail {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.price-cta {
  justify-self: start;
}

.price-trial {
  margin-top: -8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.price-included {
  padding: 26px 4px 0 8px;
}

.price-included-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.price-included-list {
  display: grid;
  gap: 11px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.price-included-list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.45;
}

/* A tick drawn with borders, in the revenue colour. */
.price-included-list li::before {
  content: "";
  position: absolute;
  top: .28em;
  left: 4px;
  width: 6px;
  height: 11px;
  border: solid var(--revenue);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.price-table {
  width: 100%;
  margin-top: 34px;
  border-collapse: collapse;
  font-size: 15px;
}

.price-table-caption {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: left;
}

.price-table th,
.price-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.price-table thead th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.price-table tbody th {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
}

.price-table tbody tr {
  transition: background-color .25s var(--ease-out);
}

.price-table tbody tr[data-selected="true"] {
  background: var(--surface-2);
}

.price-table tbody tr[data-selected="true"] th {
  box-shadow: inset 3px 0 0 var(--revenue);
  color: var(--ink);
}

.price-table-money {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.price-table-per {
  margin-left: 10px;
  color: var(--faint);
  font-size: 13px;
}

.price-offers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
  padding: 0;
  list-style: none;
}

.price-offer {
  padding: 16px 18px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.price-offer-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.price-offer-text {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.price-fine {
  max-width: 70ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.price-fine a {
  color: var(--ink-2);
}

@media (prefers-reduced-motion: no-preference) {
  .price-figure[data-changed] {
    animation: landing-unfold .32s var(--ease-out);
  }
}

@media (max-width: 800px) {
  .pricing,
  .price-offers {
    grid-template-columns: 1fr;
  }

  .price-included {
    padding: 6px 2px 0;
  }
}

@media (max-width: 460px) {
  .price-card {
    padding: 20px 16px 22px;
  }

  .price-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .price-table th,
  .price-table td {
    padding: 10px 8px;
  }

  .price-table-per {
    display: block;
    margin-left: 0;
  }
}

/* ================================================================ Wave 5: colour

   The product's own renders sit on pastel mats (the site's pastels, beside the
   DataBull/Outpost data colours the renders bring: coral money, the visitors' blue),
   each chapter its own pair, so the page reads in colour from the hero down. Dark mode
   deepens each pastel to a tinted near-black (the --mat-* tokens, at the top of this
   file with the others). */

/* Each chapter's pair of pastels. */
#traffic { --mat-a: var(--mat-butter); --mat-b: var(--mat-peach); }
#visitors { --mat-a: var(--mat-sky); --mat-b: var(--mat-lilac); }
#path { --mat-a: var(--mat-peach); --mat-b: var(--mat-rose); }
#reading { --mat-a: var(--mat-mint); --mat-b: var(--mat-sky); }
#replay { --mat-a: var(--mat-lilac); --mat-b: var(--mat-rose); }
#live { --mat-a: var(--mat-periwinkle); --mat-b: var(--mat-sky); }
#labs { --mat-a: var(--mat-mint); --mat-b: var(--mat-lilac); }
#alerts { --mat-a: var(--mat-rose); --mat-b: var(--mat-peach); }
#api { --mat-a: var(--mat-periwinkle); --mat-b: var(--mat-mint); }

/* --------------------------------------------------------- the product figures */

.figure-product {
  position: relative;
  padding: 30px 28px 18px;
  border-radius: 20px;
  background: linear-gradient(150deg, var(--mat-a, var(--surface-2)) 0%, var(--mat-b, var(--surface-2)) 100%);
}

.figure-product > .fig {
  margin-top: 16px;
}

.product-frame {
  position: relative;
  min-width: 0;
}

/* The tag sits on the panel's top edge, like a label on a drawing. */
.product-frame > .example-tag {
  position: absolute;
  z-index: 2;
  top: -10px;
  right: 18px;
}

.product-frame > section,
.product-body > section,
.product-sheet {
  box-shadow: var(--mat-shadow);
}

.product-body {
  min-width: 0;
}

.product-body > section:first-child {
  margin-top: 0;
}

.product-caption {
  margin: 0 0 12px 2px;
  color: var(--muted);
  font-size: 14px;
}

.product-caption-strong {
  color: var(--ink);
  font-weight: 620;
}

/* A figure without a panel of its own (the heatmap's counts) gets a sheet. */
.product-sheet {
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.product-sheet .fig-head {
  margin-bottom: 12px;
}

.product-frame > section {
  margin-top: 0;
}

/* The revenue page's sprite of source marks, out of sight. */
.chapter > .rv-sprite-host {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --------------------------------------------------------- the hero's marks */

.demo-pin {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 19px;
  height: 19px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--pin);
  color: var(--pin-ink);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 750;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: 2px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pin) 24%, transparent);
}

.closer {
  margin-top: 22px;
}

.closer-head {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12.5px;
}

.closer-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
  margin-top: 12px;
  list-style: none;
  padding: 0;
}

.closer-item {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.closer-item .demo-pin {
  margin: 2px 0 0;
}

.closer-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.closer-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 640;
}

.closer-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.closer-link,
.only-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 620;
  text-decoration: none;
}

.closer-link:hover,
.only-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.closer-go,
.only-go {
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* ------------------------------------------------- what only … does (the strip) */

.only {
  width: 100%;
  max-width: 1220px;
  margin: 104px auto 0;
  padding: 0 28px;
}

.only-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 32px;
}

.only-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.only-basis {
  max-width: 50ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.only-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
  list-style: none;
  padding: 0;
}

.only-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.only-receipts { --mat-a: var(--mat-rose); --mat-b: var(--mat-peach); }
.only-coverage { --mat-a: var(--mat-mint); --mat-b: var(--mat-sky); }
.only-replay { --mat-a: var(--mat-lilac); --mat-b: var(--mat-rose); }
.only-labs { --mat-a: var(--mat-periwinkle); --mat-b: var(--mat-mint); }

.only-visual {
  position: relative;
  display: grid;
  align-items: end;
  height: 236px;
  padding: 34px 16px 16px;
  background: linear-gradient(150deg, var(--mat-a) 0%, var(--mat-b) 100%);
}

.only-visual > .example-tag {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
}

.only-card-title {
  margin: 18px 18px 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 680;
  line-height: 1.3;
}

.only-card-text {
  flex: 1;
  margin: 6px 18px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.only-link {
  margin: 14px 18px 18px;
}

/* The small pieces of the real thing. */
.mini {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--mat-shadow);
}

.mini-amount {
  color: var(--revenue-ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}

.mini-unit {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0;
}

.mini-chain {
  position: relative;
  display: grid;
  gap: 5px;
  margin-top: 10px;
  list-style: none;
  padding: 0;
}

/* The rail, dashed, behind the dots. */
.mini-chain::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 4px;
  border-left: 1.5px dashed var(--dash);
}

.mini-step {
  position: relative;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
}

.mini-dot {
  width: 9px;
  height: 9px;
  border: 2px solid var(--visitors);
  border-radius: 50%;
  background: var(--surface);
}

.mini-step[data-step="credited"] .mini-dot {
  border-color: var(--revenue);
  background: var(--revenue);
}

.mini-step:last-child .mini-dot {
  border-color: var(--revenue);
  border-radius: 2px;
  background: var(--revenue);
}

.mini-step-name {
  overflow: hidden;
  color: var(--ink-2);
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-step-when {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

.mini-method {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.mini-method strong {
  color: var(--ink-2);
  font-weight: 620;
}

.mini-coverage .coverage-bar {
  height: 8px;
  margin-top: 10px;
}

.mini-fix {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1px 8px;
  margin-top: 10px;
  font-size: 12.5px;
}

.mini-fix-label {
  grid-row: span 2;
  align-self: start;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--revenue-bar);
  color: var(--revenue-ink);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
}

.mini-fix-title {
  overflow: hidden;
  color: var(--ink-2);
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-fix-cost {
  color: var(--muted);
}

.mini-code {
  display: block;
  margin-top: 9px;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.mini-sels {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  list-style: none;
  padding: 0;
}

.mini-sel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 2px 8px;
}

.mini-bar {
  grid-column: 1 / -1;
  order: 9;
  display: block;
  width: 100%;
  height: 5px;
}

.mini-bar-track {
  fill: var(--surface-2);
}

.mini-bar-fill {
  fill: var(--visitors);
}

.mini-sel-name {
  overflow: hidden;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-rage {
  color: var(--revenue-ink);
  font-size: 11px;
  font-weight: 620;
}

.mini-sel-n {
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
}

.mini-labs {
  height: 100%;
  overflow: hidden;
  padding: 0;
}

.mini-labs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------- providers */

.prov-stripe { --provider: #7c6cf2; }
.prov-paddle { --provider: #ef8a55; }
.prov-lemonsqueezy { --provider: #e2b42b; }
.prov-polar { --provider: #3fa6e0; }

.providers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
}

.prov {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--provider) 12%, transparent) 0, transparent 72px),
    var(--surface);
}

.prov::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--provider);
}

.prov-name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.015em;
}

.prov-mark {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--provider);
}

.prov-facts {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.prov-facts dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11.5px;
}

.prov-facts dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.ledger-provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

.ledger-provider::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--provider);
}

/* ------------------------------------------------------------------- alerts */

.mails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.mail {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--mat-shadow);
}

.mail-label {
  padding: 12px 16px 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.mail-subject {
  padding: 3px 16px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 620;
  overflow-wrap: anywhere;
}

.mail-subject-label {
  color: var(--muted);
  font-weight: 400;
}

/* The email as the product writes it (its classes, the alerts preview's stylesheet),
   with less air around it here. */
.mail-body .m-outer-cell {
  padding: 14px 12px 12px;
}

.mail-body .m-inner {
  padding: 18px 18px 20px;
}

.mail-body .m-title {
  font-size: 19px;
  line-height: 25px;
}

.mail-body table {
  max-width: 100%;
}

.mail-flag {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: -2px;
}

.channels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  list-style: none;
  padding: 0;
}

.channel {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.channel-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 640;
}

.channel-blurb {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

/* --------------------------------------------------------- API, CLI and MCP */

.terminals {
  display: grid;
  gap: 16px;
}

.terminal {
  min-width: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: var(--mat-shadow);
}

.terminal-label {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(230, 238, 250, .1);
  color: rgba(230, 238, 250, .62);
  font-family: var(--mono);
  font-size: 12px;
}

.terminal-screen {
  margin: 0;
  overflow-x: auto;
  padding: 14px 16px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre;
}

.terminal-screen code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.terminal-prompt {
  color: #7ad7a8;
  user-select: none;
}

.terminal-command {
  color: #ffffff;
  font-weight: 600;
}

.terminal-out {
  color: rgba(230, 238, 250, .82);
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 0;
  padding: 14px 16px 16px;
  list-style: none;
}

.tool-list code {
  padding: 0;
  border: 0;
  background: none;
  color: #c9b8ff;
  font-family: var(--mono);
  font-size: 12.5px;
}

/* ------------------------------------------------------------ narrower screens */

@media (max-width: 1100px) {
  .only-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .channels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .only {
    margin-top: 88px;
  }
}

@media (max-width: 800px) {
  .closer-list,
  .providers,
  .mails {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  /* Two rows: the brand and the account on top, the section links under them. */
  :root {
    --masthead: 94px;
  }

  .masthead-inner {
    flex-wrap: wrap;
    height: auto;
    gap: 0 14px;
  }

  .masthead-inner > :first-child,
  .masthead-actions {
    height: 56px;
  }

  .masthead-nav {
    order: 3;
    width: calc(100% + 32px);
    margin: 0 -16px;
    padding: 0 16px 12px;
    overflow-x: auto;
    gap: 20px;
    scrollbar-width: none;
  }

  .masthead-nav::-webkit-scrollbar {
    display: none;
  }

  .masthead-actions {
    margin-left: auto;
    gap: 14px;
  }

  .only {
    margin-top: 72px;
    padding: 0 16px;
  }

  /* The four cards side by side, swiped. */
  .only-list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    gap: 12px;
    margin: 22px -16px 0;
    padding: 0 16px 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding: 0 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .only-list::-webkit-scrollbar {
    display: none;
  }

  .only-card {
    scroll-snap-align: start;
  }

  .demo .closer {
    padding: 0 16px;
  }

  /* The mats run to the screen's edges, as the hero's dashboard does. */
  .figure-product {
    margin-left: -16px;
    margin-right: -16px;
    padding: 26px 10px 14px;
    border-radius: 0;
  }

  .figure-product > .fig {
    padding: 0 6px;
  }

  .product-frame > .example-tag {
    right: 12px;
  }

  .channels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-screen {
    font-size: 11.5px;
  }
}

@media (max-width: 460px) {
  .masthead-sites {
    font-size: 13.5px;
  }

  .tool-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A mat whose figure isn't one panel (the alerts, the terminals) wears its tag itself. */
.figure-product > .example-tag {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 16px;
}

/* -------------------------------------------- the scenes on their mats (scenes.rs) */

#live .lp-scene,
#labs .lp-scene,
.heatmap-pair {
  position: relative;
  padding: 24px 28px 18px;
  border-radius: 20px;
  background: linear-gradient(150deg, var(--mat-a) 0%, var(--mat-b) 100%);
}

#labs .lp-scene + .lp-scene {
  margin-top: 28px;
}

/* The heatmap's poster with its counts beside it, on one mat. */
.heatmap-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-top: 28px;
}

.heatmap-pair > .lp-scene {
  margin-top: 0;
}

.heatmap-pair .lp-heatmap {
  overflow: hidden;
  border-radius: var(--radius-panel);
  box-shadow: var(--mat-shadow);
}

.heatmap-counts .hm-side {
  min-width: 0;
}

/* The strip's cards: a poster fills the coloured area, the small list over it. */
.only-visual > .mini-poster {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.mini-poster .lp-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.only-visual > .mini {
  position: relative;
  z-index: 1;
}

.mini-replay {
  margin: 0 22px 0 0;
}

@media (max-width: 800px) {
  .heatmap-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  #live .lp-scene,
  #labs .lp-scene,
  .heatmap-pair {
    margin-left: -16px;
    margin-right: -16px;
    padding: 20px 10px 14px;
    border-radius: 0;
  }
}

/* The heat sits on the plan buttons, low on the page. */
.only-replay .mini-poster .lp-poster-img {
  object-position: 50% 78%;
}

/* ------------------------------------------------- "… for" (the pages for search) */

/* After the questions: the hubs and an industry from each group (crates/tally-web/src/guides,
   landing_strip). Hairline-framed, quiet, links only. */
.for-strip-inner {
  width: 100%;
  max-width: 1220px;
  margin: 96px auto 0;
  padding: 0 28px;
}

.for-strip-title {
  padding-top: 40px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 2.5vw, 31px);
  letter-spacing: -.02em;
}

.for-strip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  list-style: none;
  padding: 0;
}

.for-strip-link {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}

.for-strip-link:hover {
  border-color: var(--faint);
  color: var(--ink);
}

.for-strip-more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 18px;
  font-size: 14.5px;
}

.for-strip-more a {
  color: var(--ink);
  text-decoration-color: var(--faint);
}

@media (max-width: 640px) {
  .for-strip-inner {
    margin-top: 64px;
    padding: 0 16px;
  }
}
