/* IXO Payment Facilitator page (payment-facilitator.html).
   Page-specific components only: the shared header, footer, frame, type, buttons and section system come from
   enterprise.css. The page's own names map onto the site tokens below. Colour is proof only: verified green marks
   approved and paid. */

.page-facilitator {
  --ink: var(--fg);
  --ink-2: var(--accent);
  --on-ink: #fafaf9;
  --mid: var(--fg-mid);
  --low: var(--fg-low);
  --faint: #a6a09b;
  --line-2: var(--line-strong);
  --bg-2: var(--bg-elev-1);
  --bg-3: var(--bg-elev-2);
  --panel: #fff;
  --verified: #216c53;
  --on-verified: #fff;
  --warn: #89520a;
  --mono: var(--font-mono);
  --split: 64px;
  --step-small: 0.875rem;
  --step-body: 1rem;
  --step-lead: 18px;
  --step-h3: clamp(1.4375rem, 1.2rem + 0.9vw, 1.8125rem);
  --step-statement: clamp(2.75rem, 1rem + 5.4vw, 6rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fig-ink: var(--ink-2);
  --fig-panel: transparent;
  --fig-hi: var(--ink-2);
  --fig-on-hi: var(--on-ink);
}

/* The site caps paragraphs at a reading measure; these are rows of product UI and run full width. */
.panel-label,
.card-row,
.receipt-title,
.receipt-ok,
.agent-status,
.agent-get {
  max-width: none;
}

.pf-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* The site's list spacing is for prose; these lists are product parts. */
.page-facilitator :where(.flow-steps, .agent-steps, .inc-list, .needs-list) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-facilitator :where(.flow-steps, .agent-steps, .inc-list, .needs-list) > li + li {
  margin-top: 0;
}

/* The site spaces consecutive paragraphs for prose; inside these product parts the layout does the spacing. */
.page-facilitator :where(.pf-hero, .pf-story, .inc-cols, .needs-body, .pf-close) p + p {
  margin-top: 0;
}

.moment h3 {
  max-width: 20ch;
  font-size: var(--step-h3);
  line-height: 1.22;
}

/* Mono labels: nav, buttons, badges, panel heads. Never body copy. */
.panel-label,
.hero-meta,
.agent-go,
.agent-pick label,
.tabs [role="tab"],
.flow-label,
.state,
.pf-act,
.badge,
.tech summary {
  font-family: var(--mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.065em;
}

/* Figure set: one 1.5 stroke, in ink. Classes apply inside <use> clones. */
.fp {
  fill: var(--fig-panel);
  stroke: var(--fig-ink);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.fl,
.fhs,
.fk {
  fill: none;
  stroke: var(--fig-ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fhs {
  stroke-width: 1.8;
}

.fk {
  stroke: var(--fig-on-hi);
  stroke-width: 1.6;
}

.fh {
  fill: var(--fig-hi);
}

.ic {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Panels: square, hairline, a mono label row on top ---------- */

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.panel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--low);
  font-size: 0.6875rem;
  line-height: 1.4;
}

.panel-label span:last-child {
  color: var(--faint);
}

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

/* ---------- Hero: copy left, the payout demo right, a mono proof strip under both ---------- */

.pf-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px var(--split);
  align-items: center;
  padding-top: clamp(56px, 7vw, 100px);
}

/* The site's h1 size, at the light weight; the second line in the quieter tone. */
.pf-hero h1 {
  max-width: 13ch;
  font-weight: 300;
}

.pf-hero h1 .tone {
  display: block;
  color: var(--low);
}

/* The headline answers the demo: when the first payment lands, "Payments" gets a verified-green rule, drawn once. */
.pf-hero h1 .w-mark {
  position: relative;
  display: inline-block;
}

.pf-hero h1 .w-mark::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: 0.02em;
  bottom: -0.04em;
  height: max(2px, 0.035em);
  background: var(--verified);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease-out);
}

.pf-hero h1.is-marked .w-mark::after {
  transform: scaleX(1);
}

.lead {
  margin-top: 28px;
  max-width: 44ch;
  color: var(--mid);
  font-size: var(--step-lead);
  line-height: 1.68;
  letter-spacing: -0.012em;
}

.lead + .lead {
  margin-top: 14px;
}

.lead-more {
  font-size: var(--step-body);
  line-height: 1.7;
}

.cta-note {
  margin-top: 16px;
  color: var(--low);
  font-size: var(--step-small);
}

.cta-note a {
  color: var(--mid);
}

.hero-fig figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--low);
  font-size: 0.8125rem;
}

/* The proof strip that closes the hero: mono, on a rule across the frame. */
.hero-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(24px, 3vw, 40px);
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
  color: var(--low);
  font-size: 0.6875rem;
  line-height: 1.5;
}

.hero-meta a {
  color: var(--ink);
}

/* The payout: a fragment of the product, under the line. */
.payout {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
}

.payout-who,
.payout-act {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payout-who > div {
  flex: 1;
  min-width: 0;
}

.payout-to {
  font-weight: 450;
  line-height: 1.4;
}

.payout-rule {
  color: var(--low);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.payout-amt {
  font-size: 1.375rem;
  font-weight: 350;
  letter-spacing: -0.02em;
}

.payout-act {
  flex-wrap: wrap;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-3);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}

.avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 0.6875rem;
}

/* State chips: mono, neutral, colour only in the dot. Waiting = hollow ring; done = verified green. */
.state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 5px 10px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.6875rem;
  line-height: 1.3;
  white-space: nowrap;
}

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

.state[data-tone="wait"]::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.state[data-tone="paused"]::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--warn);
}

@media (prefers-reduced-motion: no-preference) {
  .state[data-tone="wait"]::before {
    animation: wait-ring 1.4s ease-in-out infinite;
  }
}

@keyframes wait-ring {
  50% {
    transform: scale(0.55);
  }
}

.state[data-tone="signal"]::before {
  background: var(--faint);
}

.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mid);
  font-size: 0.875rem;
}

.pf-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--ink-2);
  color: var(--on-ink);
  font-size: 0.6875rem;
  line-height: 1;
}

/* Before the press: an outlined button waiting for Ben. */
.pf-act[data-tone="pending"] {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.pf-act--dark {
  background: var(--ink-2);
  color: var(--on-ink);
}

.payout-act .state {
  margin-right: auto;
}

.payout-act .pf-act {
  min-width: 96px;
  margin-left: auto;
}

/* ---------- Connect your agent: one bordered strip, the black button and a Claude Code | Codex switch ---------- */

.agent {
  display: inline-flex;
  align-items: stretch;
  gap: 4px;
  margin-top: 36px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.agent-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--ink-2);
  color: var(--on-ink);
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease-out),
    background-color 0.25s;
}

.agent-go:hover {
  background: color-mix(in srgb, var(--ink-2) 84%, var(--bg));
}

.agent-go:active {
  transform: scale(0.98);
}

/* Copied: the one moment the button itself is proof. */
.agent-go.is-copied {
  background: var(--verified);
  color: var(--on-verified);
}

.agent-go.is-copied .ic {
  animation: tick-in 0.4s var(--ease-out);
}

@keyframes tick-in {
  from {
    transform: scale(0.3) rotate(-20deg);
    opacity: 0;
  }
}

.agent-pick {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 0;
  margin: 0;
  padding: 3px;
  border: 0;
  border-radius: 8px;
  background: var(--bg-2);
}

.agent-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 6px;
  background: var(--panel);
  box-shadow:
    0 0 0 1px var(--line),
    0 1px 2px rgb(28 25 23 / 0.08);
  transition: transform 0.35s var(--ease-out);
}

.agent-pick:has(input[value="codex"]:checked) .agent-thumb {
  transform: translateX(100%);
}

.agent-pick label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--low);
  font-size: 0.6875rem;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
}

.agent-pick label:hover,
.agent-pick label:has(:checked) {
  color: var(--ink);
}

.agent-pick input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.agent-pick label:has(:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.agent-logo {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.agent-panel {
  max-width: 560px;
  margin-top: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: left;
}

.agent-status {
  padding: 14px 18px 0;
  font-weight: 450;
  font-size: 0.9375rem;
}

.agent-cmd {
  margin: 10px 18px 0;
  padding: 12px 14px;
  max-height: 5.6em;
  overflow: auto;
  border-radius: 4px;
  background: #1c1917;
  color: #e7e5e4;
  font-size: 0.75rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.agent-steps {
  display: grid;
  margin-top: 14px;
  counter-reset: step;
  border-top: 1px solid var(--line);
}

.agent-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 18px;
  color: var(--mid);
  font-size: 0.9375rem;
  counter-increment: step;
}

.agent-steps > :where(li + li) {
  border-top: 1px solid var(--line);
}

.agent-steps li::before {
  content: counter(step, decimal-leading-zero);
  padding-top: 0.2em;
  color: var(--low);
  font-family: var(--mono);
  font-size: 0.6875rem;
}

.agent-get {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--low);
  font-size: 0.875rem;
}

/* ---------- Flow: one hairline, three nodes, one coin held at a closed gate ---------- */

.flow {
  --box: 13px; /* the node: the script reads its width to rest the coin beside it */
  --coin: 28px;
}

.flow-amt {
  margin-bottom: 40px;
  color: var(--ink);
  font-size: clamp(2.5rem, 1.6rem + 2.4vw, 4rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
}

.flow-row {
  position: relative;
}

.flow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.flow-steps > li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

/* Nodes, as on ixo.world's decision flow: hollow until the money reaches them. */
.flow-node {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--box);
  height: var(--box);
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--panel);
  transition:
    background-color 0.4s,
    border-color 0.4s;
}

.flow-steps > li:first-child .flow-node,
.is-live .flow-steps > li.on .flow-node {
  border-color: var(--ink-2);
  background: var(--ink-2);
}

/* At rest without motion, a route shows its finished, paid state. */
.flow:not(.is-live, [data-rest="held"]) .flow-steps > li + li .flow-node {
  border-color: var(--verified);
  background: var(--verified);
}

/* Approved, and paid: verified green. */
.is-live .flow-steps > li.approved span.flow-node,
.is-live .flow-steps > li.on:last-child span.flow-node {
  border-color: var(--verified);
  background: var(--verified);
}

.flow-label {
  max-width: 15ch;
  color: var(--ink);
  font-size: 0.6875rem;
  line-height: 1.45;
}

.flow-cap {
  max-width: 18ch;
  margin-top: -6px;
  color: var(--low);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.flow-track {
  position: absolute;
  top: calc(var(--box) / 2 - 1px);
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 2px;
}

.flow-base {
  position: absolute;
  inset: 0;
  top: 0.5px;
  border-top: 1px dashed var(--line-2);
}

.flow-fill {
  position: absolute;
  inset: 0;
  top: 0.5px;
  height: 1px;
  background: var(--ink-2);
  transform-origin: left;
}

/* The coin: the one heavy mark on the line, with a drawn dollar. */
.flow-coin {
  position: absolute;
  left: calc(100% - var(--box) / 2 - var(--coin) - 6px);
  top: calc(var(--coin) / -2 + 1px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--coin);
  height: var(--coin);
  border-radius: 50%;
  background: var(--ink-2);
  color: var(--on-ink);
  box-shadow: 0 0 0 4px var(--panel);
}

/* Live, the script moves the coin from the track's start. */
.is-live .flow-coin {
  left: calc(var(--coin) / -2);
}

.coin-mark {
  width: 46%;
  height: 46%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The gate: a bar across the line before "Work approved"; approval lifts it away. */
.flow-gate {
  position: absolute;
  top: calc(var(--box) / 2 - 16px);
  right: calc(50% + var(--box) / 2 + 8px);
  z-index: 1;
  width: 3px;
  height: 32px;
  border-radius: 2px;
  background: var(--ink-2);
  opacity: 0;
  transform: translateY(-60%) scaleY(0.2);
  transition:
    transform 0.45s var(--ease-out),
    opacity 0.3s;
}

.is-live .gate:not(.approved) .flow-gate {
  opacity: 1;
  transform: none;
}

.pf-hero .flow {
  --coin: 32px;
  padding: 80px 24px 40px;
}

/* A rule passed: one hairline ring spreads from the node and fades (the frame's ring markers, in motion). */
.flow-ripple {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  width: var(--box);
  height: var(--box);
  margin-left: calc(var(--box) / -2);
  overflow: visible;
  pointer-events: none;
  animation: node-ripple 1.2s var(--ease-out) forwards;
}

.flow-ripple circle {
  fill: none;
  stroke: var(--verified);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

@keyframes node-ripple {
  from {
    transform: scale(1);
    opacity: 0.9;
  }

  to {
    transform: scale(4.2);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-ripple {
    display: none;
  }
}

/* Where Amina's money lands: counts up when the coin arrives. */
.flow-landed {
  position: absolute;
  top: -48px;
  left: 50%;
  translate: -50% 0;
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--verified);
  color: var(--on-verified);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
}

/* The hero rests HELD: the coin parked at the closed gate, waiting for Ben. Motion then plays the payout through. */
.flow[data-rest="held"]:not(.is-live) .flow-gate {
  opacity: 1;
  transform: none;
}

.flow[data-rest="held"]:not(.is-live) .flow-coin {
  left: calc(50% - var(--box) / 2 - var(--coin) - 24px);
}

.flow[data-rest="held"]:not(.is-live) .flow-fill {
  right: calc(50% + var(--box) / 2 + var(--coin) / 2 + 24px);
}

.flow[data-rest="held"]:not(.is-live) .flow-landed {
  visibility: hidden;
}

/* ---------- The story: six moments, one payout ---------- */

/* Copy on the left, the figure on the right, on the page's one split line. */
.moment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px var(--split);
  align-items: start;
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
}

.moment-copy p {
  margin-top: 14px;
  max-width: 44ch;
  color: var(--mid);
  font-size: var(--step-lead);
  line-height: 1.65;
}

.moment-fig {
  min-width: 0;
}

.player .player-head {
  padding: 20px clamp(16px, 2.4vw, 28px) clamp(20px, 2.4vw, 28px);
}

.tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 28px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-2);
}

.tabs [role="tab"] {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--low);
  font-size: 0.6875rem;
  cursor: pointer;
  transition:
    color 0.2s,
    background-color 0.2s,
    box-shadow 0.2s;
}

.tabs [role="tab"]:hover {
  color: var(--ink);
}

.tabs [role="tab"][aria-selected="true"] {
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
}

/* Product fragments */
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 12px 20px;
}

.card-row + .card-row {
  border-top: 1px solid var(--line);
}

.card-head {
  font-weight: 450;
}

.amount {
  font-weight: 450;
}

.muted {
  color: var(--low);
  font-size: 0.875rem;
}

.keyed .card-row .muted {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.receipt-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 1.1875rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.receipt-fig {
  width: 30px;
  height: 30px;
}

.receipt-ok {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px dashed var(--line-2);
  background: var(--bg-2);
  color: var(--verified);
  font-weight: 450;
}

.tick {
  width: 22px;
  height: 22px;
  flex: none;
  padding: 4px;
  border-radius: 50%;
  background: var(--verified);
  fill: none;
  stroke: var(--on-verified);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meter {
  height: 4px;
  margin: 0 20px 18px;
  background: var(--bg-3);
  overflow: hidden;
}

.meter-fill {
  display: block;
  width: 90%;
  height: 100%;
  background: var(--ink-2);
  transform-origin: left;
}

.chat {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.msg {
  justify-self: start;
  max-width: 85%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px 12px 12px 3px;
  background: var(--bg);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.msg-you {
  justify-self: end;
  border-color: var(--ink-2);
  border-radius: 12px 12px 3px;
  background: var(--ink-2);
  color: var(--on-ink);
}

.msg-done {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 450;
}

/* ---------- The statement: the site's dark band, at statement scale ---------- */

.pf-statement {
  --mid: var(--vis-mid);
  --low: var(--vis-low);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px var(--split);
}

.pf-statement .statement-line {
  grid-column: 1 / -1;
  max-width: 14ch;
  color: #fafaf9;
  font-size: var(--step-statement);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
}

.pf-statement p {
  grid-column: 2;
  max-width: 44ch;
  color: var(--mid);
  font-size: var(--step-lead);
  line-height: 1.65;
}

/* ---------- What's included ---------- */

.inc-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px var(--split);
}

.inc-cols h3,
.needs-group h3 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.inc-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--mid);
}

.inc-list b {
  color: var(--ink);
}

/* Status badges: mono, square, neutral; colour only in the dot. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 3px 8px 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.6875rem;
  line-height: 1.4;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verified);
}

.b-test::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.b-soon {
  color: var(--low);
}

.b-soon::before {
  background: var(--faint);
}

/* ---------- What you need: hairline rows, the item left, what it means right ---------- */

.needs-group + .needs-group {
  margin-top: 48px;
}

.needs-list li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px var(--split);
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.needs-list b {
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.needs-list p {
  color: var(--mid);
  line-height: 1.6;
}

/* "One or both": a mono "or" on the rule between the two options. */
.needs-pick li + li::before {
  content: "or";
  position: absolute;
  top: -11px;
  left: 0;
  padding-right: 10px;
  background: var(--bg-2);
  color: var(--low);
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 20px;
  text-transform: uppercase;
}

/* Time, upkeep, details and asks.world sit on the split line, under the explanations. */
.needs-after {
  margin-top: 32px;
  margin-left: calc(50% + var(--split) / 2);
}

.needs-more {
  max-width: 72ch;
  color: var(--mid);
  font-size: 0.9375rem;
}

.needs-more b {
  color: var(--ink);
}

.tech {
  margin-top: 16px;
}

.tech summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--ink);
  font-size: 0.6875rem;
  cursor: pointer;
  list-style: none;
}

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

.tech summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease-out);
}

.tech[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.tech ul {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-left: 18px;
  list-style: square;
  color: var(--mid);
  font-size: 0.9375rem;
  max-width: 72ch;
}

.tech li::marker {
  color: var(--faint);
}

.asks-line {
  margin-top: 32px;
  padding: 18px 20px;
  max-width: 72ch;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mid);
  font-size: 0.9375rem;
}

.asks-line b {
  color: var(--ink);
}

/* ---------- The close ---------- */

.pf-close {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px var(--split);
  align-items: start;
}

.pf-close h2 {
  max-width: 12ch;
  font-weight: 300;
}

.close-act > p:first-child {
  max-width: 46ch;
  padding-top: 0.5em;
  color: var(--mid);
  font-size: var(--step-lead);
  line-height: 1.65;
}

.pf-close .agent {
  margin-top: 28px;
}

.close-note {
  margin-top: 18px;
  font-size: 0.9375rem;
}

/* Without the script, the copy button can't work: send people to the guide instead. */
.agent-nojs {
  display: none;
}

html:not(.js) .agent,
html:not(.js) .agent-panel {
  display: none;
}

html:not(.js) .agent-nojs {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  margin-top: 36px;
  padding: 0 20px;
  border-radius: 8px;
  background: var(--ink-2);
  color: var(--on-ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .pf-hero,
  .moment,
  .pf-close {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .pf-statement,
  .inc-cols,
  .needs-list li {
    grid-template-columns: minmax(0, 1fr);
  }

  .pf-statement p {
    grid-column: 1;
  }

  .needs-after {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .agent {
    display: grid;
    width: 100%;
  }

  .flow {
    --coin: 24px;
  }

  .flow-steps {
    gap: 6px;
  }

  .flow-label {
    max-width: 11ch;
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
  }

  .flow-cap {
    font-size: 0.75rem;
  }

  .pf-hero .flow {
    --coin: 28px;
    padding: 72px 12px 32px;
  }

  .player .player-head {
    padding: 16px;
  }

  .flow-landed {
    font-size: 0.6875rem;
  }

  .payout {
    padding: 16px;
  }

  .card-row {
    padding: 10px 16px;
  }

  .hero-meta {
    flex-direction: column;
  }
}

/* ---------- The pinned story (wide screens with the script) ---------- */

/* Wide screens with the script: the player pins beside the copy and one payout travels the six moments. */
.pf-story.is-pinned {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--split);
  align-items: start;
}

.pf-story.is-pinned > .story-head {
  grid-column: 1 / -1;
}

.pf-story.is-pinned .moment {
  grid-column: 1;
  display: flex;
  align-items: center;
  min-height: 58vh;
  padding: 0;
}

.pf-story.is-pinned .moment:last-of-type {
  min-height: 92vh;
  padding-bottom: 30vh;
}

/* Inactive moments step back in colour, never below AA. */
.pf-story.is-pinned .moment h3,
.pf-story.is-pinned .moment-copy p {
  color: var(--low);
  transition: color 0.5s var(--ease-out);
}

.pf-story.is-pinned .moment.is-active h3 {
  color: var(--ink);
}

.pf-story.is-pinned .moment.is-active .moment-copy p {
  color: var(--mid);
}

.pf-story.is-pinned .moment-fig:not(.player) {
  display: none;
}

.pf-story.is-pinned > .player {
  grid-column: 2;
  grid-row: 2 / span 6;
  position: sticky;
  top: max(84px, calc(50vh - 320px));
}

/* In the player, each card is a section of the panel, not a card inside a card. */
.story-slot {
  display: grid;
  align-items: start;
  min-height: 300px;
}

.story-slot > .card {
  grid-area: 1 / 1;
  width: 100%;
  max-width: none;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

/* Where you are in the story: one dot per moment on a hairline in the label row, inked as the payout travels. */
.story-steps {
  --p: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.story-steps::before,
.story-steps::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3.5px;
  right: 3.5px;
  height: 1px;
  translate: 0 -50%;
}

.story-steps::before {
  background: var(--line);
}

.story-steps::after {
  background: var(--ink-2);
  transform: scaleX(var(--p));
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.story-steps i {
  position: relative;
  z-index: 1;
  width: 7px;
  height: 7px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--panel);
  transition:
    background-color 0.4s,
    border-color 0.4s,
    transform 0.4s var(--ease-out);
}

.story-steps i.done,
.story-steps i.now {
  border-color: var(--ink-2);
  background: var(--ink-2);
}

.story-steps i.now {
  transform: scale(1.4);
}
