/* splitinity.com. Colours from docs/design-handoff/tokens.json; fonts hosted here (Geist, Inter: SIL Open Font
   License), so no visitor's address goes to a font service. */
@font-face { font-family: Geist; src: url(fonts/geist.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #F3F5F8; --surface: #FFFFFF; --surface-2: #EEF1F5; --text: #0E1A2B; --text-2: #556275; --border: #E3E7ED;
  --brand: #128050; --brand-fill: #128050; --brand-tint: #E6F3EC; --neg: #CC3131;
  --half-a: #148C58; --half-b: #0E1A2B; --glow: rgba(18, 128, 80, 0.12);
  --shadow: 0 40px 80px -36px rgba(14, 26, 43, 0.35); --bezel: #0E1A2B;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B111A; --surface: #141C27; --surface-2: #1C2633; --text: #EDF1F6; --text-2: #A2ADBC; --border: #263243;
    --brand: #4CC88E; --brand-fill: #158755; --brand-tint: rgba(31, 165, 103, 0.15); --neg: #F06A64;
    --half-a: #EDF1F6; --half-b: #4CC88E; --glow: rgba(76, 200, 142, 0.10);
    --shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7); --bezel: #000;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B111A; --surface: #141C27; --surface-2: #1C2633; --text: #EDF1F6; --text-2: #A2ADBC; --border: #263243;
  --brand: #4CC88E; --brand-fill: #158755; --brand-tint: rgba(31, 165, 103, 0.15); --neg: #F06A64;
  --half-a: #EDF1F6; --half-b: #4CC88E; --glow: rgba(76, 200, 142, 0.10);
  --shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7); --bezel: #000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* Clipped here too: on phones, anything wider than the screen (the hero's orbits) would otherwise zoom the page out. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow-x: clip;
  font: 17px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s, color 0.4s;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--text); }
h1, h2, .num, .word { font-family: Geist, Inter, system-ui, sans-serif; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.ic { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.ic.big { width: 28px; height: 28px; color: var(--brand); }
.ic.tiny { width: 16px; height: 16px; }
.muted { color: var(--text-2); } .small { font-size: 13px; }

/* The top bar */
.bar {
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.bar-in { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.word { font-weight: 700; font-size: 21px; letter-spacing: -0.03em; color: var(--text); }
.word span { color: var(--brand); }
.word.small { font-size: 17px; }
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 14px; font-weight: 500; }
.nav a { color: var(--text-2); }
.nav a:hover { color: var(--text); }
.theme {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.theme .ic { width: 20px; height: 20px; grid-area: 1 / 1; }
.theme .to-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .to-light { display: block; }
  :root:not([data-theme="light"]) .theme .to-dark { display: none; }
}
:root[data-theme="dark"] .theme .to-light { display: block; }
:root[data-theme="dark"] .theme .to-dark { display: none; }

/* The logo: two half discs rotated 30°, the ∞ cut through them by a mask (Logo.kt). */
.mark { display: block; }
.mark.small { width: 34px; height: 34px; }
.mark.big { width: 168px; height: 168px; }
.mark.mid { width: 96px; height: 96px; }
/* Round ends too: the loop starts and ends at one point, and square ends leave a hairline there. */
.mark .inf { fill: none; stroke: #000; stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }

/* Hero */
.hero { position: relative; padding: 64px 0 0; text-align: center; }
.glow {
  position: absolute; left: 50%; top: 20px; width: min(1100px, 140vw); aspect-ratio: 1; translate: -50% 0;
  border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent 70%); pointer-events: none;
}
.hero-in { position: relative; display: flex; flex-direction: column; align-items: center; }
h1 {
  margin: 32px 0 0; font-weight: 600; font-size: clamp(52px, 8.4vw, 112px); line-height: 0.98;
  letter-spacing: -0.045em; text-wrap: balance;
}
h1 em, h2 em { font-style: normal; color: var(--brand); }
.lead { margin: 24px 0 0; max-width: 600px; font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); text-wrap: pretty; }
.ctas { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn {
  height: 54px; padding: 0 24px; border-radius: 14px; display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px;
}
.btn.primary { background: var(--brand-fill); color: #fff; }
.btn.ghost { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
a.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.tester { margin-top: 16px; font-size: 15px; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

/* The hero stage: three phones fanned out in depth over orbit rings with currency coins, floating cards telling
   the story (an expense, a conversion, a settlement), the whole tilting a little with the pointer (motion.js). */
.stage {
  --w: 300px; position: relative; max-width: 1200px; margin: 64px auto 0; height: 700px; perspective: 1600px;
}
.fan {
  position: absolute; inset: 0; z-index: 2; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.shot { position: absolute; top: 0; left: 50%; width: var(--w); transform-style: preserve-3d; }
.shot.mid { translate: -50% 0; z-index: 3; }
.shot.left { translate: calc(-50% - 260px) 70px; z-index: 1; }
.shot.right { translate: calc(-50% + 260px) 70px; z-index: 1; }
.shot.left .phone { transform: rotateY(24deg) rotateZ(-3deg) translateZ(-140px); transform-origin: right center; }
.shot.right .phone { transform: rotateY(-24deg) rotateZ(3deg) translateZ(-140px); transform-origin: left center; }
.shot.left .phone::before, .shot.right .phone::before {
  /* The side phones sit a little in shadow, so the middle one leads. */
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0)); 
}
.shot.right .phone::before { background: linear-gradient(270deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0)); }
.phone {
  position: relative; aspect-ratio: 618 / 1338; border-radius: 46px; padding: 10px;
  background: linear-gradient(145deg, #3A4452 0%, #10151C 38%, #0A0E13 70%, #2B333E 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.10), inset 0 0 0 4px #05080C, var(--shadow),
    0 2px 0 rgba(255, 255, 255, 0.04);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 37px; background: var(--surface); }
.floor {
  position: absolute; left: 50%; top: 600px; width: 760px; height: 80px; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.28), transparent); filter: blur(8px); transform: translateZ(-200px);
}
.stage::after {
  /* The phones sink into the page below. */
  content: ""; position: absolute; left: -20%; right: -20%; bottom: -1px; height: 240px; z-index: 4; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg) 85%);
}

/* The rings stay within the stage, behind the phones, fading in from its top so they never reach the text. */
.orbits {
  position: absolute; inset: 0 -12vw; z-index: 1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%); mask-image: linear-gradient(to bottom, transparent, #000 22%);
}
.orbits > .ring { left: 50%; top: 380px; }
.ring {
  position: absolute; left: 0; top: 0; width: calc(var(--r) * 2); height: calc(var(--r) * 2); translate: -50% -50%;
  border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--text-2) 28%, transparent);
  animation: orbit var(--t) linear infinite;
}
.ring.r1 { --r: 330px; --t: 70s; }
.ring.r2 { --r: 450px; --t: 95s; animation-direction: reverse; }
.ring.r3 { --r: 570px; --t: 120s; border-color: color-mix(in srgb, var(--text-2) 16%, transparent); }
.coin {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a)));
}
.coin i {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; font-style: normal;
  font: 700 15px/1 Geist, Inter, sans-serif; color: var(--brand); background: var(--surface);
  border: 1px solid var(--border); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.35);
  animation: orbit var(--t) linear infinite reverse; /* stays upright while its ring turns */
}
.ring.r2 .coin i { animation-direction: normal; }
@keyframes orbit { to { rotate: 360deg; } }

.chip {
  position: absolute; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px;
  border-radius: 18px; text-align: left; font-size: 14px; line-height: 1.3;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.35);
}
.chip b { display: block; font-weight: 600; }
.chip span:not(.av):not(.dot) { color: var(--text-2); font-size: 13px; }
.chip .av { width: 36px; height: 36px; font-size: 12px; }
.chip .dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); }
.chip .dot .ic { width: 20px; height: 20px; }
.chip .dot.ok { background: var(--brand-fill); color: #fff; }
.chip.c1 { left: calc(50% - 600px); top: 190px; animation: bob 6s ease-in-out infinite; }
.chip.c2 { left: calc(50% + 330px); top: 90px; animation: bob 7s ease-in-out -2s infinite; }
.chip.c3 { left: calc(50% + 300px); top: 470px; animation: bob 6.5s ease-in-out -4s infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
/* Each phone has a light and a dark screen; the page's theme (the device's, or the button's) picks one. */
.only-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block !important; }
  :root:not([data-theme="light"]) .only-light { display: none !important; }
}
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }

.strip { border-top: 1px solid var(--border); background: var(--surface); position: relative; z-index: 3; }
.strip-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; padding-block: 28px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.strip-in span { display: flex; align-items: center; gap: 8px; }
.strip-in .ic { color: var(--brand); }

/* Features */
.feature {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 64px; align-items: center;
  padding-block: 120px 40px;
}
.feature.flip > :first-child { order: 2; }
.kicker { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); }
h2 { margin: 16px 0 0; font-weight: 600; font-size: clamp(36px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
.body { margin: 22px 0 0; max-width: 460px; font-size: 18px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); }
.card.pad { padding: 32px; }
/* A row of toggle buttons inside a card (demos.js). */
/* On the narrowest phones the buttons wrap onto a second row. */
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 24px; background: var(--surface-2); }
.seg button {
  flex: 1 1 auto; min-height: 40px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--text-2); font: 600 14px Inter, sans-serif; transition: background-color 0.25s, color 0.25s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--brand-fill); color: #fff; }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num { font-weight: 700; font-size: clamp(44px, 5vw, 64px); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
/* The conversion stays on one line: its size follows the card's width. */
.fx { container-type: inline-size; }
.fx-what { margin-top: 24px; }
.conv { display: flex; align-items: center; gap: 0.3em; margin-top: 6px; font-size: clamp(16px, 9.5cqi, 56px); white-space: nowrap; }
.conv .num { font-size: 1em; }
.num.brand { color: var(--brand); }
.ic.arrow { width: 0.55em; height: 0.55em; color: var(--text-2); }
.swap { animation: swap 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes swap { from { opacity: 0; translate: 0 6px; } }
.rate { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--brand-tint); display: flex; align-items: center; gap: 14px; }
.pill {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border);
  border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2);
}

.split-demo { position: relative; width: min(100%, 420px); justify-self: center; }
.card.list { overflow: hidden; }
.card.list .seg { margin: 14px 14px 0; }
.list-head { padding: 16px 22px; display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--border); }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.av { flex: none; width: 38px; height: 38px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.who { flex: 1; min-width: 0; font-weight: 500; line-height: 1.3; }
.who small { display: block; font-size: 13px; font-weight: 400; color: var(--text-2); }
.row .av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.cent { padding: 3px 8px; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-size: 12px; font-weight: 700; animation: pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cent[hidden] { display: none; }
.list-foot {
  display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--brand-tint);
  font-weight: 600; color: var(--brand);
}
.list-foot span { flex: 1; } .list-foot b { font-variant-numeric: tabular-nums; }
.amt { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }

.settle { display: flex; flex-direction: column; gap: 12px; max-width: 460px; width: 100%; justify-self: center; }
.card.line { border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: none; transition: background-color 0.3s, border-color 0.3s; }
.line-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card.line.done { background: var(--brand-tint); border-color: transparent; }
.card.line.done [data-amt] { color: var(--brand); }
.line-top [data-amt] { white-space: nowrap; }
/* The London debt, set by dragging (demos.js). A big thumb, for fingers. */
.slide { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; }
/* The track fills up to the thumb (--fill, set by demos.js). */
.slide::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, color-mix(in srgb, var(--neg) 55%, transparent) var(--fill, 40%), var(--surface-2) 0); }
.slide::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, color-mix(in srgb, var(--neg) 55%, transparent) var(--fill, 40%), var(--surface-2) 0); }
.slide::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--neg); box-shadow: 0 2px 8px rgba(14, 26, 43, 0.25);
}
.slide::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 2px solid var(--neg); box-shadow: 0 2px 8px rgba(14, 26, 43, 0.25); }
.slide:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 8px; }
.pos { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.neg { font-weight: 700; color: var(--neg); font-variant-numeric: tabular-nums; }
.down { display: grid; place-items: center; height: 36px; color: var(--text-2); }
.result { background: var(--brand-fill); color: #fff; border-radius: 24px; padding: 28px; text-align: center; box-shadow: var(--shadow); }
.result .num { font-size: 56px; }
.result .small { opacity: 0.9; margin-top: 8px; }
.result { transition: background-color 0.4s, color 0.4s; }
.result.owe { background: #B42828; }
.result.even { background: var(--surface-2); color: var(--text); }
.settle-go {
  margin-top: 18px; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: #fff; color: #0E1A2B; font: 600 15px Inter, sans-serif;
}
.result.even .settle-go { background: var(--brand-fill); color: #fff; }
.settle-go:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.result.even .settle-go:focus-visible { outline-color: var(--brand); }

.more { padding-block: 120px 40px; }
.more h2 { text-align: center; margin-bottom: 40px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.card.tile { border-radius: 22px; padding: 24px; box-shadow: none; display: flex; flex-direction: column; gap: 10px; }
.tile b { font-size: 18px; }
.tile span { color: var(--text-2); font-size: 15px; }

/* Try it: a playable group (trip.js). */
.trip-sec { padding-block: 120px 40px; }
.trip-head { max-width: 640px; }
.trip { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.trip-in, .trip-out { display: flex; flex-direction: column; gap: 14px; padding: 26px; }
.trip-label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.trip-label span { text-transform: none; letter-spacing: 0; font-weight: 500; opacity: 0.8; margin-left: 6px; }
.who-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.who-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px; cursor: pointer;
  border: 1px dashed var(--border); background: transparent; color: var(--text-2); font: 500 14px Inter, sans-serif;
}
.who-chip .av { opacity: 0.45; }
.who-chip.on { border-style: solid; background: var(--surface-2); color: var(--text); }
.who-chip.on .av { opacity: 1; }
.who-chip:disabled { cursor: default; }
.av.sm { width: 28px; height: 28px; font-size: 10px; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.exps { display: flex; flex-direction: column; gap: 8px; }
.exp {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto 32px; gap: 8px; align-items: center;
  padding: 8px; border-radius: 16px; background: var(--surface-2); animation: pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.exp input, .exp select {
  height: 40px; border-radius: 10px; border: 1px solid transparent; background: var(--surface); color: var(--text);
  font: 500 14px Inter, sans-serif; padding: 0 10px; min-width: 0;
}
.exp input:focus-visible, .exp select:focus-visible, .who-chip:focus-visible, .add-exp:focus-visible, .remove:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px;
}
.exp-name { width: 100%; font-weight: 600 !important; }
.payer { display: flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 10px; padding-left: 6px; }
.payer select { border: 0; padding-left: 0; padding-right: 4px; cursor: pointer; flex: 1; min-width: 0; }
.money { display: flex; background: var(--surface); border-radius: 10px; }
.money input { width: 86px; text-align: right; font: 700 15px Geist, Inter, sans-serif; font-variant-numeric: tabular-nums; }
.money select { width: 70px; cursor: pointer; padding: 0 6px; }
.remove { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); font-size: 22px; cursor: pointer; }
.remove:hover { background: var(--surface); color: var(--neg); }
.add-exp {
  height: 44px; border-radius: 14px; border: 1px dashed var(--border); background: transparent; color: var(--brand);
  font: 600 15px Inter, sans-serif; cursor: pointer;
}
.add-exp:hover { background: var(--brand-tint); }
.debts { display: flex; flex-direction: column; gap: 10px; }
/* Fixed columns for the names, so every arrow is as long as the others. */
.debt {
  display: grid; grid-template-columns: 38px 64px minmax(0, 1fr) 64px 38px; align-items: center; gap: 10px;
  animation: pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.debt .nm { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.debt .nm:nth-child(4) { text-align: right; } /* each name next to its own avatar */
.debt .arrow { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.debt .arrow b { font: 700 17px Geist, Inter, sans-serif; color: var(--brand); white-space: nowrap; font-variant-numeric: tabular-nums; }
.debt .arrow i { display: block; width: 100%; height: 2px; background: var(--brand); position: relative; border-radius: 2px; opacity: 0.6; }
.debt .arrow i::after {
  content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--brand); border-right: 0;
}
.even { margin: 0; color: var(--text-2); }
.trip-sum { margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--border); color: var(--text-2); }
.trip-sum b { color: var(--text); }
.trip-rates { margin: auto 0 0; font-size: 13px; color: var(--text-2); }
.trip-sum + .trip-label { margin-top: 6px; }
.bals { display: flex; flex-direction: column; gap: 8px; }
.bal { display: grid; grid-template-columns: 28px 64px minmax(0, 1fr) 92px; align-items: center; gap: 10px; font-size: 14px; }
.bal .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal b { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bal b { transition: color 0.3s; }
.bal.owed b { color: var(--brand); } .bal.owes b { color: var(--neg); } .bal.even b { color: var(--text-2); }
/* A bar from the middle: right for what someone is owed, left for what they owe. */
.bal .bar { position: relative; height: 8px; border-radius: 4px; background: var(--surface-2); }
/* trip.js sets each bar's left edge and width, so it slides, also across the middle. */
.bal .bar i {
  position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--text-2);
  transition: left 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s;
}
.bal.owed .bar i { background: var(--brand); }
.bal.owes .bar i { background: var(--neg); }
.bal .bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--border); }

/* FAQ */
.faq { padding-block: 120px 40px; max-width: 860px; }
.faq h2 { text-align: center; margin-bottom: 36px; }
.qas { display: flex; flex-direction: column; gap: 10px; }
.qa { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.qa summary {
  list-style: none; cursor: pointer; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; font-weight: 600; font-size: 17px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 18px; }
.qa .chev { width: 24px; height: 24px; color: var(--text-2); transition: rotate 0.3s; }
.qa[open] .chev { rotate: 180deg; }
.qa p { margin: 0; padding: 0 22px 20px; color: var(--text-2); }

/* Trust strip */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 28px; padding-block: 100px 0; }
.trust > div { display: flex; flex-direction: column; gap: 6px; }
.trust b { font-size: 17px; margin-top: 6px; }
.trust span { color: var(--text-2); font-size: 15px; }

.end { padding-block: 100px 120px; }
.end-in {
  position: relative; overflow: hidden; border-radius: 36px; background: #0E1A2B; color: #EDF1F6; border: 1px solid var(--border);
  padding: clamp(48px, 7vw, 96px) 24px; text-align: center; display: flex; flex-direction: column; align-items: center;
}
.glow.small { width: 900px; top: -40%; background: radial-gradient(closest-side, rgba(76, 200, 142, 0.16), transparent 70%); }
.end-in > :not(.glow) { position: relative; }
.end-in h2 { margin-top: 28px; font-size: clamp(36px, 5vw, 64px); line-height: 1; }
.end-in p { margin: 18px 0 0; font-size: 18px; color: #A2ADBC; }
.end-in .btn { margin-top: 32px; background: #158755; }

.foot { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; padding-bottom: 48px; font-size: 14px; color: var(--text-2); }
/* The plain pages: privacy, terms, account deletion. */
.page { padding-block: 72px 120px; max-width: 760px; }
.page h1 { font-size: clamp(40px, 6vw, 64px); margin: 0 0 28px; }
.page p { font-size: 18px; color: var(--text-2); margin: 0 0 16px; }
.page p b { color: var(--text); }
.page h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 40px 0 14px; }
.page ul { margin: 0 0 16px; padding-left: 22px; }
.page li { font-size: 18px; line-height: 1.55; color: var(--text-2); margin-bottom: 10px; }
.page li b { color: var(--text); }

.foot .links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--text-2); }
.foot a:hover { color: var(--text); }

/* Motion: motion.js. The halves turn around their own centre. */
.mark .half { transform-box: fill-box; transform-origin: center; }
[data-parallax] { will-change: transform; }

@media (max-width: 760px) {
  .trip { grid-template-columns: 1fr; }
  .debt { grid-template-columns: 32px 56px minmax(0, 1fr) 56px 32px; gap: 8px; } .debt > .av { width: 32px; height: 32px; }
  .bal { grid-template-columns: 24px 56px minmax(0, 1fr) 84px; gap: 8px; } .bal .av.sm { width: 24px; height: 24px; }
  .exp { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 32px; }
  .exp-name { grid-column: 1 / 3; } .exp .remove { grid-row: 1; grid-column: 3; }
  .exp .payer { grid-column: 1; } .exp .money { grid-column: 2 / 4; }
  .money { min-width: 0; } .money input { width: 100%; } .money select { width: 62px; flex: none; }
  .exp { gap: 6px; padding: 6px; } .payer { gap: 4px; padding-left: 4px; } .payer .av.sm { width: 22px; height: 22px; }
  .payer select { font-size: 13px; padding-right: 0; } .exp-name { grid-column: 1 / 3; }
  .stage { --w: 210px; height: 520px; margin-top: 48px; }
  .shot.left { translate: calc(-50% - 105px) 56px; scale: 0.86; } .shot.right { translate: calc(-50% + 105px) 56px; scale: 0.86; }
  .phone { border-radius: 32px; padding: 7px; } .phone img { border-radius: 26px; } 
  .floor { top: 430px; width: 420px; }
  .orbits > .ring { top: 280px; } .ring.r1 { --r: 220px; } .ring.r2 { --r: 300px; } .ring.r3 { display: none; }
  .chip { font-size: 12px; padding: 8px 12px 8px 8px; } .chip .av, .chip .dot { width: 30px; height: 30px; }
  .chip.c1, .chip.c2 { display: none; } .chip.c3 { left: 50%; translate: -50% 0; top: 400px; white-space: nowrap; }
  .nav { display: none; }
  .theme { margin-left: auto; }
  .hero { padding-top: 40px; }
  .mark.big { width: 120px; height: 120px; }
  .feature { padding-block: 80px 20px; gap: 48px; }
  .feature.flip > :first-child { order: 0; }
}
/* Small phones: room for Try it's rows. */
@media (max-width: 480px) {
  .trip-in, .trip-out, .card.pad { padding: 20px 16px; }
  .exp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; }
  .money select { width: 58px; padding: 0 4px; }
  .debt { grid-template-columns: 28px 52px minmax(0, 1fr) 52px 28px; gap: 6px; } .debt > .av { width: 28px; height: 28px; }
  .debt .nm { font-size: 14px; } .debt .arrow b { font-size: 15px; }
  .seg button { padding: 0 6px; font-size: 13px; }
  .card.list .seg { margin: 10px 10px 0; }
  .row, .list-head, .list-foot { padding-inline: 16px; }
}
/* Most phones: each expense on three lines (name, who paid, amount), so nothing is cut off. */
@media (max-width: 420px) {
  .exp { grid-template-columns: minmax(0, 1fr) 32px; }
  .exp-name { grid-column: 1; } .exp .remove { grid-column: 2; }
  .exp .payer, .exp .money { grid-column: 1 / 3; }
  .money select { width: 72px; }
}
/* Very narrow: the smallest phones, or any phone with large text. Amounts go under the names, Try it gets every pixel. */
@media (max-width: 300px) {
  .wrap { padding-inline: 12px; }
  h2 { font-size: 30px; }
  .row { flex-wrap: wrap; row-gap: 4px; }
  .who { flex-basis: calc(100% - 52px); }
  .cent { margin-left: 52px; }
  .amt { margin-left: auto; }
  .list-head { flex-direction: column; gap: 2px; }
  .trip-in, .trip-out, .card.pad { padding: 16px 10px; }
  .debt { grid-template-columns: 24px minmax(0, 1fr) 24px; } .debt > .av { width: 24px; height: 24px; }
  .debt .nm { display: none; }
  .bal { grid-template-columns: 24px minmax(0, 1fr) auto; } .bal .bar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring, .coin i, .chip, .exp, .debt, .swap, .cent { animation: none; }
  .bal .bar i, .result, .card.line { transition: none; }
}

/* "Become a tester" (D102, tester.js) */
.tester-form {
  width: min(440px, calc(100vw - 32px)); padding: 28px 24px 24px; border: 1px solid var(--border); border-radius: 28px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.tester-form::backdrop { background: rgba(11, 17, 26, 0.55); backdrop-filter: blur(3px); }
.tester-form[open] { animation: tester-in 220ms cubic-bezier(.2, .8, .2, 1); }
@keyframes tester-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .tester-form[open] { animation: none; } }
.tester-form h2 { margin: 0 40px 8px 0; font-size: 26px; letter-spacing: -0.02em; }
.tester-form p { margin: 0 0 18px; line-height: 1.5; }
.tester-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 15px; }
.tester-form input {
  display: block; width: 100%; box-sizing: border-box; margin-top: 6px; height: 50px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); color: var(--text);
  font: 400 16px Inter, system-ui, sans-serif;
}
.tester-form input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.tester-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tester-form .btn { width: 100%; justify-content: center; border: 0; cursor: pointer; font-family: inherit; margin-bottom: 14px; }
.tester-form .btn:disabled { opacity: .7; cursor: default; }
.tester-form .error { color: var(--neg); font-weight: 500; }
.tester-form .close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 999px; border: 0;
  background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.tester-form .btn.ghost { border: 1px solid var(--border); margin: 8px 0 0; }

/* "Coming soon" to both stores (D71): not the stores' official badges, which are for apps already listed */
.stores { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.store {
  height: 54px; padding: 0 20px 0 16px; border-radius: 14px; display: inline-flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--bg); text-align: left;
}
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store > span { display: flex; flex-direction: column; font: 600 17px/1.1 Geist, Inter, system-ui, sans-serif; letter-spacing: -0.01em; }
.store small { font: 500 11px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0; opacity: .75; }
.end-in .stores { margin-top: 28px; }
.end-in .store { background: #EDF1F6; color: #0B111A; }
.tester-form .phones { border: 0; padding: 0; margin: 0 0 16px; display: flex; gap: 8px; }
.tester-form .phones legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; padding: 0; }
.tester-form .phones label {
  flex: 1; margin: 0; height: 46px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 600;
}
.tester-form .phones input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tester-form .phones label:has(:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }
.tester-form .phones label:has(:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }
.tester-form [data-why] { margin: -8px 0 14px; }
