/*
 * Lobb. One stylesheet for every page, written by hand from brand/BRAND.md and the board sources
 * in brand/source/project. Sizes, colours and spacing are the boards' own numbers.
 *
 * Contents: fonts, tokens, base, logo, small type, buttons, the stage (a page and its ground),
 * the pay screen, the receipt, message pages, the setup page, sign-in and the account home, the wide
 * card (every product page from 1024 px), the landing, motion.
 */

/* ---------------------------------------------------------------------------------------- fonts */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/geist-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/geist-mono-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------------------- tokens */

:root {
  --ink: #1d1d1b;
  --paper: #f3efe6;
  --paper2: #e5e1d6;
  --blue: #2b5cff;
  --yellow: #ffc61a;
  --lilac: #c8a2ff;
  --orange: #ff5a1f;
  --muted: #a8a69c;

  /* Working greys, from the boards. */
  --card-on-ink: #282826;
  --line-on-ink: #2c2c2a;
  /*
   * Secondary text on paper. The boards draw it #77756d, which measures 4.02:1 on paper; this is the
   * nearest grey that reads at 4.5:1 or better on paper (5.17:1) and on paper2 (4.54:1). It is for
   * light grounds only: on ink it would measure 2.85:1, so text on ink uses --muted.
   */
  --quiet: #66645c;
  /* The boards' own grey, for a picture of the product on ink (the chat on the landing page). */
  --quiet-on-ink: #77756d;
  --line-on-paper: #d9d4c7;
  --text-on-ink: #e3dfd6;
  --ring: #6e6c64;
  /* A field in use, one step up from the card it is on (the send form, its picker of places), and the hairline of a menu on it. */
  --field-lift-on-ink: #363633;
  --menu-line-on-ink: #46463f;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  /* The boards' margin. */
  --edge: 56px;
}

/* ----------------------------------------------------------------------------------------- base */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  font-synthesis: none;
}

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

ol,
ul {
  list-style: none;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ----------------------------------------------------------------------------------------- logo */

/* The wordmark, a drawing (src/ui/mark.ts), in one flat colour: that of the text it stands in, so
   paper on ink and ink on paper and on yellow. Never in a box of its own, never tilted. The drawing
   is --mark tall, never under 14 px. The room it takes in its line is the room the logo before it
   took, 1.44 of the font size of its place, so that nothing round it has moved; the drawing stands
   in the middle of that room, or, in a bar, from its top, where that puts its edges on whole pixels. */
.lobb-mark {
  --mark: 24px;
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 1.44em;
  color: inherit;
  text-decoration: none;
}

.lobb-mark svg {
  display: block;
  flex: none;
  width: calc(var(--mark) * 1540 / 600);
  height: var(--mark);
}

/* ----------------------------------------------------------------------------------- small type */

.headline {
  font-weight: 400;
  font-size: 56px;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.copy {
  max-width: 330px;
  font-size: 15px;
  line-height: 1.38;
  letter-spacing: -0.01em;
  /* No single word left alone on the last line, where the browser can avoid it. */
  text-wrap: pretty;
}

.mono-label {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* The label stack: ink boxes, the last one highlighted. */
.label-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.label-stack li {
  display: flex;
  align-items: center;
  max-width: 100%;
  height: 34px;
  padding: 0 11px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.label-stack li:last-child {
  background: var(--yellow);
  color: var(--ink);
}

.on-yellow .label-stack li:last-child {
  background: var(--paper);
}

/* A small arrow for links that leave the page, drawn so it does not depend on a font. */
.out-arrow {
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.5em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* -------------------------------------------------------------------------------------- buttons */

/* The primary button: yellow with ink text. One per screen. */
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease;
}

.button:hover {
  background: #ffcf3d;
}

.button:active {
  background: #f2b90d;
}

.button:disabled,
.button[aria-disabled='true'] {
  background: var(--yellow);
  opacity: 0.55;
  cursor: default;
}

.button--quiet {
  background: var(--ink);
  color: var(--paper);
}

.button--quiet:hover,
.button--quiet:active {
  background: #000;
}

.button--small {
  width: auto;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 15px;
}

/* ---------------------------------------------------------------------------------------- stage */

/*
 * A product page is one surface. On a phone it is the whole screen. From 1024 px it is one wide card
 * in the middle of a yellow page: see "the wide card" further down, which holds every rule of that
 * layout. What is here is what a phone needs.
 */
.stage {
  min-height: 100vh;
  min-height: 100dvh;
}

/*
 * The ground behind a card: lanes drawn tone on tone, and lane clusters in the screen's corners. It
 * is a layer of its own, fixed to the screen, so it stays put while a long page scrolls. A phone
 * shows it only behind the receipt.
 */
.ground {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  pointer-events: none;
}

.page-pay .ground {
  display: none;
}

/*
 * A card's own words (its eyebrow, title and note) are the card's left column from 1024 px, with
 * the corner label and the label stack at the foot. On a phone the words are simply the top of the
 * screen, as if nothing wrapped them, and the foot is not shown.
 */
.card-copy {
  display: contents;
}

.card-foot {
  display: none;
}

/* ----------------------------------------------------------------------------------- pay screen */

.page-pay {
  background: var(--ink);
}

/* The ink screen. Full bleed on a phone; the wide card from 1024 px. */
.phone {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 26px 22px 24px;
  background: var(--ink);
  color: var(--paper);
  color-scheme: dark;
}

.phone-inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.phone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.phone-bar .lobb-mark {
  align-items: flex-start;
  font-size: 16px;
}

.phone-bar .phone-host {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pay-head {
  font-size: inherit;
  font-weight: inherit;
}

.pay-head > span {
  display: block;
}

.pay-eyebrow {
  margin-top: 52px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.pay-who {
  margin-top: 8px;
  font-size: 30px;
  letter-spacing: -0.03em;
  text-align: center;
  overflow-wrap: anywhere;
}

.pay-who--long {
  font-size: 24px;
  line-height: 39px;
}

.pay-who--longer {
  font-size: 20px;
  line-height: 1.25;
}

/*
 * The amount. Longer ones step down so they still fit the 316 px column of the board; on a narrow
 * phone each step also gives way to the width of the screen (the column is the screen less 44 px).
 */
.pay-amount {
  margin-top: 18px;
  font-weight: 300;
  font-size: min(76px, calc((100vw - 44px) / 3.6));
  line-height: 76px;
  letter-spacing: -0.05em;
  text-align: center;
  white-space: nowrap;
}

.pay-amount--9 {
  font-size: min(64px, calc((100vw - 44px) / 4.45));
}

.pay-amount--11 {
  font-size: min(52px, calc((100vw - 44px) / 5.5));
}

.pay-amount--many {
  font-size: min(40px, calc((100vw - 44px) / 7.2));
}

.pay-note {
  display: -webkit-box;
  margin-top: 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/*
 * Who is being paid (the owner's pick of 24 Nov 2026). Someone on Lobb: the @ of their handle in
 * yellow, as the profile draws it. Someone on a platform who is not on Lobb: the platform's mark
 * beside their name, in the quiet grey, about the height of its capitals; in the row that names
 * who a payment waits for, the same mark at the row's own size.
 */
.pay-at {
  color: var(--yellow);
}

.pay-from-mark {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.24em;
  vertical-align: 0;
  fill: var(--muted);
}

.wallet-name .pay-from-mark {
  width: 0.86em;
  height: 0.86em;
  margin-left: 0.4em;
  vertical-align: -0.1em;
}

/* A note only the wide card has room for: a phone goes straight on to what there is to do. */
.pay-note--wide {
  display: none;
}

.pay-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 36px;
}

/* The wallet list: rows 54 px on a card, a coloured dot, the name, a radio. The 1 px gaps show the ink. */
.wallets {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--ink);
}

.wallet {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 16px;
  background: var(--card-on-ink);
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wallet input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.wallet-dot {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--muted);
}

.wallet-dot--lilac {
  background: var(--lilac);
}

.wallet-dot--orange {
  background: var(--orange);
}

.wallet-dot--blue {
  background: var(--blue);
}

.wallet-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-net,
.wallet-tag {
  flex: none;
  /* On the card the working grey measures 3.2:1; muted measures 6.05:1. */
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wallet-radio {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ring);
  border-radius: 50%;
}

.wallet input:checked ~ .wallet-radio {
  border: 5px solid var(--paper);
}

.wallet:has(input:focus-visible) {
  outline: 2px solid var(--paper);
  outline-offset: -2px;
}

@media (hover: hover) {
  .wallet:not(.wallet--still):hover {
    background: var(--line-on-ink);
  }
}

.wallet--still {
  cursor: default;
}

/* A wallet's own icon, where the board draws a coloured dot. It arrives from the wallet as a data: image. */
.wallet-icon {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
}

/* While the page looks for wallets the one row is quiet, and the list keeps its place. */
.wallets[data-state='looking'] .wallet-name {
  color: var(--muted);
}

/* No wallet in this browser: the ways to open this page in one take the list's place. */
.pay-open > .pay-line:first-child {
  margin-top: 0;
}

/* A quiet action under a line of text: mono, no box. The padding is room to tap. */
.pay-pass {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quiet-action {
  margin-top: 6px;
  padding: 14px 16px;
  border: 0;
  background: none;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.quiet-action:focus-visible {
  outline-color: var(--paper);
  outline-offset: -4px;
}

@media (hover: hover) {
  .quiet-action:hover {
    color: var(--yellow);
  }
}

.pay-pass .pay-line {
  margin-top: 0;
}

.pay-pass .pay-line:empty {
  display: none;
}

.copy-link {
  margin-top: 10px;
  color: var(--text-on-ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-align: center;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.pay-form .button,
.pay-body > .button {
  margin-top: 18px;
}

.phone .button:focus-visible {
  outline-color: var(--paper);
}

/*
 * While the wallet has the payment the button is not the thing to tap: it turns into a quiet card
 * that says what to do, marked with the same yellow dash as the step that is happening now.
 */
.phone .button:disabled {
  background: var(--card-on-ink);
  color: var(--paper);
  opacity: 1;
}

.phone .button:disabled::before {
  flex: none;
  width: 18px;
  height: 7px;
  margin-right: 10px;
  border-radius: 3.5px;
  background: var(--yellow);
  content: '';
}

.wallet:has(input:disabled) {
  cursor: default;
}

/*
 * Relay's terms, directly under the button that pays through Relay: the press is the payer's assent,
 * so the line stands where the press is. The same line in the small print is for the screens without
 * that button (sending from another wallet, a conversion or a hold under way), so it steps aside while
 * the button is shown.
 */
.pay-terms {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}

.pay-terms + .pay-line {
  margin-top: 10px;
}

.pay-form:not([hidden]) ~ .pay-fine [data-fine="convert"],
.hold-now:has(> .pay-form:not([hidden])) ~ .pay-fine [data-provider="relay"] {
  display: none;
}

/*
 * Sent now through Relay, the wallet sends another coin on another network, so what a way to send
 * says in the small print of sending USDC ("Sent as USDC on Base") is not what it does: it stands
 * aside while Relay's line is shown (the owner's cut, 26 Nov 2026).
 */
.pay-fine:has(> [data-provider="relay"]:not([hidden])) > [data-fine] {
  display: none;
}

/* The line under the button: one reassuring sentence, or what is happening right now. */
.pay-line {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-wrap: balance;
}

.pay-line--error {
  color: var(--paper);
}

.pay-line--error::before,
.notice-title::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--orange);
  content: '';
  vertical-align: 0.06em;
}

/* A quiet card for anything that is not a list: a notice, a waiting state, the steps. */
.notice {
  padding: 15px 16px 16px;
  border-radius: 16px;
  background: var(--card-on-ink);
}

.notice + .wallets,
.notice + .pay-form {
  margin-top: 12px;
}

.notice-title {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice-text {
  margin-top: 8px;
  color: var(--text-on-ink);
  font-size: 13.5px;
  line-height: 1.38;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}

.notice-text + .notice-text {
  margin-top: 6px;
  color: var(--muted);
}

/* Confirming: a lane with one yellow dash travelling along it, and the three steps under it. */
.progress {
  overflow: hidden;
  border-radius: 16px;
  background: var(--card-on-ink);
}

.progress-lane {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 39px;
  margin: 0 13px;
  overflow: hidden;
}

/*
 * Nine dashes, 33 px apart. The yellow one steps from the first to the last. On a screen too
 * narrow for nine the whole lane scales down rather than losing a dash.
 */
.progress-lane svg {
  flex: none;
  width: 100%;
  max-width: 290px;
  height: auto;
  overflow: visible;
}

.progress-lane .lane-track {
  stroke: #3a3a37;
}

.progress-lane .lane-dash {
  stroke: var(--yellow);
}

.steps {
  display: grid;
  gap: 1px;
  background: var(--ink);
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 16px;
  background: var(--card-on-ink);
  color: var(--muted);
  font-size: 15px;
}

.steps .step:first-child {
  box-shadow: 0 -1px 0 var(--ink);
}

.step-mark {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ring);
  border-radius: 50%;
}

.step-name {
  flex: 1;
}

.step-state {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.step--done,
.step--now {
  color: var(--paper);
}

.step--done .step-mark {
  border: 5px solid var(--paper);
}

.step--now .step-mark {
  width: 18px;
  height: 7px;
  border: 0;
  border-radius: 3.5px;
  background: var(--yellow);
}

.step--now .step-state {
  color: var(--paper);
}

/* The small print at the foot of the screen. It says what paying costs, so it stays readable. */
.pay-fine {
  margin-top: auto;
  padding-top: 32px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}

.pay-fine p + p {
  margin-top: 6px;
}

/*
 * No wallet in this browser: rows that open this same page in a wallet's own browser. Each row is a
 * link, so the arrow stands where the radio does on a wallet row. From 1024 px there is also a QR
 * code of the page, to carry on from a phone.
 */
.wallet--open {
  color: var(--paper);
  text-decoration: none;
}

.wallet--open:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -2px;
}

/* 9 px of arrow centred in the 18 px a radio takes. */
.wallet--open .out-arrow {
  flex: none;
  width: 9px;
  height: 9px;
  margin: 0 4.5px;
  color: var(--muted);
}

.wallet-dot--yellow {
  background: var(--yellow);
}

.wallet-dot--paper {
  background: var(--paper);
}

.carry {
  display: none;
}

@media (min-width: 1024px) {
  .carry {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding: 12px;
    border-radius: 16px;
    background: var(--card-on-ink);
  }

  /* The code is a dark tile of its own (src/ui/qr.ts), at its own size. */
  .carry-code {
    flex: none;
  }

  .qr {
    display: block;
  }

  .carry-text {
    min-width: 0;
  }

  .carry-label {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .carry-line {
    margin-top: 8px;
    color: var(--text-on-ink);
    font-size: 13.5px;
    line-height: 1.38;
    letter-spacing: -0.005em;
  }
}

/* -------------------------------------------------------------------------------------- receipt */

.page-receipt {
  background: var(--yellow);
}

/* The ground: lanes drawn tone on tone, and the big cluster in the bottom right corner. */
.page-receipt .ground {
  background-image: url(../art/receipt-corner.svg), url(../art/receipt-ground-small.svg);
  background-position:
    right bottom,
    left bottom;
}

.page-receipt .stage {
  position: relative;
  z-index: 1;
  padding: 28px 16px 120px;
}

/*
 * Opened from the profile home's "Recent": the way back, above the slip on the yellow, as the
 * design's receipt has it. An ink label, square, mono capitals, with a drawn arrow.
 */
.slip-back {
  max-width: 400px;
  margin: 0 auto 16px;
}

.slip-back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

@media (hover: hover) {
  .slip-back a:hover {
    background: #33332f;
  }
}

.slip-back a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.back-arrow {
  flex: none;
  width: 10px;
  height: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The rows, the strip and the footer are the slip's right column from 1024 px. A phone runs them on. */
.slip-body {
  display: contents;
}

/* The paper slip. Its bottom edge is cut into scallops: a whole number of 6.8 px bites, 20 px apart. */
.slip {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 26px 30px 34px;
  background: var(--paper);
  color: var(--ink);
  -webkit-mask-image: radial-gradient(circle at 50% 100%, transparent 6.55px, #000 7.05px);
  mask-image: radial-gradient(circle at 50% 100%, transparent 6.55px, #000 7.05px);
  -webkit-mask-size: 20px 100%;
  mask-size: 20px 100%;
  -webkit-mask-repeat: round no-repeat;
  mask-repeat: round no-repeat;
}

.slip a {
  text-decoration: none;
}

/* The whole height of the row opens the transaction, not just the line of text. */
.slip-row a {
  display: inline-block;
  margin: -8px 0;
  padding: 8px 0;
}

/* Blue on paper measures 4.49:1, a hair under what text needs, so a link is underlined on hover instead. */
.slip a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.slip-head .lobb-mark {
  align-items: flex-start;
  font-size: 15px;
}

.slip-date {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
}

.slip-rule {
  margin-top: 22px;
  border-top: 1.5px dotted var(--ink);
}

.slip-paid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slip-took {
  color: var(--quiet);
}

/* As on the pay screen: steps for longer amounts, and on a narrow phone the slip's own width. */
.slip-amount {
  margin-top: 8px;
  font-weight: 300;
  font-size: min(84px, calc((100vw - 80px) / 3.55));
  line-height: 84px;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.slip-amount--9 {
  font-size: min(66px, calc((100vw - 80px) / 4.4));
}

.slip-amount--11 {
  font-size: min(54px, calc((100vw - 80px) / 5.45));
}

.slip-amount--many {
  font-size: min(42px, calc((100vw - 80px) / 7));
}

.slip-rows {
  margin-top: 20px;
  border-top: 1px solid var(--line-on-paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.slip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 34px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-on-paper);
}

.slip-row dt {
  flex: none;
  color: var(--quiet);
  text-transform: uppercase;
}

.slip-row dd {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

/* A strip of the pattern, like a barcode: three rows of dashes with one blue dash. */
.slip-strip {
  height: 29px;
  margin-top: 34px;
  padding: 0 3.5px;
  overflow: hidden;
}

.slip-strip svg {
  display: block;
  width: 100%;
  height: 29px;
  overflow: visible;
}

.slip-strip line {
  stroke: var(--ink);
  stroke-width: 7;
  stroke-linecap: round;
}

.slip-strip .strip-dash {
  stroke: var(--blue);
}

.slip-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 26px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* When the two do not fit on one line, the host keeps to the right. */
.slip-foot span:last-child {
  margin-left: auto;
}

@media (max-width: 400px) {
  .slip {
    padding-right: 24px;
    padding-left: 24px;
  }
}

/* ----------------------------------------------------------------------------- personal pay page */

/*
 * HOST/HANDLE: the pay screen before there is an amount. The payer types one, says what it is for
 * and goes on to the pay screen. The two fields are rows of the card the wallets sit in.
 */
.ask-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--card-on-ink);
}

.ask-row:focus-within {
  outline: 2px solid var(--paper);
  outline-offset: -2px;
}

.ask-row input {
  flex: 1;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  caret-color: var(--yellow);
  -webkit-appearance: none;
  appearance: none;
}

.ask-row input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Each row carries the card's corners on its own side, so the ring round a field follows them. */
.ask-row--amount {
  gap: 3px;
  height: 96px;
  border-radius: 16px 16px 0 0;
}

/* The amount in the amount's own type. On a narrow phone it gives way to the width of the screen. */
.ask-dollar,
.ask-amount {
  font-weight: 300;
  font-size: min(56px, calc((100vw - 76px) / 5.2));
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.ask-dollar {
  flex: none;
}

.ask-row--note {
  height: 54px;
  border-radius: 0 0 16px 16px;
  cursor: text;
}

.ask-label {
  flex: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ask-note {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.ask .button {
  margin-top: 18px;
}

/* On ink the quiet grey is too faint to read. */
.page-handle .wallet-tag {
  color: var(--muted);
}

/* -------------------------------------------------------------------------------- message pages */

/* Not found, errors, the home page: the closing board. The logo centred, one headline, the arch below. */
.page-message {
  background: var(--paper);
}

.message {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16vh 24px 220px;
  text-align: center;
}

.message .lobb-mark {
  --mark: 30px;
  font-size: 24px;
}

.message-title {
  max-width: 800px;
  margin-top: 28px;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.message-text {
  max-width: 330px;
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.38;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.message .button {
  width: auto;
  min-width: 220px;
  margin-top: 28px;
}

/* The padding is room to tap; the margins take it back so the text sits where it did. */
.message-link {
  margin-top: 14px;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.message .button + .message-link {
  margin-top: 6px;
}

.message-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.arch {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: 160px;
  overflow: hidden;
  pointer-events: none;
}

/* The arch itself: 1100 px wide whatever the screen, centred, every dash an element of its own. */
.arch-art {
  position: absolute;
  bottom: 0;
  left: 50%;
  display: block;
  width: 1100px;
  height: 160px;
  margin-left: -550px;
}

@media (min-width: 1024px) {
  .message {
    padding-top: 23vh;
  }

  .message .lobb-mark {
    --mark: 36px;
    font-size: 32px;
  }

  .message-title {
    margin-top: 32px;
    font-size: 68px;
    letter-spacing: -0.04em;
  }

  .message-text {
    margin-top: 28px;
  }
}

/* ----------------------------------------------------------------------------------- setup page */

/*
 * The setup page and the request page are the pay screen's own surface (.phone): ink on a phone,
 * the wide ink card on the yellow page from 1024 px. These rules add what the pay screen does not have:
 * the steps of the setup flow, fields on ink, the quiet second button, the label box.
 */
.setup .pay-body {
  margin-top: 28px;
}

.setup-note {
  -webkit-line-clamp: 3;
  line-clamp: 3;
  text-wrap: balance;
}

.setup-claim {
  margin-bottom: 12px;
}

.setup-claim strong {
  color: var(--paper);
  font-weight: 500;
}

/* The steps: one card each. The open one holds the one yellow button; the others are quiet rows. */
.setup-steps {
  display: grid;
  gap: 8px;
}

.setup-step {
  overflow: hidden;
  border-radius: 16px;
  background: var(--card-on-ink);
}

.setup-step > summary,
.setup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 16px;
  font-size: 15px;
  list-style: none;
}

.setup-step > summary {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.setup-step > summary::-webkit-details-marker {
  display: none;
}

.setup-step > summary:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -2px;
  border-radius: 16px;
}

@media (hover: hover) {
  .setup-step:not([open]) > summary:hover {
    background: var(--line-on-ink);
  }
}

/* The mark: a thin ring for what comes next, a filled ring for what is done, the yellow dash for now. */
.setup-mark {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ring);
  border-radius: 50%;
}

.setup-step--done .setup-mark {
  border: 5px solid var(--paper);
}

.setup-step--now .setup-mark {
  height: 7px;
  border: 0;
  border-radius: 3.5px;
  background: var(--yellow);
}

.setup-number,
.setup-tag,
.setup-label,
.field-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.setup-number {
  flex: none;
}

.setup-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-step--next .setup-name {
  color: var(--muted);
}

.setup-tag {
  flex: none;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A small drawn caret: down when the step is shut, up when it is open. */
.setup-caret {
  flex: none;
  width: 7px;
  height: 7px;
  margin: -4px 2px 0 0;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}

.setup-step[open] .setup-caret {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.setup-body {
  padding: 2px 16px 18px;
  border-top: 1px solid var(--ink);
}

/*
 * A row opens and shuts with a movement: it grows to its own height and back, and its caret
 * turns. The browser does it by itself where it can measure "as tall as what is inside"; in one
 * that cannot, a row opens and shuts at once, as it always did. Nothing moves for someone who
 * asked for less motion.
 */
@media (prefers-reduced-motion: no-preference) {
  .setup-caret {
    transition:
      transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
      margin-top 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  @supports (interpolate-size: allow-keywords) and selector(::details-content) {
    .setup-step {
      interpolate-size: allow-keywords;
    }

    .setup-step::details-content {
      block-size: 0;
      overflow: clip;
      transition:
        block-size 280ms cubic-bezier(0.2, 0.7, 0.2, 1),
        content-visibility 280ms allow-discrete;
    }

    .setup-step[open]::details-content {
      block-size: auto;
    }
  }
}

.setup-text {
  margin-top: 14px;
  color: var(--text-on-ink);
  font-size: 13.5px;
  line-height: 1.38;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}

.setup-text strong {
  color: var(--paper);
  font-weight: 500;
}

.setup-quiet {
  color: var(--muted);
}

.setup-text--alert::before,
.setup-line.doc-msg--error::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--orange);
  content: '';
  vertical-align: 0.06em;
}

.setup-label {
  margin-top: 20px;
}

/* A label box, as on the boards: paper with ink mono text, square corners. */
.setup-box {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-top: 8px;
  padding: 8px 11px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.setup-box a {
  min-width: 0;
  text-underline-offset: 3px;
}

.setup-box a:focus-visible {
  outline-color: var(--ink);
}

/* A field on ink. 16 px type keeps iOS from zooming the page when it is tapped. */
.field {
  display: block;
  margin-top: 16px;
}

.field-label {
  display: block;
}

.field-box {
  display: flex;
  align-items: center;
  height: 48px;
  margin-top: 7px;
  padding: 0 14px;
  border: 1px solid var(--ring);
  border-radius: 12px;
  background: var(--ink);
}

.field-box:focus-within {
  border-color: var(--paper);
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.field-prefix {
  flex: none;
  margin-right: 6px;
  color: var(--muted);
  font-size: 16px;
}

.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.field input::placeholder {
  color: #8a887f;
  opacity: 1;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.checks legend {
  margin-bottom: 7px;
  padding: 0;
}

/*
 * A choice among a few, as pills: the one that is on is filled, the one that is off is an outline.
 * The box itself is still there, for the keyboard, for a screen reader and for the form; it is
 * laid over the whole pill and not drawn.
 */
.check {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--ring);
  border-radius: 20px;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: inherit;
  opacity: 0;
  cursor: pointer;
  appearance: none;
}

.check:has(input:checked) {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

@media (hover: hover) {
  .check:not(:has(input:checked)):hover {
    border-color: var(--paper);
    color: var(--paper);
  }
}

.check:has(input:focus-visible) {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .check {
    transition: none;
  }
}

.setup .button {
  margin-top: 18px;
}

/* The second action of a step: the same shape as the button, drawn as an outline. */
.button--ghost {
  height: 48px;
  border: 1px solid var(--ring);
  background: transparent;
  color: var(--paper);
  font-size: 15px;
}

.button--ghost:hover,
.button--ghost:active {
  background: var(--line-on-ink);
}

.setup .button + .button--ghost {
  margin-top: 8px;
}

.setup-wallets {
  margin-top: 16px;
  padding: 0;
  background: var(--card-on-ink);
  border: 1px solid var(--ink);
}

.setup-wallets .wallet {
  background: var(--ink);
  cursor: default;
}

.setup-wallets .wallet-tag {
  color: var(--muted);
}

.setup-wallet-step {
  display: grid;
  margin-top: 2px;
}

/* A step's status line takes no room until it has something to say. */
.setup-line:empty {
  margin-top: 0;
}

.setup-line.doc-msg--error {
  color: var(--paper);
}

.setup-made {
  margin-top: 6px;
}

.setup-dev {
  margin-top: 22px;
  padding-top: 2px;
  border-top: 1px solid var(--ink);
}

/* ------------------------------------------------------------ sign-in, and the account home */

/*
 * The sign-in page and the account home are built from the set-up page's own parts: rows that open
 * one at a time, fields on ink, the outline button. These rules add what only they have.
 */

/* A card with no row to open it: the sign-in page's one card. */
.setup-body--only {
  padding-top: 0;
  border-top: 0;
}

/* The passkey button with its status line, and the wallet chooser under it. */
.ways-passkey,
.setup-wallet-step {
  display: grid;
}

/* The wallets this browser has, listed inside a card: the rows are a shade darker than the card. */
.setup-wallet-step .wallets {
  margin-top: 14px;
  border: 1px solid var(--ink);
  background: var(--card-on-ink);
}

.setup-wallet-step .wallet {
  background: var(--ink);
}

.setup-label + .setup-wallet-step .wallets,
.setup-wallet-step .setup-label + .wallets {
  margin-top: 10px;
}

/* A quiet line with a link in it. */
.setup-aside {
  text-align: center;
}

.setup-link {
  color: var(--paper);
  text-underline-offset: 3px;
}

.setup-link:focus-visible,
.row-action:focus-visible,
.activity-row:focus-visible {
  outline: 2px solid var(--paper);
}

/*
 * Something linked to the profile (a wallet, a platform account, a passkey): a row of two lines.
 * The name with a short word on where it stands, then a line of detail with the row's own action.
 * Two lines because one has no room on the 360 px card, and an address must never be cut short.
 */
.linked {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 5px;
  align-items: baseline;
  height: auto;
  padding: 11px 16px 13px;
}

.linked > .wallet-dot {
  grid-row: 1 / span 2;
  align-self: center;
}

.linked-name,
.linked-detail {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Small data, as the boards set it: mono, exactly as written (an address keeps its capitals). */
.linked-detail {
  grid-row: 2;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.linked > .wallet-tag,
.linked > .row-action {
  grid-column: 3;
  justify-self: end;
}

.linked > .row-action {
  grid-row: 2;
}

/* A row's own quiet action: Remove, Unlink. The padding is room to tap, and takes no room in the row. */
.row-action {
  margin: -9px -10px -13px 0;
  padding: 9px 10px 13px;
  border: 0;
  background: none;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.row-action:focus-visible {
  outline-offset: -4px;
}

.row-action:disabled {
  color: var(--muted);
  cursor: default;
}

@media (hover: hover) {
  .row-action:not(:disabled):hover {
    color: var(--yellow);
  }
}

/* The pay page's QR code: a dark tile of its own (src/ui/qr.ts), centred. */
.pay-code {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.pay-code .qr {
  display: block;
}

.pay-code + .setup-box {
  justify-content: center;
  margin-top: 14px;
  text-align: center;
}

/* What was asked and is not paid: who and how much, then what for and where it stands. Each row leads to the request. */
.activity {
  margin-top: 10px;
}

.activity-row {
  display: grid;
  gap: 5px;
  padding: 12px 16px 13px;
  background: var(--card-on-ink);
  color: var(--paper);
  text-decoration: none;
}

.activity-row:focus-visible {
  outline-offset: -2px;
}

@media (hover: hover) {
  .activity-row:hover {
    background: var(--line-on-ink);
  }
}

.activity-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.activity-title,
.activity-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-title,
.activity-amount {
  font-size: 15px;
}

.activity-amount {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.activity-line--sub {
  color: var(--muted);
  font-size: 12.5px;
}

.activity-tag {
  flex: none;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.account-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
}

.account-foot .quiet-action {
  margin-top: 0;
}

/* The request: who is asking comes first, then the mono line, then how much. */
.request-head .pay-who {
  margin-top: 52px;
}

.request-head .pay-eyebrow {
  margin-top: 12px;
}

.request-head .pay-amount {
  margin-top: 14px;
}

/* ----------------------------------------------------------------------- paying with another coin */

/*
 * Where a payment can be paid with another coin, the pay screen gains two quiet lines and two views
 * that take the form's place when asked for: a list (the other ways this wallet can pay, or the
 * coins to send from any other wallet) and the quote for someone who sends it themselves. They are
 * made of what the screen already has: the wallet rows, the mono labels, the quiet action.
 */

/* The quiet lines under the button and under the list: centred, one under the other, and quieter than an action that stands alone. */
.pay-other {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

.pay-other,
.pay-more .quiet-action,
.coin-view > .quiet-action {
  color: var(--muted);
}

@media (hover: hover) {
  .pay-other:hover,
  .pay-more .quiet-action:hover,
  .coin-view > .quiet-action:hover {
    color: var(--paper);
  }
}

/* Two of them, one under the other: the second stands close under the first. */
.pay-form:has(.pay-other:not([hidden])) ~ .pay-more .quiet-action {
  margin-top: -12px;
}

.coin-view > .quiet-action {
  align-self: center;
}

.pay-more {
  display: flex;
  justify-content: center;
}

.coin-view {
  display: flex;
  flex-direction: column;
}

.coin-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.coin-pick .wallets {
  margin-top: 14px;
}

.coin-pick .wallets:empty {
  display: none;
}

/* A row that is a button: a coin and its chain, and what the wallet holds of it. */
.wallet--coin {
  width: 100%;
  border: 0;
  color: var(--paper);
  font: inherit;
  text-align: left;
}

.wallet--coin:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -2px;
}

/* The name is never cut short: on a narrow screen it is the tag that gives way. */
.wallet--coin .wallet-name {
  flex: 1 0 auto;
}

.wallet--coin .wallet-tag {
  flex: 0 1 auto;
  min-width: 18px;
  overflow: hidden;
  color: var(--text-on-ink);
  text-align: right;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.wallet--coin .wallet-tag:empty {
  display: none;
}

/* A coin the wallet does not hold enough of: there, and not to be picked. */
.wallet--coin:disabled {
  color: var(--muted);
  cursor: default;
}

/*
 * The way that is picked now carries the yellow dash of the step that is happening now. Every row
 * of such a list keeps the dash's place, so the names stand in one line.
 */
.wallets:has([aria-current='true']) .wallet--coin::before {
  flex: none;
  width: 18px;
  height: 7px;
  border-radius: 3.5px;
  content: '';
}

.wallet--coin[aria-current='true']::before {
  background: var(--yellow);
}

.wallet--coin:disabled .wallet-tag {
  color: var(--muted);
}

@media (hover: hover) {
  .wallet--coin:disabled:hover {
    background: var(--card-on-ink);
  }
}

/* The amount to send: large and light, with the coin beside it. Long ones give way to the column. */
.coin-amount {
  margin-top: 10px;
  font-weight: 300;
  font-size: min(44px, calc((100vw - 44px) / 7.4));
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-align: center;
  overflow-wrap: anywhere;
}

.coin-symbol {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

/* The chain, in the brand's highlighted label box: the one thing on this view that must not be missed. */
.coin-chain {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.coin-chain span {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 11px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.coin-label--to {
  margin-top: 26px;
}

.coin-address {
  margin-top: 10px;
  padding: 15px 16px;
  border-radius: 16px;
  background: var(--card-on-ink);
  color: var(--text-on-ink);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-align: center;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.coin-copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.coin-copy .quiet-action {
  margin-top: 0;
}

.coin-copy + .pay-line {
  margin-top: 0;
}

.coin-copy + .pay-line:empty {
  display: none;
}

/* The code, a dark tile of its own (src/ui/qr.ts) drawn by the server as a picture. */
.coin-code {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.coin-code img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

/* The caution is the line after the address: paper, so it is read. */
.coin-care {
  margin-top: 4px;
  color: var(--text-on-ink);
}

.coin-care + .pay-line {
  margin-top: 12px;
}

.coin-quote .coin-code {
  margin-top: 18px;
}

.coin-quote .pay-line:empty {
  display: none;
}

@media (min-width: 1024px) {
  /* The column is fixed here, so the amount no longer follows the screen's width. */
  .coin-amount {
    font-size: 40px;
  }
}

/* -------------------------------------------------------------------------------- the wide card */

/*
 * From 1024 px every product page is one card in the middle of a yellow page: 1040 px wide at most,
 * 72 px from the top, complete, and as tall as what it holds. The bar runs across its top. Under the
 * bar stand two columns: on the left the page's own words (eyebrow, title, note), with the corner
 * label and the label stack at the foot; on the right everything there is to do, as a phone has it.
 * Nothing here applies below 1024 px.
 */
@media (min-width: 1024px) {
  .page-pay {
    background: var(--yellow);
  }

  /* The small cluster in the screen's top left corner, the big one in its bottom right, lanes in the ground. */
  .page-pay .ground,
  .page-receipt .ground {
    display: block;
    background-image: url(../art/corner-small.svg), url(../art/corner-big.svg), url(../art/receipt-ground.svg);
    background-position:
      left top,
      right bottom,
      left bottom;
  }

  .page-receipt .ground {
    background-image: url(../art/corner-small.svg), url(../art/receipt-corner.svg), url(../art/receipt-ground.svg);
  }

  .page-pay .stage,
  .page-receipt .stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 72px 0;
  }

  /*
   * The card's measures. Up to 1152 px the card is the screen less 56 px each side, and its padding,
   * the gap between the columns and the right column give way a little, so the left column is never
   * narrower than 384 px. --copy is the left column's width, for type that has to fit it.
   */
  .phone,
  .page-receipt .slip {
    --pad: clamp(40px, 12.5vw - 88px, 56px);
    --gap: clamp(48px, 31.25vw - 272px, 88px);
    --side: clamp(400px, 15.625vw + 240px, 420px);
    --copy: min(420px, 28.125vw + 96px);

    flex: none;
    width: min(1040px, 100% - 112px);
  }

  /* The ink card, with the phone frame's corners all round. Never so short that its left column has no air. */
  .phone {
    min-height: 640px;
    padding: 34px var(--pad) 40px;
    border-radius: 42px;
  }

  .phone-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--side);
    grid-template-rows: auto 1fr;
    column-gap: var(--gap);
    max-width: none;
  }

  .phone .phone-bar {
    grid-column: 1 / -1;
  }

  /* The left column: its words start 76 px under the bar, and its foot keeps to the bottom. */
  .card-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: 76px;
  }

  .phone .pay-eyebrow,
  .phone .pay-who,
  .phone .pay-amount,
  .phone .pay-note {
    text-align: left;
  }

  .phone .pay-eyebrow {
    margin-top: 0;
  }

  /*
   * The title, at the headline's size. A name is one word, so it is set to fit its line: 56 px where
   * the column allows (fourteen characters fit), a longer handle a step smaller (the longest, twenty
   * characters and the @, fits at 36 px), and a name that goes on smaller still, wrapping. A title
   * in words keeps the full size and wraps if it must.
   */
  .phone .pay-who {
    margin-top: 16px;
    font-size: min(56px, calc(var(--copy) / 7.2));
    line-height: 1.03;
    letter-spacing: -0.035em;
  }

  .phone .pay-who--long {
    font-size: min(36px, calc(var(--copy) / 11.5));
  }

  .phone .pay-who--longer {
    font-size: 30px;
    line-height: 1.1;
  }

  .phone .pay-who--words {
    font-size: 56px;
  }

  /* The amount, at the brand's big size. Longer ones step down so they still fit the column. */
  .phone .pay-amount {
    margin-top: 18px;
    font-size: min(84px, calc(var(--copy) / 3.6));
  }

  .phone .pay-amount--9 {
    font-size: min(84px, calc(var(--copy) / 4.45));
  }

  .phone .pay-amount--11 {
    font-size: min(76px, calc(var(--copy) / 5.5));
  }

  .phone .pay-amount--many {
    font-size: min(58px, calc(var(--copy) / 7.2));
  }

  /* A request names who is asking first: the name is the title, the mono line comes under it. */
  .phone .request-head .pay-who {
    margin-top: 0;
  }

  .phone .request-head .pay-eyebrow {
    margin-top: 18px;
  }

  .phone .pay-note {
    max-width: 330px;
    margin-top: 22px;
    font-size: 15px;
    line-height: 1.38;
    letter-spacing: -0.01em;
  }

  .phone .pay-note--wide {
    display: -webkit-box;
  }

  .card-foot {
    display: block;
    margin-top: auto;
    padding-top: 56px;
  }

  .card-foot .mono-label {
    margin-bottom: 21px;
  }

  /* On ink the boxes of the stack are paper with ink text, as boards 05 and 08 draw them; the last one is yellow. */
  .phone .label-stack li {
    background: var(--paper);
    color: var(--ink);
  }

  .phone .label-stack li:last-child {
    background: var(--yellow);
  }

  /* The right column: what a phone shows under the head, unchanged. It starts 56 px under the bar. */
  .phone .pay-body {
    margin-top: 56px;
  }

  /* A button that is the first thing in the column stands at its top, where a list would. */
  .phone .pay-form > .button:first-child {
    margin-top: 0;
  }

  /* The ways to open the page in a wallet keep clear of a notice above them, as the wallet list does. */
  .phone .notice ~ .pay-open {
    margin-top: 12px;
  }

  /*
   * The receipt is the same card in paper: the slip, wide. The logo, the date and the dotted rule
   * run across its top. On the left stand "Paid", the amount and how long it took; on the right the
   * rows, with the strip of dashes and the footer at the column's foot, level with the label stack.
   * The scalloped edge runs along the whole width.
   */
  .page-receipt .slip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--side);
    grid-template-rows: auto auto 1fr;
    column-gap: var(--gap);
    max-width: none;
    margin: 0;
    padding: 34px var(--pad) 46px;
  }

  .page-receipt .slip-head,
  .page-receipt .slip-rule {
    grid-column: 1 / -1;
  }

  /* The first row's hairline stands level with the top of "Paid". */
  .page-receipt .card-copy {
    padding-top: 44px;
  }

  .page-receipt .slip-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: 47px;
  }

  /* "Paid" over the amount and how long it took under it: the line's two halves become lines of the column. */
  .page-receipt .slip-paid {
    display: contents;
  }

  .page-receipt .slip-amount {
    order: 1;
    margin-top: 10px;
    font-size: min(84px, calc(var(--copy) / 3.6));
  }

  .page-receipt .slip-amount--9 {
    font-size: min(84px, calc(var(--copy) / 4.45));
  }

  .page-receipt .slip-amount--11 {
    font-size: min(76px, calc(var(--copy) / 5.5));
  }

  .page-receipt .slip-amount--many {
    font-size: min(58px, calc(var(--copy) / 7.2));
  }

  .page-receipt .slip-took {
    order: 2;
    margin-top: 14px;
  }

  .page-receipt .card-foot {
    order: 3;
  }

  .page-receipt .slip-rows {
    margin: 0 0 34px;
  }

  .page-receipt .slip-strip {
    margin-top: auto;
  }
}

/*
 * On sign-in, the set-up page and the profile home the right column can run to several screens.
 * The left column then stays in view while the right one scrolls: it holds the place it has as the
 * page opens (129 px from the top: the card's 72, its padding and the bar) and ends 40 px above the
 * bottom of the screen, as it ends 40 px above the bottom of a card that fits. The column needs
 * 560 px for its words and its foot, so on a screen under 729 px tall it first rises with the page
 * as far as it must to show them whole, and holds there. A screen too short even for that (under
 * 600 px) lets the column scroll with the card.
 */
@media (min-width: 1024px) and (min-height: 600px) {
  .page-setup .card-copy {
    position: sticky;
    top: min(129px, 100vh - 600px);
    top: min(129px, 100dvh - 600px);
    max-height: max(100vh - 169px, 560px);
    max-height: max(100dvh - 169px, 560px);
  }
}

/* -------------------------------------------------------------------------------------- landing */

/*
 * The landing page: seven sections, each one of the approved boards (01, 02, 05, 06, 07, 08, 10).
 * On a phone a section is its text first and then its picture, set for a narrow screen. From
 * 1024 px each section is its board: 720 px tall, a 56 px margin, the boards' own positions.
 * The chat, the pay screen and the receipt here are pictures of the product: nothing in them can be
 * pressed.
 */
.page-landing {
  background: var(--ink);
}

.lp section {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}

.lp-wrap {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 22px;
}

/* One headline size on a phone, small enough that the hero's longer line stays one line. */
.lp .headline {
  font-size: min(40px, calc((100vw - 44px) / 9.75));
}

.lp .copy {
  margin-top: 20px;
}

.lp-pic {
  position: relative;
  z-index: 1;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* A section that pairs a text column with a colour panel holding a picture of the product. */
.lp-split .lp-wrap {
  padding-top: 48px;
}

.lp-foot {
  margin-top: 32px;
}

.lp-foot .mono-label {
  margin-bottom: 14px;
}

.lp-panel {
  position: relative;
  margin: 40px -22px 0;
  overflow: hidden;
}

/* --- 01, the hero */

/*
 * The hero fills the screen, and its band grows with the room it has: --hero-scale is how much
 * larger than the board the band is drawn, worked out by the stylesheet from the screen's height,
 * between limits. On a phone the band has the screen less the headline above it (about 200 px),
 * where the board gives it 500. A browser that cannot divide one length by another keeps the
 * board's size, and the room goes under the headline.
 *
 * The scale is the page's, not the hero's alone: the section under the hero carries the hero's field
 * of lanes on about the same point, at the same size.
 */
.lp {
  --hero-scale: 1;
}

@supports (width: calc(1px * tan(atan2(1px, 1px)))) {
  .lp {
    --hero-scale: clamp(1, tan(atan2(100svh - 200px, 500px)), 1.4);
  }
}

.lp .lp-hero {
  background: var(--ink);
  color: var(--paper);
}

.lp-hero .lp-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 26px;
}

.lp-hero-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lp-hero-bar .mono-label {
  color: var(--muted);
  font-size: 10.5px;
}

.lp-hero .headline {
  position: relative;
  z-index: 1;
  margin-top: 44px;
}

/*
 * The band. Everything in it is placed from the point its rings turn about. On a phone that point
 * sits left of the screen, so the band comes in along the top and falls away to the right, with
 * the small text inside the arch, as on the board. The band takes what is left of the screen, and
 * never less than the board's 500 px.
 */
.lp-hero-art {
  position: relative;
  flex: 1 0 500px;
  margin: 28px -22px 0;
}

/*
 * The point stays below the band's bottom edge by the board's 224 px, at the band's scale: a
 * running dash enters and leaves out of sight whatever the screen's height. As the band grows the
 * point also moves left by what the label's place has grown (312 px at the board's size), so the
 * label stays where the board has it.
 */
.lp-hero-origin {
  position: absolute;
  top: calc(100% + 224px * var(--hero-scale));
  left: calc(min(35.8333% - 200px, 100% - 445px) - 312px * (var(--hero-scale) - 1));
  width: 0;
  height: 0;
  transform: scale(var(--hero-scale));
}

.lp-hero-lanes {
  position: absolute;
  top: -1200px;
  left: -170px;
  width: 1030px;
  height: 1200px;
  background: url(../art/hero-small.svg) no-repeat;
}

.lp-hero-tag {
  position: absolute;
  top: -651px;
  left: 312px;
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  /* The label keeps its own size as the band grows: it is scaled back about the point the hairline meets. */
  transform: scale(calc(1 / var(--hero-scale)));
  transform-origin: 0 50%;
}

/* --- 02, the three cards */

.lp-cards .lp-wrap {
  padding-top: 48px;
  padding-bottom: 48px;
}

.lp-cards-aside {
  max-width: 330px;
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.38;
  letter-spacing: -0.01em;
}

/* The outlined mono link of the board. Taller on a phone, so it is easy to tap. */
.lp-box-link {
  display: inline-flex;
  align-items: center;
  height: 44px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 120ms ease,
    color 120ms ease;
}

.lp-box-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.lp-card-row {
  display: grid;
  gap: 10px;
  max-width: 560px;
  margin-top: 36px;
}

/* A card is the board's own: 402 px tall, the art in its bottom right corner above the caption. */
.lp-card {
  position: relative;
  height: 402px;
  padding: 22px;
  overflow: hidden;
}

.lp-card::before {
  position: absolute;
  background-repeat: no-repeat;
  content: '';
}

.lp-card--pay {
  background: var(--paper2);
}

.lp-card--request {
  background: var(--lilac);
}

.lp-card--square {
  background: var(--yellow);
}

/* The clusters turn about the card's right edge, 68 px above its bottom edge. */
.lp-card--pay::before {
  right: 0;
  bottom: 68px;
  width: 254px;
  height: 254px;
  background-image: url(../art/card-pay.svg);
}

.lp-card--request::before {
  right: 0;
  bottom: 68px;
  width: 218px;
  height: 218px;
  background-image: url(../art/card-request.svg);
}

/* The stacks stand 24 px from the right edge. A narrower card draws all five smaller, never cut. */
.lp-card--square::before {
  right: 24px;
  bottom: 65px;
  width: min(300px, calc(100% - 46px));
  height: 167px;
  background-image: url(../art/card-square.svg);
  background-position: right bottom;
  background-size: 100% auto;
}

.lp-card-icon {
  display: block;
  fill: var(--ink);
}

.lp-card-icon--line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 8;
  stroke-linecap: round;
}

.lp-card-icon--coins {
  margin: 2px 0 0 -1px;
  fill: var(--yellow);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.lp-card-icon--coins .lp-coin-top {
  fill: var(--ink);
}

.lp-card-title {
  position: absolute;
  top: 78px;
  left: 22px;
  margin: 0;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.lp-card-text {
  position: absolute;
  top: 350px;
  right: 22px;
  left: 22px;
  max-width: 300px;
  font-size: 13.5px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* --- 05, in the chat */

/* On a phone the chat fills the blue panel and runs off its bottom edge, as on the board. */
.lp-panel--blue {
  height: 676px;
  padding: 80px 16px 0;
  background: var(--blue) url(../art/chat-corner-small.svg) right top no-repeat;
}

.lp-chat {
  max-width: 424px;
  height: 640px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background: var(--ink);
  color: var(--paper);
}

.lp-chat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-on-ink);
}

.lp-chat-bar p:first-child {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.lp-chat-bar p:first-child span {
  margin-right: 7px;
  color: var(--quiet-on-ink);
  font-weight: 400;
}

.lp-chat-bar .lp-chat-online {
  color: var(--quiet-on-ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lp-chat-log {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 18px 20px 0;
}

.lp-msg {
  display: flex;
  gap: 12px;
}

.lp-avatar {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.lp-avatar--orange {
  background: var(--orange);
}

.lp-avatar--lilac {
  background: var(--lilac);
}

/* The bot's picture: the avatar, the small mark in ink on paper, cut to a circle. */
.lp-avatar--lobb {
  background: var(--paper) url(../art/avatar.svg) center / 100% 100% no-repeat;
}

.lp-msg-main {
  flex: 1;
  min-width: 0;
}

.lp-msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 18px;
}

.lp-msg-head b {
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.01em;
}

.lp-msg-head span {
  color: var(--quiet-on-ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.lp-msg-head .lp-app-tag {
  display: flex;
  align-items: center;
  height: 15px;
  padding: 0 4px;
  background: var(--blue);
  color: var(--paper);
  font-size: 9px;
  text-transform: uppercase;
}

.lp-msg-text {
  margin-top: 3px;
  color: var(--text-on-ink);
  font-size: 14.5px;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.lp-turn {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lp-used {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  padding-left: 17px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lp-used-hook {
  width: 22px;
  height: 9px;
  margin-top: 9px;
  border-top: 1.5px solid #55534d;
  border-left: 1.5px solid #55534d;
  border-top-left-radius: 6px;
}

.lp-used-cmd {
  display: flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 10.5px;
}

/* What the bot posts: the chat card of the board. */
.lp-bot-card {
  width: 318px;
  max-width: 100%;
  margin-top: 8px;
  padding: 16px 18px 15px;
  border-radius: 14px;
  background: var(--card-on-ink);
}

.lp-bot-eyebrow {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lp-bot-who {
  margin-top: 7px;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lp-bot-amount {
  margin-top: 6px;
  font-weight: 300;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.lp-bot-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.lp-bot-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  margin-top: 15px;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.lp-bot-line {
  margin-top: 11px;
  color: var(--muted);
  font-size: 11.5px;
}

/* --- 06, the pay screen */

/*
 * The screen as a phone-like card that runs off the bottom of the yellow panel, as on the board:
 * 620 px of it show. On a phone the small cluster shows round its top left corner.
 */
.lp-panel--yellow {
  height: 676px;
  padding: 56px 22px 0;
  background: var(--yellow) url(../art/corner-small.svg) left top no-repeat;
}

.lp-phone {
  display: flex;
  flex-direction: column;
  max-width: 360px;
  height: 700px;
  margin: 0 auto;
  padding: 26px 22px;
  border-radius: 42px;
  background: var(--ink);
  color: var(--paper);
}

/* As on the pay screen itself, the amount gives way to the width of a narrow screen. */
.lp-phone .pay-amount {
  font-size: min(76px, calc((100vw - 88px) / 3.6));
}

.lp-phone .wallet-radio.lp-radio-on {
  border: 5px solid var(--paper);
}

/* --- 07, the receipt */

.lp .lp-receipt {
  background: var(--yellow);
}

/* The ground: lanes drawn tone on tone, and the big cluster in the bottom right corner. */
.lp-receipt-ground {
  position: absolute;
  inset: 0;
  background-image: url(../art/receipt-corner.svg), url(../art/receipt-ground-small.svg);
  background-position:
    right bottom,
    left bottom;
  background-repeat: no-repeat;
  pointer-events: none;
}

.lp-receipt .lp-wrap {
  padding-bottom: 168px;
}

/* The slip keeps 16 px to each side of the screen, as on the receipt page. */
.lp-receipt-main {
  margin: 40px -6px 0;
}

/* --- 08, what it does */

.lp .lp-does {
  background: var(--ink);
  color: var(--paper);
}

.lp-does .lp-wrap {
  padding-top: 48px;
  padding-bottom: 40px;
}

/* Lanes about a point above the top right corner, a short yellow run and a few single dashes. */
.lp-does-art {
  position: absolute;
  top: 0;
  right: -120px;
  width: 1150px;
  height: 1000px;
  background: url(../art/labels-small.svg) no-repeat;
  pointer-events: none;
}

.lp-does .headline,
.lp-wall,
.lp-does-label {
  position: relative;
  z-index: 1;
}

/* The wall of labels. On a phone the filler boxes run off the right edge. */
.lp-wall {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 40px -22px 0 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lp-wall li {
  display: flex;
  gap: 5px;
}

.lp-wall-label {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 13px;
  background: var(--paper);
  white-space: nowrap;
}

.lp-wall-lit .lp-wall-label {
  background: var(--yellow);
}

.lp-wall-label svg {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lp-wall i {
  flex: none;
  height: 40px;
  background: var(--line-on-ink);
}

.lp-wall li:nth-child(1) i:nth-of-type(1) {
  width: 118px;
}

.lp-wall li:nth-child(1) i:nth-of-type(2) {
  width: 204px;
}

.lp-wall li:nth-child(2) i {
  width: 92px;
}

.lp-wall li:nth-child(3) i:nth-of-type(1) {
  width: 160px;
}

.lp-wall li:nth-child(3) i:nth-of-type(2) {
  width: 70px;
}

.lp-wall li:nth-child(4) i {
  width: 196px;
}

.lp-wall li:nth-child(5) i {
  width: 110px;
}

.lp-wall li:nth-child(6) i:nth-of-type(1) {
  width: 150px;
}

.lp-wall li:nth-child(6) i:nth-of-type(2) {
  width: 88px;
}

/* Under the wall there is room for the yellow run; the label sits below it. */
.lp-does-label {
  margin-top: 190px;
}

/* --- 10, the closing */

.lp-closing .lp-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 236px;
  text-align: center;
}

.lp-closing .lobb-mark {
  --mark: 30px;
  font-size: 24px;
}

/* Its weight and its tracking are the headline's (the class `headline`, at the top): only its size is its own. */
.lp-closing-title {
  max-width: 800px;
  margin-top: 28px;
  font-size: min(40px, calc((100vw - 44px) / 7.8));
  line-height: 1.02;
}

.lp-closing-text {
  max-width: 330px;
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.38;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lp-closing .button {
  width: auto;
  min-width: 220px;
  margin-top: 28px;
}

.lp-closing .button + .message-link {
  margin-top: 6px;
}

/* A second quiet link under the first (the way to the privacy page, where there is one): close under it. */
.lp-closing .message-link + .message-link {
  margin-top: -14px;
}

.lp-arch {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 160px;
  overflow: hidden;
  pointer-events: none;
}

.lp-closing-line {
  display: block;
}

/*
 * A card narrower than 346 px (a small phone, or three across a small laptop) cannot keep the first
 * cluster's outer lanes clear of the title, so it draws the cluster without them.
 */
@media (max-width: 389px), (min-width: 1024px) and (max-width: 1169px) {
  .lp-card--pay::before {
    width: 194px;
    height: 194px;
    background-image: url(../art/card-pay-small.svg);
  }
}

/* From 600 px there is room beside the pictures for the second cluster of each panel. */
@media (min-width: 600px) {
  .lp-panel--blue {
    background-image: url(../art/chat-corner-small.svg), url(../art/chat-corner-big.svg);
    background-position:
      right top,
      left bottom;
  }

  .lp-panel--yellow::after {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 278px;
    height: 278px;
    background: url(../art/corner-big.svg) right bottom no-repeat;
    content: '';
  }
}

@media (min-width: 1024px) {
  .lp-wrap {
    padding: 0 var(--edge);
  }

  .lp .headline {
    font-size: 56px;
  }

  .lp-br-phone {
    display: none;
  }

  /* The right column is 48.67% of the whole width, margins included (584 of the board's 1200). */
  .lp-split .lp-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) calc((100% + 2 * var(--edge)) * 0.486667);
    min-height: 720px;
    padding-top: 0;
  }

  .lp-split--flip .lp-wrap {
    grid-template-columns: calc((100% + 2 * var(--edge)) * 0.486667) minmax(0, 1fr);
  }

  /* Two lines of headline end at 161 px; the body starts at 196 px, as on every board. */
  .lp-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 46px 40px var(--edge) 0;
  }

  .lp-split--flip .lp-copy {
    order: 2;
    padding: 46px 0 var(--edge) 64px;
  }

  .lp-copy .headline {
    min-height: 2.06em;
    margin-bottom: 35px;
  }

  .lp-copy .copy {
    margin-top: 0;
  }

  .lp-foot {
    margin-top: auto;
    padding-top: 48px;
  }

  .lp-foot .mono-label {
    margin-bottom: 21px;
  }

  /* The colour panel starts a margin down and bleeds off the bottom edge. */
  .lp-panel {
    margin: var(--edge) 0 0;
  }

  /* --- 01 */

  /*
   * The board is 720 px tall under the bar's 64. Here it is as tall as the screen, and the band is
   * drawn larger or smaller by the same measure: never so small that it would run into the two
   * texts at its foot (0.92), never so large that the label would leave the column, and at most
   * 1.6 times the board.
   */
  @supports (width: calc(1px * tan(atan2(1px, 1px)))) {
    .lp {
      --hero-scale: clamp(0.92, min(tan(atan2(100svh - 64px, 720px)), tan(atan2(min(100vw, 1440px) - 56px, 872px))), 1.6);
    }
  }

  .lp-hero .lp-wrap {
    display: block;
    height: max(662px, calc(100vh - 64px));
    height: max(662px, calc(100svh - 64px));
    min-height: 0;
    padding-top: 46px;
  }

  .lp-hero-bar {
    position: static;
    display: block;
  }

  .lp-hero-bar .mono-label {
    position: absolute;
    top: 58px;
    right: var(--edge);
    z-index: 1;
    color: inherit;
    font-size: 12px;
  }

  .lp-hero .headline {
    margin-top: 0;
  }

  /*
   * The board puts the point the rings turn about 430 px from its left edge and 180 px below its
   * bottom edge (900 px down). Both grow with the band, so the picture is the board's, larger.
   */
  .lp-hero-art {
    position: absolute;
    inset: 0;
    margin: 0;
  }

  .lp-hero-origin {
    top: calc(100% + 180px * var(--hero-scale));
    left: calc(430px * var(--hero-scale));
  }

  .lp-hero-lanes {
    top: -2000px;
    left: -2000px;
    width: 4400px;
    height: 2000px;
    background-image: url(../art/hero.svg);
  }

  /* --- 02 */

  .lp-cards .lp-wrap {
    min-height: 720px;
    padding-top: 46px;
    padding-bottom: var(--edge);
  }

  /* The cards start 262 px down the board, whatever the headline does. */
  .lp-cards-head {
    position: relative;
    height: 216px;
  }

  .lp-cards-aside {
    position: absolute;
    top: 10px;
    right: 0;
    width: 236px;
    margin-top: 0;
    font-size: 14px;
    line-height: 1.35;
  }

  .lp-box-link {
    height: 30px;
    margin-top: 14px;
    padding: 0 10px;
  }

  .lp-card-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
    margin-top: 0;
  }

  /* --- 05 */

  .lp-panel--blue {
    height: auto;
    padding: 0;
  }

  .lp-chat {
    position: absolute;
    top: 68px;
    left: 50%;
    width: 424px;
    margin-left: -212px;
  }

  /* --- 06 */

  .lp-panel--yellow {
    height: auto;
    padding: 0;
  }

  /* The card starts 44 px down the panel. */
  .lp-phone {
    position: absolute;
    top: 44px;
    left: 50%;
    width: 360px;
    margin-left: -180px;
  }

  .lp-phone .pay-amount {
    font-size: 76px;
  }

  /* --- 07 */

  .lp-receipt-ground {
    background-image: url(../art/receipt-corner.svg), url(../art/receipt-ground.svg);
  }

  .lp-receipt .lp-wrap {
    padding-bottom: 0;
  }

  /* The slip sits 92 px from the top and 12 px right of the column's middle, as on the board. */
  .lp-receipt-main {
    margin: 0;
    padding: 92px 0 104px;
  }

  .lp-receipt .slip {
    left: 12px;
    width: 400px;
  }

  /* --- 08 */

  .lp-does .lp-wrap {
    min-height: 720px;
    padding-top: 46px;
    padding-bottom: 0;
  }

  /* Under 1200 px the art gives up half of what the screen lacks, so no dash crowds the headline. */
  .lp-does-art {
    right: calc(-1020px - max(0px, (1200px - 100%) / 2));
    width: 3500px;
    height: 840px;
    background-image: url(../art/labels.svg);
  }

  .lp-does .headline {
    min-height: 2.06em;
  }

  .lp-wall {
    margin: 155px 0 0;
  }

  .lp-does-label {
    position: absolute;
    bottom: 48px;
    left: var(--edge);
    margin-top: 0;
  }

  /* --- 10 */

  .lp-closing .lp-wrap {
    min-height: 800px;
    padding-top: 166px;
    padding-bottom: 230px;
  }

  .lp-closing .lobb-mark {
    --mark: 36px;
    font-size: 32px;
  }

  .lp-closing-title {
    margin-top: 32px;
    font-size: 68px;
  }

  .lp-closing-text {
    margin-top: 28px;
  }
}

/* --------------------------------------------------------------------------------------- motion */

/*
 * The dashes never move; colour moves through them, one dash per step. Nothing bounces, spins or
 * slides as a block. Everything here sits behind prefers-reduced-motion: with it, nothing moves and
 * every element shows its resting state.
 */

/* Confirming: the yellow hops from one dash of the lane to the next, nine places, then starts over. */
@keyframes lane-travel {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(264px);
  }
}

.progress-lane .lane-dash {
  animation: lane-travel 2.7s steps(9, jump-none) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .progress-lane .lane-dash {
    transform: translateX(132px);
    animation: none;
  }

  .button {
    transition: none;
  }
}

/*
 * A payment landing: on a receipt opened straight from paying (assets/js/receipt.js marks it), the
 * blue runs the middle row of the strip, dash by dash, in from the left edge to where it rests. Once.
 */
@keyframes strip-land {
  from {
    transform: translateX(-198px);
  }

  to {
    transform: none;
  }
}

/* The words above an arch ease in first: the logo, then the lines under it. */
@keyframes word-mark {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes word-line {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .slip-strip--landing .strip-dash {
    animation: strip-land 720ms steps(6, end) 300ms both;
  }

  /*
   * The closing arch arrives in courses; the timing of each dash is in /assets/css/arch.css, which
   * src/ui/arch.ts generates. A message page plays as it opens. The landing's closing section is
   * held back by assets/js/arch.js (.arch--wait) until its arch first comes into view (.arch--play).
   */
  .page-message .message > .lobb-mark,
  .arch--play .lobb-mark {
    animation: word-mark 520ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
  }

  .page-message .message-title,
  .page-message .message-text,
  .page-message .message .button,
  .page-message .message-link,
  .arch--play .lp-closing-line,
  .arch--play .lp-closing-text,
  .arch--play .button,
  .arch--play .message-link {
    animation: word-line 640ms cubic-bezier(0.16, 0.84, 0.24, 1) 90ms both;
  }

  .page-message .message-text,
  .page-message .message .button,
  .page-message .message-link,
  .arch--play .lp-closing-line + .lp-closing-line,
  .arch--play .lp-closing-text,
  .arch--play .button,
  .arch--play .message-link {
    animation-delay: 170ms;
  }

  .arch--wait .lobb-mark,
  .arch--wait .lp-closing-line,
  .arch--wait .lp-closing-text,
  .arch--wait .button,
  .arch--wait .message-link {
    opacity: 0;
  }
}

/* The landing page moves nothing else but the colour of its outlined link. */
@media (prefers-reduced-motion: reduce) {
  .lp-box-link {
    transition: none;
  }
}

/* ------------------------------------------------------------- getting paid to a bank account */

/*
 * The "To your bank" row of the profile home, the page that runs Plaid, and the one line a receipt
 * gains for a payout. Only on pages of a server where the feature is on (BANK_PAYOUT).
 */

/* The three steps of setting a bank up, as mono labels: the one that is now is paper, the rest muted. */
.bank-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 16px 0 0;
  padding: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  list-style: none;
  text-transform: uppercase;
}

.bank-steps span {
  margin-right: 7px;
}

.bank-steps-now {
  color: var(--paper);
}

.bank-steps-now span {
  color: var(--yellow);
}

/* The quiet actions under the row's one button, side by side where they fit. */
.bank-quiet {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 6px;
}

a.quiet-action {
  display: inline-block;
  text-decoration: none;
}

.setup-bank-line {
  margin-top: 18px;
  text-align: center;
}

/* The page that runs Plaid: one step, always open, with no row to press. */
.bank-link-step > .setup-body {
  padding-top: 4px;
}

/* What a payout's line on a receipt means, under the rows. */
.slip-note {
  margin-top: 14px;
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

/* On the wide slip the rows keep 34 px under them for the strip: the note sits 14 px under the rows and keeps the 34. */
@media (min-width: 1024px) {
  .page-receipt .slip-note {
    margin: -20px 0 34px;
  }
}

/* -------------------------------------------------------------------------------- the profile home */

/*
 * The profile home (the account home) as the owner's design of 24 Nov 2026 draws it
 * (brand/review/profile-qr-design): the handle large with a yellow @ over a dashed line, what the
 * profile's wallets hold, the payments of late and where payments arrive in the left column; the
 * pay page with its code, then every row of the page, in the right one. Only this page: the set-up
 * and sign-in pages keep the rows as they were. On a phone the left column is the top of the screen,
 * set left as the design sets it.
 */
.page-account {
  /* The design's two greys on ink: the dashed line under the handle and the address, and the line under an open row's name. */
  --dash-on-ink: #45453f;
  --rule-on-ink: #33332f;
}

.page-account .pay-eyebrow {
  margin-top: 44px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: left;
}

/* The handle: as wide as itself, over the dashed line, its @ in yellow. */
.page-account .phone .account-who {
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding-bottom: 8px;
  border-bottom: 2px dashed var(--dash-on-ink);
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
  text-align: left;
}

.page-account .phone .account-who.pay-who--long {
  font-size: 30px;
}

.account-at {
  color: var(--yellow);
}

/* The small mono labels of the left column: Available to Lobb, Recent. */
.account-mono {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-available {
  margin-top: 30px;
}

.account-balance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
}

.account-amount {
  display: inline-flex;
  align-items: center;
  min-height: 1em;
  color: var(--paper);
  font-size: 34px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

/* Until the total is read, and where it cannot be: a dash, drawn, the width of the one the type has. */
.account-amount[data-state='reading']::before,
.account-amount[data-state='unknown']::before {
  display: block;
  width: 0.72em;
  height: 0.075em;
  min-height: 2px;
  background: currentColor;
  content: '';
}

.account-amount[data-state='reading'] {
  color: var(--muted);
}

.account-coin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.account-usdc-mark {
  display: block;
  flex: none;
  width: 22px;
  height: 22px;
}

/* The payments of late: how much, in yellow when it came in; who, and where they were reached; and when. */
.account-recent {
  margin-top: 28px;
}

.recent {
  display: grid;
  margin-top: 10px;
}

.recent-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 -8px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--paper);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .recent-row:hover {
    background: var(--card-on-ink);
  }
}

.recent-row:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -2px;
}

.recent-amount {
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.recent-row--in .recent-amount {
  color: var(--yellow);
}

.recent-who {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.recent-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-via {
  display: block;
  flex: none;
  width: 13px;
  height: 13px;
  fill: var(--paper);
}

.recent-tag {
  flex: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.recent-when {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.recent-none {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

/* Where payments arrive: a sentence, set left. */
.page-account .phone .setup-note {
  display: block;
  max-width: 300px;
  margin-top: 28px;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
}

/* The rows, in the design's style: larger, rounder and a little apart, the name in medium weight. */
.page-account .setup-steps {
  gap: 10px;
}

.page-account .setup-step {
  border-radius: 20px;
}

.page-account .setup-step > summary {
  min-height: 62px;
  padding: 0 18px;
  font-size: 17px;
}

.page-account .setup-step > summary:focus-visible {
  border-radius: 20px;
}

.page-account .setup-name {
  font-weight: 500;
}

.page-account .setup-tag {
  font-size: 11px;
  letter-spacing: 0.12em;
}

.page-account .setup-caret {
  width: 6px;
  height: 6px;
}

.page-account .setup-body {
  padding: 2px 18px 18px;
  border-top-color: var(--rule-on-ink);
}

/* Catch's card: the code on its own tile, the address large under it, the button, and one line. */
.view-card {
  border-radius: 20px;
  background: var(--card-on-ink);
}

.view-pay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 18px 22px;
}

/* Its parts stand 18 px apart, the gap's: none keeps a margin of its own (a button's, a code's). */
.account .view-pay > * {
  margin-top: 0;
}

.view-pay .setup-line:empty {
  display: none;
}

/* The address: as wide as itself, over its dashed line, which turns yellow under a pointer. */
.account-link {
  max-width: 100%;
  padding-bottom: 4px;
  border-bottom: 2px dashed var(--dash-on-ink);
  color: var(--muted);
  font-size: 26px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.02em;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: border-color 160ms ease;
}

.account-link--long {
  font-size: 20px;
}

@media (hover: hover) {
  .account-link:hover {
    border-bottom-color: var(--yellow);
  }
}

.account-link:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 6px;
}

.account-link-handle {
  color: var(--yellow);
}

.view-pay .button {
  height: 60px;
  font-size: 17px;
}

.view-pay .setup-quiet {
  align-self: stretch;
  font-size: 14px;
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .account-link {
    transition: none;
  }
}

/*
 * From 1024 px: the design's card, 1160 px wide at most, 48 px from the top, rounded at the top and
 * running to the foot of the page; the logo 28 px tall; 56 px under the bar the two columns, the
 * left one 26 px lower again, 48 px between them and the right one 480 px at most.
 */
@media (min-width: 1024px) {
  .page-account .stage {
    padding: 48px 0 0;
  }

  .page-account .phone {
    --pad: clamp(24px, 5vw, 64px);
    --gap: 48px;
    --side: clamp(380px, 40vw - 64px, 480px);
    --copy: calc(min(1160px, 100vw - 48px) - 2 * var(--pad) - var(--gap) - var(--side));

    width: min(1160px, 100% - 48px);
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    padding: 36px var(--pad) 48px;
    border-radius: 44px 44px 0 0;
  }

  .page-account .phone-bar .lobb-mark {
    --mark: 28px;
    font-size: 19.5px;
  }

  .page-account .phone-bar .phone-host {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .page-account .card-copy {
    padding-top: 82px;
  }

  /*
   * The left column stays in view while the rows scroll, as on set-up and sign-in, from where it
   * stands as the page opens: 112 px down (the card's 48, its 36 of padding and the 28 of the bar).
   * Its words, the payments and the foot need 800 px; a shorter screen first lets it rise as far as
   * it must to show them whole.
   */
  .page-account.page-setup .card-copy {
    top: min(112px, 100vh - 840px);
    top: min(112px, 100dvh - 840px);
    max-height: max(100vh - 152px, 800px);
    max-height: max(100dvh - 152px, 800px);
  }

  .page-account .phone .pay-eyebrow {
    margin-top: 0;
    font-size: 12px;
  }

  .page-account .phone .account-who {
    margin-top: 20px;
    padding-bottom: 10px;
    font-size: min(60px, calc(var(--copy) / 7.6));
  }

  .page-account .phone .account-who.pay-who--long {
    font-size: min(40px, calc(var(--copy) / 11.5));
  }

  .page-account .account-available {
    margin-top: 32px;
  }

  .page-account #account-available-label {
    font-size: 12px;
  }

  .page-account .account-amount {
    font-size: 40px;
  }

  .page-account .phone .setup-note {
    max-width: 230px;
    font-size: 17px;
  }

  /* The corner label and the stack, as the design sets them: 13 px, wider apart. */
  .page-account .card-foot .mono-label {
    margin-bottom: 14px;
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .page-account .label-stack {
    gap: 6px;
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .page-account .label-stack li {
    height: auto;
    padding: 8px 12px;
  }
}

/*
 * A receipt opened from the profile home's "Recent", from 1024 px: the way back stands 32 px from
 * the top, as wide as the slip so it starts where the slip does, and the slip 16 px under it.
 */
@media (min-width: 1024px) {
  .page-receipt .stage:has(> .slip-back) {
    padding-top: 32px;
  }

  .page-receipt .slip-back {
    width: min(1040px, 100% - 112px);
    max-width: none;
    margin: 0 0 16px;
  }
}

/* -------------------------------------------------- the profile's views: Catch, Lob and the tabs */

/*
 * The profile home is two things first, as the owner chose on 24 Nov 2026: Catch (getting paid) and
 * Lob (paying someone), with one large switch between them; every other row of the page is in the
 * small tabs under it (Wallets, Security, Accounts, More). The views are radios the labels press, so
 * they work without a script; the page's script only opens the view of a row something else opens.
 */
.view-panel {
  display: none;
  margin-top: 18px;
}

.account:has(#view-catch:checked) .view-panel--catch,
.account:has(#view-lob:checked) .view-panel--lob,
.account:has(#view-wallets:checked) .view-panel--wallets,
.account:has(#view-security:checked) .view-panel--security,
.account:has(#view-accounts:checked) .view-panel--accounts,
.account:has(#view-more:checked) .view-panel--more {
  display: block;
}

/*
 * The views' bar, one card: the switch (Catch and Lob, large) over the tabs of the rest (small), one
 * choice among the six. One yellow mark lies behind the label of the view that is open and slides to
 * the next one pressed, across the switch and the tabs alike. The stylesheet draws it and moves it
 * from the radio that is on, so it needs no script: the rows are of fixed height and their columns
 * equal, so where each label stands is known here.
 *
 * One inset everywhere: the card's padding, the gap between its two rows and the gap between labels.
 * So the mark stands the inset from every edge of the card it comes to, and a tab's mark the inset
 * from the switch above it and from the card's foot below it. Its corners are the card's less the
 * inset, so where it meets a corner of the card (Catch, Lob, Wallets, More) the two curves run side by
 * side, the inset apart, as the straight edges do; every label has the same corners, the switch's
 * and the tabs' alike.
 */
.view-bar {
  --inset: 6px;
  --mark-radius: 12px;
  --switch-height: 58px;
  --tab-height: 40px;
  position: relative;
  display: grid;
  gap: var(--inset);
  padding: var(--inset);
  border-radius: calc(var(--mark-radius) + var(--inset));
  background: var(--card-on-ink);
}

.view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--inset);
}

.view-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--inset);
}

.view-switch-item,
.view-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--mark-radius);
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.view-switch-item {
  height: var(--switch-height);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* The tabs of the rest: in the page's own face, in capitals, with small corners. */
.view-tab {
  height: var(--tab-height);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 359px) {
  .view-tab {
    font-size: 10.5px;
    letter-spacing: 0.04em;
  }
}

@media (hover: hover) {
  .view-switch-item:hover,
  .view-tab:hover {
    color: var(--paper);
  }
}

/* The label of the view that is open is ink, on the mark. */
.account:has(#view-catch:checked) .view-switch-item[for='view-catch'],
.account:has(#view-lob:checked) .view-switch-item[for='view-lob'],
.account:has(#view-wallets:checked) .view-tab[for='view-wallets'],
.account:has(#view-security:checked) .view-tab[for='view-security'],
.account:has(#view-accounts:checked) .view-tab[for='view-accounts'],
.account:has(#view-more:checked) .view-tab[for='view-more'],
.account:not(:has(.view-radio:checked)) .view-switch-item[for='view-catch'] {
  color: var(--ink);
}

/*
 * The mark: behind Catch, unless another view is open. A column of the switch is half the card less
 * one and a half insets (the padding on each side and the gap between); of the tabs, a quarter less
 * one and a quarter (the padding on each side and three gaps). The tabs' row starts under the switch
 * and one more inset.
 */
.view-mark {
  position: absolute;
  top: var(--inset);
  left: var(--inset);
  width: calc(50% - 1.5 * var(--inset));
  height: var(--switch-height);
  border-radius: var(--mark-radius);
  background: var(--yellow);
  pointer-events: none;
}

.account:has(#view-lob:checked) .view-mark {
  left: calc(50% + 0.5 * var(--inset));
}

.account:has(#view-wallets:checked) .view-mark,
.account:has(#view-security:checked) .view-mark,
.account:has(#view-accounts:checked) .view-mark,
.account:has(#view-more:checked) .view-mark {
  top: calc(var(--switch-height) + 2 * var(--inset));
  width: calc(25% - 1.25 * var(--inset));
  height: var(--tab-height);
}

.account:has(#view-security:checked) .view-mark {
  left: calc(25% + 0.75 * var(--inset));
}

.account:has(#view-accounts:checked) .view-mark {
  left: calc(50% + 0.5 * var(--inset));
}

.account:has(#view-more:checked) .view-mark {
  left: calc(75% + 0.25 * var(--inset));
}

/* No radio on, which no press can make (a browser restoring something odd): Catch, as on arrival. */
.account:not(:has(.view-radio:checked)) .view-panel--catch {
  display: block;
}

/* The keyboard moves among the views as among radios: the ring is on the label of the one it is on. */
.account:has(#view-catch:focus-visible) [for='view-catch'],
.account:has(#view-lob:focus-visible) [for='view-lob'],
.account:has(#view-wallets:focus-visible) [for='view-wallets'],
.account:has(#view-security:focus-visible) [for='view-security'],
.account:has(#view-accounts:focus-visible) [for='view-accounts'],
.account:has(#view-more:focus-visible) [for='view-more'] {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/*
 * The movement, with the rows' own easing: the mark slides to the label pressed and takes its size,
 * the labels' colours follow it, and the view that opens rises into place as it fades in. Nothing
 * moves for someone who asked for less motion.
 */
@media (prefers-reduced-motion: no-preference) {
  .view-mark {
    transition:
      left 260ms cubic-bezier(0.2, 0.7, 0.2, 1),
      top 260ms cubic-bezier(0.2, 0.7, 0.2, 1),
      width 260ms cubic-bezier(0.2, 0.7, 0.2, 1),
      height 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .view-switch-item,
  .view-tab {
    transition: color 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .view-panel {
    animation: view-in 240ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* A browser that cannot read :has() shows every view, one under the other, and no bar that would do nothing. */
@supports not selector(:has(*)) {
  .view-panel {
    display: block;
  }

  .view-bar {
    display: none;
  }
}

/* Catch: what waits to be caught, then the money in. Lob: the form, then the money out. */
.view-waiting {
  margin-top: 24px;
}

.view-waiting .recent {
  margin-top: 10px;
}

.page-account .view-panel .account-recent {
  margin-top: 24px;
}

/* Lob's form is the send page's own, on the ink as the send page has it; its small print set left. */
.view-send .pay-fine {
  margin-top: 0;
  padding-top: 16px;
  text-align: left;
}
