/* Quits launch site. Tokens are the app's own palette (docs/site/BRIEF.md). */
:root {
  color-scheme: light dark;
  --paper: #f6f5f1;
  --paper-raised: #ffffff;
  --paper-sunken: #efede7;
  --rule: #e3e0d8;
  --rule-strong: #c9c5ba;
  --ink: #1c1b19;
  --ink-muted: #5f5c55;
  --accent: #3d4ed8;
  --accent-hover: #2f3fbf;
  --accent-soft: #e7e9fc;
  --on-accent: #ffffff;
  --gets-back: #157347;
  --gets-back-soft: #e3f3ea;
  --owes: #b4361f;
  --owes-soft: #fbe9e4;
  --tangle: #c9c5ba;
  --focus: #3d4ed8;

  --shadow-raised: 0 1px 2px rgb(28 27 25 / 0.05), 0 6px 20px -6px rgb(28 27 25 / 0.12);
  --shadow-float: 0 2px 4px rgb(28 27 25 / 0.05), 0 18px 40px -12px rgb(28 27 25 / 0.2);
  --drop-float: drop-shadow(0 2px 2px rgb(28 27 25 / 0.05)) drop-shadow(0 14px 18px rgb(28 27 25 / 0.14));

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --side: clamp(20px, 5vw, 48px);
  --gap: clamp(96px, 14vw, 176px);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121316;
    --paper-raised: #1b1d21;
    --paper-sunken: #16171a;
    --rule: #2c2f35;
    --rule-strong: #41454d;
    --ink: #eeede9;
    --ink-muted: #a6a49e;
    --accent: #8f9cff;
    --accent-hover: #a8b2ff;
    --accent-soft: #252a4d;
    --on-accent: #10132b;
    --gets-back: #5fd39a;
    --gets-back-soft: #173126;
    --owes: #ff8f75;
    --owes-soft: #3a1f19;
    --tangle: #41454d;
    --focus: #a8b2ff;

    --shadow-raised: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 20px -6px rgb(0 0 0 / 0.6);
    --shadow-float: 0 2px 4px rgb(0 0 0 / 0.4), 0 18px 40px -12px rgb(0 0 0 / 0.6);
    --drop-float: drop-shadow(0 2px 2px rgb(0 0 0 / 0.4)) drop-shadow(0 14px 18px rgb(0 0 0 / 0.6));
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

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

ul[role="list"],
ol {
  list-style: none;
  padding: 0;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

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

.sprite {
  position: absolute;
}

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

.skip {
  position: absolute;
  left: var(--side);
  top: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus-visible {
  transform: none;
  color: var(--on-accent);
}

.wrap {
  width: 100%;
  max-width: calc(72rem + 2 * var(--side));
  margin-inline: auto;
  padding-inline: var(--side);
}

.num {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 0.875rem;
}

.caps {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 7vw + 1rem, 6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.display em,
.h2 em {
  font-style: italic;
  color: var(--accent);
}

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.5vw + 1rem, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  max-width: 52ch;
  margin-top: 20px;
  color: var(--ink-muted);
}

/* Buttons and links */
.btn,
.pill,
.text-btn,
.text-link,
.bar__link,
.foot__link,
.lockup {
  -webkit-tap-highlight-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    transform 160ms var(--ease);
}

.btn:active,
.pill:active,
.text-btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.btn--ghost {
  border: 1px solid var(--rule-strong);
  color: var(--accent);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn--invert {
  min-height: 56px;
  background: var(--on-accent);
  color: var(--accent);
}

.btn--invert:hover {
  color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn--invert:focus-visible {
  outline-color: var(--on-accent);
}

.btn--block {
  width: 100%;
}

.btn__arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition:
    background-color 160ms var(--ease),
    transform 160ms var(--ease);
}

.pill:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.text-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font: 600 0.9375rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms var(--ease),
    transform 160ms var(--ease);
}

.text-btn:hover,
.text-link:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.text-btn[hidden] {
  display: none;
}

/* 1. Header */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--accent);
  text-decoration: none;
  border-radius: 8px;
}

.lockup__mark {
  width: 32px;
  height: 32px;
}

.lockup__word {
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink);
}

.lockup:hover .lockup__word {
  color: var(--accent);
}

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

.bar__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}

.bar__link:hover {
  background: var(--paper-sunken);
  color: var(--ink);
}

.bar__link:active {
  background: var(--rule);
}

@media (max-width: 599px) {
  .bar__link {
    display: none;
  }
}

/* 2. Hero */
.hero {
  display: grid;
  gap: 64px;
  padding-top: clamp(40px, 8vw, 96px);
  padding-bottom: var(--gap);
}

.hero__text {
  display: grid;
  gap: 24px;
  align-content: center;
}

.hero__text .caps {
  margin-bottom: -4px;
}

.hero__sub {
  max-width: 34ch;
  color: var(--ink-muted);
  font-size: 1.125rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

/* The receipt */
.receipt-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
  justify-self: center;
  padding-bottom: 40px;
  filter: var(--drop-float);
}

@media (min-width: 960px) {
  .receipt-wrap {
    transform: rotate(-1.5deg);
  }
}

.receipt {
  background: var(--paper-raised);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 32px 32px 64px;
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 6px) no-repeat,
    conic-gradient(from -45deg at bottom, #000 90deg, #0000 0) bottom / 12px 6px repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 6px) no-repeat,
    conic-gradient(from -45deg at bottom, #000 90deg, #0000 0) bottom / 12px 6px repeat-x;
}

.receipt__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.receipt__table caption {
  text-align: left;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.receipt__table th,
.receipt__table td {
  padding: 12px 0;
  vertical-align: top;
  font-weight: 500;
}

.receipt__table th {
  text-align: left;
}

.receipt__table td {
  text-align: right;
  white-space: nowrap;
  padding-left: 16px;
}

.receipt__items tr + tr {
  border-top: 1px dashed var(--rule);
}

.receipt__table .sub {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-muted);
}

.receipt__total {
  border-top: 4px double var(--rule-strong);
}

.receipt__total th,
.receipt__total td {
  padding-top: 16px;
  font-weight: 600;
  font-size: 1.125rem;
}

.receipt__settle th,
.receipt__settle td {
  padding: 8px 0;
}

.receipt__head th {
  padding-top: 24px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.arrow {
  color: var(--accent);
  font-weight: 600;
}

.stamp {
  position: absolute;
  right: -28px;
  bottom: -8px;
  width: 96px;
  height: 96px;
  color: var(--gets-back);
  transform: rotate(8deg);
}

.stamp__text {
  font: 600 9.5px var(--sans);
  letter-spacing: 0.06em;
}

@media (max-width: 480px) {
  .receipt {
    padding: 24px 20px 64px;
  }

  .stamp {
    right: -10px;
    bottom: -4px;
  }
}

/* Bands */
.band {
  padding-block: var(--gap);
}

.band--tight-top {
  padding-top: 0;
}

.band--sunken {
  background: var(--paper-sunken);
}

.band--sunken .caps {
  margin-bottom: 16px;
}

/* 3. The tangle */
.tangle {
  display: grid;
  gap: 24px;
  margin-top: 56px;
  align-items: center;
}

@media (min-width: 960px) {
  .tangle {
    grid-template-columns: minmax(0, 640px) auto;
    justify-content: center;
    gap: 56px;
  }

  .tangle__counter {
    order: 2;
  }
}

.tangle__figure {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.tangle__svg {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  overflow: visible;
}

.tangle__counter {
  display: grid;
  justify-items: start;
}

.count {
  grid-area: 1 / 1;
  display: flex;
  align-items: baseline;
  gap: 14px;
  transition: opacity 200ms linear;
}

.count__n {
  font-family: var(--serif);
  font-size: clamp(5rem, 12vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.count--b .count__n {
  color: var(--accent);
}

.count__label {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink-muted);
}

@media (min-width: 960px) {
  .count {
    flex-direction: column;
    gap: 4px;
  }
}

.tangle .count--b,
.tangle.is-b .count--a {
  opacity: 0;
}

.tangle.is-b .count--b {
  opacity: 1;
}

.ious path {
  stroke: var(--tangle);
  stroke-width: 2;
  transition: opacity 400ms var(--ease);
}

.tangle__head {
  stroke: var(--tangle);
}

.tangle.is-b .ious path {
  opacity: 0;
}

.settle__line {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 600ms var(--ease);
  transition-delay: calc(200ms + var(--i) * 120ms);
}

.settle__head {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settle__head,
.settle__tag {
  opacity: 0;
  transition: opacity 200ms linear;
  transition-delay: calc(700ms + var(--i) * 120ms);
}

.tangle.is-b .settle__line {
  stroke-dashoffset: 0;
}

.tangle.is-b .settle__head,
.tangle.is-b .settle__tag {
  opacity: 1;
}

.tangle:not(.is-b) .settle__line,
.tangle:not(.is-b) .settle__head,
.tangle:not(.is-b) .settle__tag,
.tangle.is-instant *,
.tangle.is-instant .settle__line {
  transition-delay: 0ms;
}

.tangle.is-instant * {
  transition-duration: 0ms !important;
}

.settle__tag rect {
  fill: var(--accent-soft);
}

.settle__tag text {
  fill: var(--accent);
  font: 600 13px var(--sans);
  font-variant-numeric: tabular-nums;
  text-anchor: middle;
}

.person circle {
  fill: var(--paper-raised);
  stroke: var(--rule-strong);
  stroke-width: 2;
}

.person__initial {
  fill: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
  text-anchor: middle;
}

.person__name {
  fill: var(--ink);
  font: 600 15px var(--sans);
  text-anchor: end;
}

.tag--gets {
  fill: var(--gets-back-soft);
}

.tag--owes {
  fill: var(--owes-soft);
}

.tag__text {
  font: 600 13px var(--sans);
  font-variant-numeric: tabular-nums;
  text-anchor: middle;
}

.tag__text--gets {
  fill: var(--gets-back);
}

.tag__text--owes {
  fill: var(--owes);
}

/* On phones the 640-unit diagram draws at about 0.55 scale, so the labels
   grow 1.7 times to stay at 12 CSS px or more. Ben's and Dee's grow inwards. */
@media (max-width: 599px) {
  .person__label,
  .settle__tag {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(1.7);
  }

  .person__label--left {
    transform-origin: 35% 50%;
  }

  .person__label--right {
    transform-origin: 65% 50%;
  }
}

.steps {
  display: grid;
  gap: 40px;
  margin-top: 72px;
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.step {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 20px;
  border-top: 1px solid var(--rule-strong);
}

.step__n {
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--accent);
}

.step__title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.step p {
  color: var(--ink-muted);
}

/* 4. Features */
.bento {
  display: grid;
  gap: 20px;
  margin-top: 48px;
}

@media (min-width: 600px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .bento {
    grid-template-columns: repeat(3, 1fr);
  }

  .tile--wide {
    grid-column: span 2;
  }
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
}

.tile p {
  color: var(--ink-muted);
}

.tile__title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.viz {
  display: grid;
  gap: 16px;
  align-content: center;
  min-height: 132px;
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
}

.viz--centre {
  justify-items: center;
}

.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 420px;
  width: 100%;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  font-size: 0.875rem;
  font-weight: 500;
}

.seg__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 999px;
  background: var(--accent-soft);
  transform: translateX(100%);
  transition: transform 320ms var(--ease);
}

.tile--split:hover .seg__thumb,
.tile--split:focus-within .seg__thumb {
  transform: translateX(200%);
}

.seg__opt {
  position: relative;
  padding: 8px 4px;
  text-align: center;
  white-space: nowrap;
}

.seg__opt:nth-of-type(3) {
  color: var(--accent);
}

.split-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-weight: 500;
}

.split-row__arrow,
.mini-count__arrow {
  color: var(--accent);
}

.rate {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.375rem;
  font-weight: 600;
}

.rate__arrow {
  width: 56px;
  height: 12px;
  color: var(--accent);
}

.cents {
  display: grid;
  justify-items: end;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.cents__sum {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--ink);
  font-weight: 600;
}

.cents mark {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  padding: 0 2px;
}

.mini-count {
  display: flex;
  align-items: baseline;
  gap: 20px;
  font-family: var(--serif);
  font-size: 4.5rem;
  line-height: 1;
}

.mini-count s {
  color: var(--tangle);
  text-decoration-thickness: 3px;
}

.mini-count__arrow {
  font-family: var(--sans);
  font-size: 2rem;
}

.mini-count__b {
  color: var(--accent);
}

.file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 10px;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  font-size: 0.9375rem;
  font-weight: 500;
}

.file__glyph {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.tabbar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  width: 100%;
  max-width: 380px;
  gap: 2px;
  padding: 4px;
  border-radius: 12px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.tabbar li {
  flex: 1 1 auto;
  padding: 8px 4px;
  border-radius: 8px;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 479px) {
  .tabbar {
    font-size: 0.6875rem;
  }

  .tabbar li {
    padding: 8px 2px;
  }

  .tile {
    padding: 20px;
  }

  .viz {
    padding: 12px;
  }

  .seg {
    font-size: 0.75rem;
  }

  .seg__opt {
    padding: 8px 2px;
  }
}

.tabbar .is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* 5. The real app */
.live {
  display: none;
}

.mock-wrap {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

@media (min-width: 760px) {
  .mock-wrap {
    display: none;
  }

  .live {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 0;
    margin-top: 56px;
  }
}

/* Centre the frame once there is room for a matching empty column on its right */
@media (min-width: 1100px) {
  .live {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
}

/* The callouts column is exactly as tall as the phone frame, so each callout
   can point at a real spot on the screen inside it */
.callouts {
  position: relative;
  grid-column: 1;
  justify-self: end;
  align-self: start;
  width: 100%;
  max-width: 30rem;
  height: calc(780px + 28px);
}

.live__device {
  grid-column: 2;
}

.callout {
  position: absolute;
  top: var(--at);
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  transform: translateY(-50%);
}

/* The Trips form, the middle of the screen, the Settle up tab */
.callout--1 {
  --at: 25%;
}

.callout--3 {
  --at: 50%;
}

.callout--2 {
  --at: 92%;
}

.callout span {
  flex: 0 1 auto;
  max-width: 16rem;
}

.callout::after {
  content: "";
  flex: 1 1 32px;
  min-width: 32px;
  height: 1px;
  background: var(--accent);
  mask: linear-gradient(90deg, transparent, #000 24px);
}

.callout--2 {
  padding-left: 24px;
}

.live__device {
  display: grid;
  justify-items: center;
  gap: 20px;
}

.phone {
  width: calc(390px + 28px);
  height: calc(780px + 28px);
  padding: 14px;
  border-radius: 48px;
  background: var(--ink);
  box-shadow: var(--shadow-float);
}

.phone iframe {
  display: block;
  width: 390px;
  height: 780px;
  border: 0;
  border-radius: 34px;
  background: var(--paper);
}

html:not(.js) .phone iframe[data-src] {
  display: none;
}

.mock {
  padding: 24px 20px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
}

.mock__title {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.1;
}

.mock__sub {
  margin-top: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

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

.mock__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
}

.mock__list li:last-child {
  border-bottom: 0;
}

.badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.badge--gets {
  background: var(--gets-back-soft);
  color: var(--gets-back);
}

.badge--owes {
  background: var(--owes-soft);
  color: var(--owes);
}

.mock__pay {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

/* 6. Good to know */
.faq {
  display: grid;
  gap: 32px 56px;
  margin-top: 48px;
}

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

.faq div {
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.faq dt {
  font-weight: 600;
  font-size: 1.125rem;
}

.faq dd {
  margin-top: 6px;
  color: var(--ink-muted);
}

/* 7. Closing */
.closing {
  position: relative;
  overflow: hidden;
  padding-block: var(--gap);
  background: var(--accent);
  color: var(--on-accent);
  text-align: center;
}

.closing__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 480px;
  height: 480px;
  margin: -240px 0 0 -240px;
  opacity: 0.1;
  pointer-events: none;
  transition: transform 1200ms var(--ease);
}

.closing.is-in .closing__ring {
  transform: rotate(20deg);
}

.closing__inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 20px;
}

.closing__title {
  color: var(--on-accent);
}

.closing__line {
  max-width: 34ch;
  font-size: 1.125rem;
}

.closing .btn {
  margin-top: 12px;
}

/* 8. Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding-block: 24px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.foot__mark {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.foot__name {
  font-weight: 600;
  color: var(--ink);
}

.foot__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  margin-left: auto;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
}

.foot__link:hover {
  background: var(--accent-soft);
}

.foot__link:active {
  background: var(--rule);
}

/* Motion: only with JS and only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 480ms var(--ease),
      transform 480ms var(--ease);
  }

  html.js .reveal.is-in {
    opacity: 1;
    transform: none;
  }

  html.js .closing.reveal {
    transform: none;
  }

  html.js .receipt__items tr {
    animation: rise 480ms var(--ease) both;
    animation-delay: calc(200ms + var(--n) * 90ms);
  }

  html.js .receipt__items tr:nth-child(1) {
    --n: 0;
  }
  html.js .receipt__items tr:nth-child(2) {
    --n: 1;
  }
  html.js .receipt__items tr:nth-child(3) {
    --n: 2;
  }
  html.js .receipt__items tr:nth-child(4) {
    --n: 3;
  }

  html.js .receipt__settle tr:not(.receipt__head) {
    animation: slide 400ms var(--ease) both;
    animation-delay: calc(1300ms + var(--n) * 90ms);
  }

  html.js .receipt__settle tr:nth-child(2) {
    --n: 0;
  }
  html.js .receipt__settle tr:nth-child(3) {
    --n: 1;
  }
  html.js .receipt__settle tr:nth-child(4) {
    --n: 2;
  }

  html.js .stamp {
    animation: stamp 260ms var(--ease) 1880ms both;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
  }

  .closing.is-in .closing__ring,
  .btn:hover .btn__arrow,
  .btn:active,
  .pill:active,
  .text-btn:active,
  .btn--invert:hover {
    transform: none;
  }

  .tile--split:hover .seg__thumb,
  .tile--split:focus-within .seg__thumb {
    transform: translateX(100%);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes slide {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(8deg) scale(1.15);
  }
  to {
    opacity: 1;
    transform: rotate(8deg) scale(1);
  }
}
