/* coinshift design system. One light violet-tinted page, one white swap card, near-black violet ink,
   one violet accent for the main action. Plus Jakarta Sans for all text, IBM Plex Mono only for
   addresses, hashes and references. Fonts and images are bundled locally (CSP: self only). */

@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 400; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 500; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jakarta Fallback'; src: local('Arial'), local('Helvetica Neue'), local('Roboto'); size-adjust: 104%; ascent-override: 98%; descent-override: 21%; }



:root {
  color-scheme: light;

  /* Palette: a cool off-white page tinted toward the accent hue */
  --violet: oklch(0.52 0.2 285);
  --violet-hover: oklch(0.47 0.2 285);
  --violet-pressed: oklch(0.43 0.19 285);
  --ink: oklch(0.22 0.04 285);
  --grey: oklch(0.48 0.025 285);
  --page: oklch(0.975 0.006 285);
  --card: oklch(1 0 0);
  --well: oklch(0.965 0.008 285);
  --well-hover: oklch(0.935 0.012 285);
  --well-strong: oklch(0.905 0.015 285);
  --line: oklch(0.91 0.012 285);

  /* Surfaces */
  --field: var(--page);
  --band: var(--card);
  --paper-raised: var(--card);

  /* Roles */
  --text: var(--ink);
  --text-quiet: var(--grey);
  --hover: var(--well-hover);
  --hover-strong: var(--well-strong);
  --accent: var(--violet);
  --accent-hover: var(--violet-hover);
  --accent-pressed: var(--violet-pressed);
  --on-accent: oklch(1 0 0);
  --on-ink: oklch(1 0 0);
  --link-line: oklch(0.52 0.2 285 / 0.45);
  --focus: var(--violet);
  --good: oklch(0.5 0.13 155);
  --warn: oklch(0.52 0.13 60);
  --bad: oklch(0.52 0.2 27);
  --line-control: oklch(0.8 0.015 285);
  --line-logo: oklch(0.22 0.04 285 / 0.1);
  --logo-coin: #b8acf2;
  --scrim: oklch(0.22 0.04 285 / 0.4);
  --shadow-card: 0 1px 2px oklch(0.22 0.04 285 / 0.05), 0 8px 28px oklch(0.22 0.04 285 / 0.07);
  --shadow-sheet: 0 2px 4px oklch(0.22 0.04 285 / 0.06), 0 24px 48px oklch(0.22 0.04 285 / 0.16);
  --shadow-lift: 0 1px 2px oklch(0.22 0.04 285 / 0.08), 0 2px 8px oklch(0.22 0.04 285 / 0.08);

  --font-display: 'Plus Jakarta Sans', 'Jakarta Fallback', 'Segoe UI', Roboto, Arial, sans-serif;
  --font-text: var(--font-display);
  --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;

  /* Sizes in rem so they follow the reader's browser font size (1rem = 16px by default) */
  --type-display: 800 clamp(2rem, 1.3rem + 1.6vw, 2.75rem)/1.1 var(--font-display);
  --type-h1: 800 clamp(2rem, 1.5rem + 2vw, 2.75rem)/1.1 var(--font-display);
  --type-h2: 700 clamp(1.5rem, 1.2rem + 1.1vw, 2rem)/1.2 var(--font-display);
  --type-h3: 700 1.125rem/1.5rem var(--font-display);
  --type-amount: 600 1.875rem/2.375rem var(--font-display);
  --type-token: 600 1rem/1.5rem var(--font-display);
  --type-wordmark: 800 1.375rem/1 var(--font-display);
  --type-cta: 700 1.125rem/1.5rem var(--font-display);
  --type-lead: 500 1.125rem/1.75rem var(--font-text);
  --type-body: 400 1rem/1.5rem var(--font-text);
  --type-body-strong: 600 1rem/1.5rem var(--font-text);
  --type-ui: 500 0.9375rem/1.375rem var(--font-text);
  --type-ui-strong: 600 0.9375rem/1.375rem var(--font-text);
  --type-small: 500 0.8125rem/1.125rem var(--font-text);
  --type-small-strong: 600 0.8125rem/1.125rem var(--font-text);
  --type-mono: 400 0.8125rem/1.125rem var(--font-mono);
  --size-amount-sm: 1.75rem;
  --size-amount-xs: 1.375rem;
  --size-amount-2xs: 1.125rem;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Radius: 24 for the card and sheets, 16 for the wells and main button (card padding 8 → 24 − 8), 12 and 8 inside them */
  --r-1: 8px; --r-2: 12px; --r-3: 16px; --r-4: 24px;

  --band-h: 32px;
  --header-h: 80px;
  --max: 1120px;
  --gutter: var(--s-6);
  --panel-w: 480px;
  --flip-size: 40px;
  --target: 44px;
  --chip-h: 36px;
  --field-h: 48px;
  --row-h: 56px;
  --cta-h: 56px;
  --amount-h: 2.75rem;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-settle: cubic-bezier(0.3, 0, 0, 1);
  --t-press: 60ms;
  --t-hover: 150ms;
  --t-content: 180ms;
  --t-content-delay: 80ms;
  --t-page-out: 90ms;
  --t-page-gap: 40ms;
  --t-flip: 260ms;
  --t-sheet: 300ms;
  --t-sheet-exit: 200ms;
  --t-settle: 600ms;
  --t-enter: 500ms;
  --t-highlight: 600ms;
  --t-loader: 1100ms;
  --t-feedback: 1600ms;
  --t-reduced: 120ms;
}

@media (max-width: 599px) {
  :root {
    --type-amount: 600 1.625rem/2.125rem var(--font-display);
    --amount-h: 2.5rem;
    --size-amount-sm: 1.5rem;
    --size-amount-xs: 1.25rem;
    --size-amount-2xs: 1rem;
    --type-lead: 500 1rem/1.5rem var(--font-text);
    --header-h: 68px;
    --gutter: var(--s-4);
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--band-h) + var(--s-4)); }
body {
  margin: 0;
  padding-top: var(--band-h);
  background: var(--field);
  color: var(--text);
  font: var(--type-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
#app { display: flex; flex-direction: column; min-height: calc(100vh - var(--band-h)); }
h1, h2, h3, p, ul, ol, dl, dd, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: var(--text); text-decoration-color: var(--link-line); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: text-decoration-color var(--t-hover) var(--ease); }
@media (hover: hover) { a:hover { text-decoration-color: var(--text); } }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1:focus, h2:focus, h3:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: calc(var(--band-h) + var(--s-2)); left: var(--s-4); z-index: 60;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-2);
  background: var(--ink); color: var(--on-ink); font: var(--type-ui-strong);
  transform: translateY(-300px);
}
.skip-link:focus { transform: none; }

.num { font-variant-numeric: tabular-nums; }
.mono { font: var(--type-mono); font-variant-numeric: tabular-nums; }
.quiet { color: var(--text-quiet); }
.small { font: var(--type-small); }
.display { font: var(--type-display); }
.h1 { font: var(--type-h1); }
.h2 { font: var(--type-h2); }
.h3 { font: var(--type-h3); }
.lead { font: var(--type-lead); max-width: 36ch; }
.icon { flex: none; display: block; }
.small-head { font: var(--type-ui-strong); color: var(--text-quiet); }
.is-bad { color: var(--bad); }
.is-warn { color: var(--warn); }

/* Demo band: an ink strip above everything, sheets included */
.demo-band {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--band-h);
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--on-ink);
  font: var(--type-small-strong);
}

/* Header */
.site-header { position: relative; z-index: 5; background: var(--field); }
.site-header__inner {
  max-width: var(--max); margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex; align-items: center; gap: var(--s-6);
}
.wordmark {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font: var(--type-wordmark); letter-spacing: -0.02em; color: var(--violet); text-decoration: none;
  min-height: var(--target);
}
.site-nav { display: flex; gap: var(--s-1); }
.site-nav a {
  display: inline-flex; align-items: center; min-height: var(--target); padding-inline: var(--s-3);
  font: var(--type-ui-strong); color: var(--text); text-decoration: none; border-radius: var(--r-2);
  transition: background var(--t-hover) var(--ease);
}
@media (hover: hover) { .site-nav a:hover { background: var(--hover); } }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; text-decoration-color: var(--text); }
.site-header__wallet { margin-left: auto; }
.wallet-btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: var(--target); padding-inline: var(--s-4);
  border-radius: var(--r-2); background: var(--card); box-shadow: var(--shadow-lift);
  transition: background var(--t-hover) var(--ease);
}
@media (hover: hover) { .wallet-btn:hover { background: var(--well-hover); } }
.wallet-btn__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }

.icon-btn.menu-btn { display: none; }
.menu-list { gap: 0; padding-top: var(--s-2); }
.menu-list a { display: flex; align-items: center; min-height: var(--row-h); font: var(--type-h3); text-decoration: none; }
@media (hover: hover) { .menu-list a:hover { text-decoration: underline; } }

/* Buttons. --accent and --on-accent come from the surface the button sits on. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--target); padding-inline: var(--s-5);
  border-radius: var(--r-2);
  font: var(--type-ui-strong); text-decoration: none; white-space: nowrap;
  transition: background var(--t-hover) var(--ease), color var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease), transform var(--t-press) var(--ease);
}
.btn > span { display: inline-flex; align-items: center; gap: var(--s-2); }
.btn:active:not(:disabled, [aria-disabled="true"]) { transform: scale(0.98); }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
@media (hover: hover) { .btn--primary:hover:not(:disabled, [aria-disabled="true"]) { background: var(--accent-hover); } }
.btn--primary:active:not(:disabled, [aria-disabled="true"]) { background: var(--accent-pressed); }
.btn--primary:disabled, .btn--primary[aria-disabled="true"] { background: var(--hover); color: var(--text-quiet); }
.btn--secondary { background: var(--well); color: var(--text); }
.site-header .btn--secondary, .page .btn--secondary, .demo-wallet .btn--secondary { background: var(--card); box-shadow: var(--shadow-lift); }
@media (hover: hover) { .btn--secondary:hover:not(:disabled, [aria-disabled="true"]) { background: var(--well-hover); } }
.btn--secondary:disabled, .btn--secondary[aria-disabled="true"] { color: var(--text-quiet); box-shadow: none; }
.btn[aria-disabled="true"] { cursor: progress; }

.icon-btn {
  display: inline-grid; place-items: center; width: var(--target); height: var(--target); flex: none;
  border-radius: var(--r-2); color: var(--text);
  transition: background var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
@media (hover: hover) { .icon-btn:hover { background: var(--hover); } }
.icon-btn--small { width: 32px; height: 32px; position: relative; color: var(--text-quiet); }
.icon-btn--small::after { content: ""; position: absolute; inset: -6px; }
.icon-btn.is-done { color: var(--good); }
.icon-btn.is-done .icon { animation: pop-in var(--t-content) var(--ease) both; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.6); } }
.text-btn {
  font: var(--type-small-strong); color: var(--text); text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 2px; text-underline-offset: 3px;
  padding: var(--s-1) var(--s-2); margin: calc(var(--s-1) * -1) calc(var(--s-2) * -1) calc(var(--s-1) * -1) 0;
  border-radius: var(--r-1); position: relative;
}
.text-btn::after { content: ""; position: absolute; inset: -10px -8px; }

/* Press feedback for controls that aren't .btn */
.pressable { transition: transform var(--t-press) var(--ease), background var(--t-hover) var(--ease), color var(--t-hover) var(--ease); }
.pressable:active { transform: scale(0.97); }

/* The coinshift mark: two arrows circling a coin, violet straight on the page (no badge, no outline).
   kit.js spins the header logo twice, quickly, when a page opens and when it is pointed at or focused. */
.logo-mark { flex: none; display: block; overflow: visible; color: var(--violet); }
.logo-mark__coin { fill: var(--logo-coin); }
.logo-mark__spin { transform-box: view-box; transform-origin: 50px 50px; }
.wordmark.is-spinning .logo-mark__spin { animation: logo-spin-twice 1500ms cubic-bezier(0.65, 0, 0.35, 1); }
@keyframes logo-spin-twice { to { transform: rotate(720deg); } }
.loader { display: inline-flex; align-items: center; gap: var(--s-2); font: var(--type-small); color: var(--text-quiet); }

.token-mark {
  flex: none; display: inline-grid; place-items: center;
  border-radius: 50%; color: oklch(1 0 0);
  font-family: var(--font-display); font-weight: 700; line-height: 1;
}
.token-mark--logo { object-fit: cover; outline: 1px solid var(--line-logo); outline-offset: -1px; }

/* Notices: plain text with an icon, no tinted boxes */
.notice { display: flex; gap: var(--s-2); font: var(--type-ui); align-items: flex-start; }
.notice .icon { margin-top: 3px; }
.notice--warn .icon { color: var(--warn); }
.notice--bad .icon { color: var(--bad); }
.notice--good .icon { color: var(--good); }

/* Cost list */
.costs { display: grid; gap: var(--s-3); font: var(--type-ui); }
.costs__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); }
.costs__row dt { color: var(--text-quiet); flex: none; }
.costs__row dd { text-align: right; min-width: 0; overflow-wrap: anywhere; font-weight: 500; transition: color var(--t-highlight) var(--ease), opacity var(--t-hover) var(--ease); }
.costs__pending { color: var(--text-quiet); }
.reveal.is-pending dd { opacity: 0.6; }
.costs__row.is-warn dd { color: var(--warn); }
.costs__row.is-bad dd { color: var(--bad); }
.costs__row.is-changed dd, .pair-line__side.is-changed .num { text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.costs__link { color: inherit; text-decoration-style: dotted; text-decoration-thickness: 1px; }
.reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-sheet) var(--ease), opacity var(--t-flip) var(--ease); opacity: 0; }
.reveal[data-open="true"] { grid-template-rows: 1fr; opacity: 1; }
.reveal__inner { overflow: hidden; min-height: 0; }
.reveal__inner > .costs { padding-top: var(--s-3); }

/* Banners (pages only; the home panel carries its own notices) */
.banners { background: var(--field); }
.banners__inner { max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter) var(--s-3); }
.banner { display: flex; gap: var(--s-2); align-items: flex-start; font: var(--type-ui-strong); }
.banner .icon { margin-top: 3px; }

.main { flex: 1; }

/* Hero: one sentence over the swap card, with the network's tokens drifting at either side */
.hero { position: relative; overflow: hidden; background: var(--field); }
.hero__inner {
  position: relative; z-index: 1;
  max-width: var(--max); margin-inline: auto;
  padding: var(--s-6) var(--gutter) var(--s-9);
  display: grid; justify-items: center; text-align: center;
  pointer-events: none; /* the tokens behind stay clickable */
}
.hero__inner > * { pointer-events: auto; }
.hero__copy { display: grid; justify-items: center; }
.hero__inner .display { max-width: 24ch; }
.hero--enter .panel { animation: card-in var(--t-enter) var(--ease-settle) backwards; }
.hero__inner .lead { margin-top: var(--s-3); color: var(--text-quiet); max-width: 40ch; text-wrap: balance; }
.hero__panel { position: relative; isolation: isolate; width: 100%; max-width: var(--panel-w); margin-top: var(--s-5); text-align: left; }

.floaters { position: absolute; inset: 0 0 auto 0; height: 720px; max-width: 1440px; margin-inline: auto; pointer-events: none; }
.floater {
  position: absolute; translate: -50% -50%; pointer-events: auto; border-radius: 50%;
  animation: floater-in var(--t-enter) var(--ease-settle) calc(var(--i) * 70ms + 120ms) backwards;
  /* Leans away from the pointer (Floaters sets --px and --py from -1 to 1) */
  transform: translate(calc(var(--px, 0) * var(--depth, 0px) * -1), calc(var(--py, 0) * var(--depth, 0px) * -1));
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes floater-in { from { opacity: 0; scale: 0.6; } }
.floater__bob {
  position: relative; display: grid; place-items: center; padding: var(--s-1); border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow-card);
  animation: bob 2.4s ease-in-out var(--d) 2; /* drifts as it arrives, then rests; hover answers after that */
  transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.floater.is-current .floater__bob { box-shadow: 0 0 0 2px var(--accent), var(--shadow-card); }
.floater__tag {
  position: absolute; top: calc(100% + var(--s-2)); left: 50%; translate: -50% 0;
  color: var(--text); font: var(--type-small-strong); white-space: nowrap;
  opacity: 0; transition: opacity var(--t-hover) var(--ease); pointer-events: none;
}
@media (hover: hover) {
  .floater:hover .floater__bob { transform: scale(1.1) rotate(-6deg); }
  .floater:hover .floater__tag { opacity: 1; }
}
.floater:active .floater__bob { transform: scale(0.96); }
@media (max-width: 1099px) { .floater:nth-child(2), .floater:nth-child(5) { display: none; } .floater { scale: 0.8; } }
@media (max-width: 767px) { .floaters { display: none; } }

/* Network dropdown: a bar that opens a searchable list */
.netpick { position: relative; flex: 1; min-width: 0; }
.netpick__bar {
  width: 100%; display: flex; align-items: center; gap: var(--s-2);
  height: var(--target); padding: 0 var(--s-3) 0 var(--s-3);
  border-radius: var(--r-2); background: var(--well); color: var(--text); text-align: left;
}
@media (hover: hover) { .netpick__bar:hover { background: var(--well-hover); } }
.netpick.is-open .netpick__bar { background: var(--well-hover); }
.netpick__name { flex: 1; font: var(--type-ui-strong); }
.netpick__bar > .icon { color: var(--text-quiet); transition: transform var(--t-hover) var(--ease); }
.netpick.is-open .netpick__bar > .icon { transform: rotate(180deg); }
.netpick__pop {
  position: absolute; z-index: 20; top: calc(100% + var(--s-2)); left: 0; right: 0;
  display: grid; gap: var(--s-2); padding: var(--s-2);
  border-radius: var(--r-3); background: var(--card); box-shadow: var(--shadow-sheet);
  animation: pop var(--t-content) var(--ease) both; transform-origin: top center;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.netpick__pop:focus { outline: none; }
.netpick__search { margin-inline: 0; height: var(--field-h); border-radius: var(--r-1); }
.netpick__list { display: grid; gap: var(--s-1); }
.netpick__opt { display: flex; align-items: center; gap: var(--s-3); min-height: var(--row-h); padding: var(--s-2); border-radius: var(--r-1); cursor: pointer; }
.netpick__opt.is-active { background: var(--well-hover); }
.netpick__pop.is-keyed .netpick__opt.is-active { outline: 2px solid var(--focus); outline-offset: -2px; }
.netpick__opt[aria-selected="true"] .icon { color: var(--accent); }
.netpick__opt-id { flex: 1; display: grid; min-width: 0; }
.netpick__opt-name { font: var(--type-ui-strong); }
.netpick__opt-sub { font: var(--type-small); color: var(--text-quiet); }
.netpick__empty { padding: var(--s-3) var(--s-2) var(--s-4); font: var(--type-ui); color: var(--text-quiet); }
.net-icon { flex: none; display: block; border-radius: 50%; }
img.net-icon { outline: 1px solid var(--line-logo); outline-offset: -1px; }

/* The swap card: two wells and one button */
.panel {
  display: grid; gap: var(--s-2); min-width: 0;
  padding: var(--s-2); border-radius: var(--r-4);
  background: var(--card); box-shadow: var(--shadow-card);
}
@keyframes card-in { from { opacity: 0; transform: translateY(var(--s-3)); } }
.panel__top { display: flex; align-items: center; gap: var(--s-1); }
.panel__notices { display: grid; gap: var(--s-2); }
.panel__notices:empty { display: none; }
.panel__costs, .panel__notices { padding-inline: var(--s-3); }
.panel__costs { padding-block: var(--s-2); }
.panel__costs .costs { gap: var(--s-2); }
.panel__costs .reveal__inner > .costs { padding-top: var(--s-2); }
.panel__inflight { font: var(--type-small); text-align: center; color: var(--text-quiet); padding-bottom: var(--s-2); }
.panel__cta { height: var(--cta-h); border-radius: var(--r-3); font: var(--type-cta); }
.panel__after .reveal__inner > .costs { padding: var(--s-1) var(--s-3) var(--s-2); gap: var(--s-2); font: var(--type-small); }

/* The two wells. Flipping the pair slides them past each other. */
.fields { position: relative; display: grid; gap: var(--s-1); }
.field {
  border-radius: var(--r-3); background: var(--well);
  padding: var(--s-4); display: grid; gap: var(--s-2); min-width: 0;
  transition: background var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}
.field:has(.amount:focus) { background: var(--card); box-shadow: inset 0 0 0 1px var(--line-control); }
.field:has(.amount:focus-visible) { box-shadow: inset 0 0 0 2px var(--focus); }
.fields.is-flipping .field { transition: transform var(--t-flip) var(--ease); }
.fields.is-flipping .field--pay { transform: translateY(calc(100% + var(--s-1))); }
.fields.is-flipping .field--receive { transform: translateY(calc(-100% - var(--s-1))); }
.fields.is-flipping .field__top, .fields.is-flipping .field__meta { opacity: 0; }
.field__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); font: var(--type-small); color: var(--text-quiet); min-height: 1.25rem; transition: opacity var(--t-hover) var(--ease); }
.field__label { font: var(--type-small-strong); color: var(--text); white-space: nowrap; }
.field__balance { display: inline-flex; gap: var(--s-2); align-items: baseline; text-align: right; }
.field__row { display: flex; align-items: center; gap: var(--s-3); min-height: var(--amount-h); min-width: 0; }
.field__meta { transition: opacity var(--t-hover) var(--ease); display: flex; justify-content: space-between; gap: var(--s-3); font: var(--type-small); color: var(--text-quiet); min-height: 1.125rem; }
.field__worth { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amount {
  flex: 1; min-width: 0; width: 100%;
  background: none; border: 0; outline: none; padding: 0;
  font: var(--type-amount); font-variant-numeric: tabular-nums; text-align: left;
  color: var(--text); caret-color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: opacity var(--t-hover) var(--ease);
}
input.amount { height: var(--amount-h); }
.amount::placeholder, .amount__placeholder { color: var(--text-quiet); opacity: 0.75; }
.amount--sm { font-size: var(--size-amount-sm); }
.amount--xs { font-size: var(--size-amount-xs); }
.amount--2xs { font-size: var(--size-amount-2xs); }
.amount--out { display: block; }
.amount--out .logo-mark { vertical-align: middle; }
.amount--out.is-pending { opacity: 0.55; }
.token-btn {
  flex: none; display: inline-flex; align-items: center; gap: var(--s-2);
  height: var(--chip-h); padding: 0 var(--s-2) 0 var(--s-1);
  border-radius: var(--r-1); background: var(--card); color: var(--text); box-shadow: var(--shadow-lift);
  font: var(--type-token);
}
@media (hover: hover) { .token-btn:hover { background: var(--well-hover); } }
.token-btn, .costs__link { position: relative; }
.token-btn::after { content: ""; position: absolute; inset: -4px 0; }
.costs__link::after { content: ""; position: absolute; inset: -12px -8px; }
.flip-btn::after { content: ""; position: absolute; inset: -2px; }
.token-btn .icon { color: var(--text-quiet); }
.flip-btn {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: var(--flip-size); height: var(--flip-size); margin: calc(var(--flip-size) / -2) 0 0 calc(var(--flip-size) / -2);
  display: grid; place-items: center;
  border-radius: var(--r-2); background: var(--well); color: var(--text);
  box-shadow: 0 0 0 var(--s-1) var(--card);
}
@media (hover: hover) { .flip-btn:hover { background: var(--well-strong); } }
.flip-btn .icon { transition: transform var(--t-flip) var(--ease); }
.flip-btn.is-spun .icon { transform: rotate(180deg); }

/* Sheets */
dialog.sheet {
  --sheet-pad-top: clamp(var(--s-6), 10vh, var(--s-9));
  --sheet-max: calc(100vh - var(--band-h) - var(--sheet-pad-top) - var(--s-5));
  position: fixed; inset: var(--band-h) 0 0 0;
  width: 100%; height: calc(100% - var(--band-h)); max-width: none; max-height: none;
  margin: 0; padding: var(--sheet-pad-top) var(--s-5) var(--s-5); border: 0; background: transparent; color: var(--text);
  overflow: hidden;
}
@supports (height: 100dvh) {
  dialog.sheet { --sheet-max: calc(100dvh - var(--band-h) - var(--sheet-pad-top) - var(--s-5)); }
}
/* Anchored from the top on desktop, so a sheet that grows only grows downward */
dialog.sheet[open] { display: grid; place-items: start center; }
dialog.sheet::backdrop { inset: var(--band-h) 0 0 0; background: var(--scrim); opacity: 0; transition: opacity var(--t-sheet) var(--ease); }
dialog.sheet[data-phase="in"]::backdrop { opacity: 1; }
/* The surface clips; the inner column keeps its natural height, so content is never squeezed while the surface resizes */
.sheet__body {
  width: 100%; max-width: var(--panel-w); max-height: var(--sheet-max);
  background: var(--paper-raised); border-radius: var(--r-4); box-shadow: var(--shadow-sheet);
  opacity: 0; transform: translateY(var(--s-4)) scale(0.985);
  transition: transform var(--t-sheet) var(--ease), opacity var(--t-flip) var(--ease);
  overflow: hidden;
}
.sheet__inner { display: flex; flex-direction: column; max-height: var(--sheet-max); }
dialog.sheet[data-phase="in"] .sheet__body { opacity: 1; transform: none; }
/* Leaving is quicker than arriving, and accelerates away */
dialog.sheet[data-phase="out"] .sheet__body,
dialog.sheet[data-phase="out"]::backdrop { transition-duration: var(--t-sheet-exit); transition-timing-function: var(--ease-exit); }
/* One sheet replacing another: the scrim and the surface stay, the surface changes shape, and only the content steps in */
dialog.sheet.is-handover::backdrop { transition: none; opacity: 1; }
dialog.sheet.is-handover .sheet__body { opacity: 1; transform: none; transition: none; }
dialog.sheet.is-handover[data-phase="out"] .sheet__inner { opacity: 0; transform: translateX(var(--s-3)); }
dialog.sheet.is-handover[data-phase="in"] .sheet__inner { transition: opacity var(--t-content) var(--ease) var(--t-content-delay), transform var(--t-content) var(--ease) var(--t-content-delay); }
/* Content that replaces other content inside an open sheet fades up into place */
.swap-in { animation: swap-in var(--t-content) var(--ease) var(--t-content-delay) both; }
@keyframes swap-in { from { opacity: 0; transform: translateY(var(--s-1)); } }
.sheet__head { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-4) var(--s-4) 0 var(--s-5); min-height: 60px; flex: none; }
.sheet__head h2 { font: var(--type-h3); flex: 1; }
.sheet__head .icon-btn:first-child { margin-left: calc(var(--s-3) * -1); }
.sheet__close { margin-left: auto; }
/* Status sheets carry their own heading, so the close button floats in the corner */
.sheet--bare .sheet__body { position: relative; }
.sheet--bare .sheet__head { position: absolute; top: var(--s-4); right: var(--s-4); min-height: 0; padding: 0; z-index: 1; }
.sheet--bare .sheet__content { padding-top: var(--s-5); }
.sheet--bare .sheet__close { margin: 0; }
.sheet--bare .status__line { padding-right: var(--s-7); }
.sheet__content { padding: var(--s-4) var(--s-5) var(--s-5); display: grid; gap: var(--s-4); overflow-y: auto; overscroll-behavior: contain; font: var(--type-ui); align-content: start; min-height: 0; }
.sheet__content--list { padding-inline: var(--s-3); padding-bottom: var(--s-3); grid-template-rows: auto; }
.sheet__actions { padding: var(--s-2) var(--s-5) var(--s-5); display: grid; gap: var(--s-3); flex: none; }
.sheet__actions .btn { height: var(--field-h); }
.sheet__actions--row { grid-template-columns: 1fr 1fr; }
.sheet__actions--split { gap: var(--s-2); }
.sheet__buttons { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); }
.hold { font: var(--type-small); color: var(--text-quiet); }
.hold.is-expired { color: var(--warn); }
.delta { color: var(--text); }

@media (max-width: 599px) {
  dialog.sheet { --sheet-pad-top: var(--s-5); padding: 0; }
  dialog.sheet[open] { place-items: end stretch; }
  /* Bottom-anchored, so when the surface changes height its top edge glides */
  .sheet__body {
    max-width: none;
    border-radius: var(--r-4) var(--r-4) 0 0;
    transform: translateY(100%); opacity: 1;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transition: transform var(--t-sheet) var(--ease);
  }
  .sheet__inner { max-height: calc(var(--sheet-max) - env(safe-area-inset-bottom, 0px)); }
}
@media (max-height: 500px) {
  .sheet__inner { overflow-y: auto; }
  .sheet__content { overflow: visible; flex: none; }
}

/* Sheet contents */
.wallet-group { display: grid; gap: var(--s-2); }
.wallet-list { display: grid; gap: var(--s-1); margin-inline: calc(var(--s-3) * -1); }
.wallet-row {
  width: 100%; display: flex; align-items: center; gap: var(--s-3);
  min-height: var(--row-h); padding: var(--s-2) var(--s-3); border-radius: var(--r-2); text-align: left;
}
@media (hover: hover) { .wallet-row:hover:not([aria-disabled]) { background: var(--hover); } }
.wallet-row[aria-disabled] { cursor: progress; }
.wallet-row__initial {
  width: var(--chip-h); height: var(--chip-h); display: grid; place-items: center; flex: none;
  border-radius: calc(var(--r-2) - var(--s-2)); background: var(--well-strong); color: var(--text);
  font: var(--type-h3);
}
.wallet-row__name { flex: 1; font: var(--type-ui-strong); }
.wallet-card { display: grid; gap: var(--s-1); }
.wallet-card__name { font: var(--type-ui-strong); }

.copy-text { display: inline-flex; align-items: center; gap: var(--s-1); max-width: 100%; }
.copy-text__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }

.search {
  display: flex; align-items: center; gap: var(--s-2);
  height: var(--field-h); padding-inline: var(--s-3); margin-inline: var(--s-2);
  border-radius: var(--r-2); background: var(--well); color: var(--text-quiet);
}
.search:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--text); font: var(--type-ui); }
.search input::-webkit-search-cancel-button { display: none; }
.recent { display: flex; gap: var(--s-2); flex-wrap: wrap; padding-inline: var(--s-2); }
.recent__chip {
  display: inline-flex; align-items: center; gap: var(--s-2); height: var(--chip-h); padding-inline: var(--s-2) var(--s-3);
  border-radius: var(--r-1); background: var(--hover); font: var(--type-ui-strong); position: relative;
}
.recent__chip::after { content: ""; position: absolute; inset: -4px 0; }
@media (hover: hover) { .recent__chip:hover { background: var(--hover-strong); } }
.token-list { display: grid; gap: var(--s-1); max-height: min(380px, 48vh); overflow-y: auto; overscroll-behavior: contain; }
.token-row {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: var(--row-h); padding: var(--s-2); border-radius: var(--r-2); cursor: pointer;
}
.token-row[aria-selected="true"] { background: var(--hover); }
.token-list.is-keyed .token-row[aria-selected="true"] { outline: 2px solid var(--focus); outline-offset: -2px; }
.token-row__check { width: 20px; flex: none; display: grid; place-items: center; }
.token-row__id { display: grid; flex: 1; min-width: 0; }
.token-row__sym { font: var(--type-ui-strong); }
.token-row__name { font: var(--type-small); color: var(--text-quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-row__bal { color: var(--text-quiet); }
.token-group { padding: var(--s-3) var(--s-2) var(--s-1); }
.token-empty { padding: var(--s-5) var(--s-2); color: var(--text-quiet); display: grid; gap: var(--s-3); justify-items: start; }

.risk-head { display: flex; align-items: center; gap: var(--s-3); }
.risk-head__name { font: var(--type-h3); }
.risk-list { display: grid; gap: var(--s-2); padding-left: var(--s-5); list-style: disc; }
.check { display: flex; gap: var(--s-3); align-items: flex-start; min-height: var(--target); padding-block: var(--s-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.check__hint { display: block; }

.slip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.slip__opt {
  min-height: var(--field-h); padding: var(--s-2); border-radius: var(--r-2);
  background: var(--well); font: var(--type-ui-strong);
  display: grid; justify-items: center; align-content: center;
}
.slip--two { grid-template-columns: 1fr 1fr; }
@media (hover: hover) { .slip__opt:hover { background: var(--hover); } }
.slip__opt[aria-checked="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.slip__opt[aria-checked="true"] .quiet { color: inherit; }
.slip__opt .quiet { font: var(--type-small); }
.text-field { display: grid; gap: var(--s-2); }
.text-field > label:not(.check) { font: var(--type-ui); color: var(--text-quiet); }
.text-field__box {
  display: flex; align-items: center; gap: var(--s-2); height: var(--field-h); padding-inline: var(--s-3);
  border-radius: var(--r-2); background: var(--well);
}
.text-field__box:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
.text-field__box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-variant-numeric: tabular-nums; }
.field-error { font: var(--type-small); color: var(--bad); }
.debug-set { display: grid; gap: var(--s-2); }
/* Demo controls are long: the whole sheet scrolls, button included */
#debug .sheet__inner { overflow-y: auto; }
#debug .sheet__content { overflow: visible; flex: none; }

.pair-line { display: grid; gap: var(--s-4); padding-bottom: var(--s-2); }
.pair-line__side { display: grid; gap: var(--s-1); }
.pair-line__amt { display: flex; align-items: center; gap: var(--s-2); font: 700 1.75rem/2.25rem var(--font-display); flex-wrap: wrap; }
.pair-line__sym { color: var(--text-quiet); }
.pair-line__amt--second { font: var(--type-h3); }
.steps-box { display: grid; gap: var(--s-2); }
.wallet-steps { display: grid; gap: var(--s-2); counter-reset: w; }
.wallet-steps li { counter-increment: w; display: grid; grid-template-columns: 24px 1fr; }
.wallet-steps li::before { content: counter(w); font-weight: 500; font-variant-numeric: tabular-nums; }
.wallet-steps li > * { grid-column: 2; }

.status { gap: var(--s-5); }
.status__line { display: flex; align-items: center; gap: var(--s-4); }
.status__title { font: var(--type-h3); }
.status__sentence { color: var(--text-quiet); font: var(--type-ui); }
.demo-wallet { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-3); background: var(--well); }
.demo-wallet__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); font: var(--type-ui-strong); }
.demo-wallet__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.receipt { display: grid; gap: var(--s-4); }
.receipt__sig { display: grid; gap: var(--s-1); }

/* Pages: a huge title, then the reading column */
.page { display: block; }
.page__head-inner { max-width: var(--max); margin-inline: auto; padding: var(--s-7) var(--gutter) 0; display: grid; gap: var(--s-4); justify-items: start; }
.page__head .lead { max-width: 44ch; }
.page__body { max-width: var(--max); margin-inline: auto; padding: var(--s-7) var(--gutter) var(--s-9); display: grid; gap: var(--s-7); align-content: start; }
.page__body > * { max-width: 720px; }
.prose section { display: grid; gap: var(--s-3); }
.prose section p, .prose section li, .page__body > p { color: var(--text-quiet); max-width: 60ch; }
.prose ul { list-style: disc; padding-left: var(--s-5); display: grid; gap: var(--s-2); }
.page .costs, .page .receipt { max-width: var(--panel-w); }
.back-link { font: var(--type-ui-strong); justify-self: start; display: inline-flex; align-items: center; min-height: var(--target); }
.empty { display: grid; gap: var(--s-4); justify-items: start; }
.confirm-row { display: grid; gap: var(--s-3); }
.confirm-row__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.activity { display: grid; gap: var(--s-1); margin-inline: calc(var(--s-3) * -1); }
.page__body > .activity { max-width: calc(720px + var(--s-3) * 2); }
.activity__row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto 112px; gap: var(--s-4); align-items: center;
  min-height: 72px; padding: var(--s-3); border-radius: var(--r-3);
  color: var(--text); text-decoration: none; font: var(--type-ui);
  transition: background var(--t-hover) var(--ease);
}
@media (hover: hover) { .activity__row:hover { background: var(--hover); } }
.activity__marks { display: flex; width: 52px; }
.activity__marks .token-mark + .token-mark { margin-left: calc(var(--s-2) * -1); box-shadow: 0 0 0 2px var(--field); }
.activity__pair, .activity__amounts { display: grid; min-width: 0; }
.activity__amounts { text-align: right; }
.activity__title { font: var(--type-h3); }
.state { font: var(--type-ui-strong); text-align: right; white-space: nowrap; }
.state--confirmed { color: var(--good); }
.state--failed { color: var(--bad); }
.state--expired, .state--rejected { color: var(--text-quiet); }
.state--pending, .state--submitted, .state--unknown, .state--unresolved { color: var(--warn); }

/* Footer */
.site-footer { background: var(--band); }
.site-footer__inner {
  max-width: var(--max); margin-inline: auto; padding: var(--s-7) var(--gutter) var(--s-8);
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-4) var(--s-6); font: var(--type-ui); align-items: center;
}
.site-footer__brand { grid-column: 1 / -1; font: var(--type-wordmark); letter-spacing: -0.02em; color: var(--violet); display: flex; align-items: center; gap: var(--s-2); padding-bottom: var(--s-3); }
.site-footer__links { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; margin-left: calc(var(--s-2) * -1); }
.site-footer__links a { display: inline-flex; align-items: center; min-height: var(--target); padding-inline: var(--s-2); }
.site-footer__contact { display: inline-flex; gap: var(--s-2); align-items: center; }
.site-footer__legal { grid-column: 1 / -1; max-width: 70ch; font: var(--type-small); }

/* Tablet */
@media (max-width: 959px) {
}
/* Phone: the card runs edge to edge inside the gutter */
@media (max-width: 599px) {
  .site-header__inner { gap: var(--s-2); }
  .site-nav { display: none; }
  .icon-btn.menu-btn { display: inline-grid; order: 3; margin-left: auto; }
  .site-header__inner:has(.site-header__wallet) .menu-btn { margin-left: 0; }
  .site-header .btn, .wallet-btn { padding-inline: var(--s-3); min-width: 0; }
  .hero__inner { padding-top: var(--s-4); padding-bottom: var(--s-7); }
  .hero__panel { margin-top: var(--s-4); }
  .field { padding: var(--s-3) var(--s-3) var(--s-4); }
  .panel__costs, .panel__notices { padding-inline: var(--s-2); }
  .page__head-inner { padding-block: var(--s-5) 0; }
  .page__body { padding-block: var(--s-6) var(--s-8); gap: var(--s-6); }
  .site-footer__inner { grid-template-columns: 1fr; }
  .activity__row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "marks pair amounts" "marks pair state"; row-gap: 0; column-gap: var(--s-3); }
  .activity__marks { grid-area: marks; }
  .activity__pair { grid-area: pair; }
  .activity__amounts { grid-area: amounts; }
  .activity__amounts .quiet { display: none; }
  .activity__row .state { grid-area: state; font: var(--type-small-strong); }
  .activity__title { font: var(--type-ui-strong); }
  .slip { grid-template-columns: repeat(2, 1fr); }
  .sheet__actions--row { grid-template-columns: 1fr; }
  .sheet__actions--row .btn--primary { order: -1; }
}
/* Very narrow screens: the mark stands in for the wordmark */
@media (max-width: 359px) {
  .site-header .wordmark__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Page changes: a short cross-fade. The demo band and header stay put. */
.demo-band { view-transition-name: demo-band; }
.site-header { view-transition-name: site-header; }
::view-transition-group(site-header), ::view-transition-old(site-header), ::view-transition-new(site-header) { animation-duration: var(--t-content); }
::view-transition-old(root) { animation: vt-out var(--t-page-out) var(--ease-exit) both; }
::view-transition-new(root) { animation: vt-in var(--t-content) var(--ease) var(--t-page-gap) both; }
::view-transition-group(demo-band) { animation: none; }
::view-transition-old(demo-band) { display: none; }
::view-transition-new(demo-band) { animation: none; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* Reduced motion: everything becomes a short fade; the loader holds still */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: var(--t-reduced) !important; transition-delay: 0s !important; transition-property: opacity, color, background-color !important; }
  dialog.sheet::backdrop { transition-duration: var(--t-reduced) !important; }
  .sheet__body { transform: none !important; opacity: 0; transition: opacity var(--t-reduced) linear !important; }
  dialog.sheet[data-phase="in"] .sheet__body, dialog.sheet.is-handover .sheet__body { opacity: 1; }
  .sheet__inner { transform: none !important; }
  .logo-mark__spin { animation: none !important; }
  .fields.is-flipping .field { transform: none; }
  .hero--enter .panel { animation: none; }
  .floater, .floater__bob { animation: none; transform: none; }
  .floater:hover .floater__bob, .floater:active .floater__bob { transform: none; }
  .btn:active:not(:disabled), .pressable:active { transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Legal: three long parts, each heading its own clauses; placeholders stand out until filled in */
.legal__part { display: grid; gap: var(--s-6); }
.legal__part + .legal__part { margin-top: var(--s-5); }
.legal__part > h2 { scroll-margin-top: var(--s-7); }
.legal__part > p { color: var(--text-quiet); max-width: 60ch; }
.legal__intro { display: grid; gap: var(--s-4); }
.legal__toc { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.legal__toc a { display: inline-flex; align-items: center; min-height: var(--target); font: var(--type-ui-strong); }
.legal strong { color: var(--text); font-weight: 600; }
.ph { color: var(--text); font-weight: 600; }

/* Explore, token pages, charts, and the pieces cross-chain swaps added to the card.
   Same tokens as the rest of the app: violet for the one accent and every chart line,
   green and red only for the up and down figures. */

/* A token's network, as a small mark on its logo */
.token-badged { position: relative; display: inline-block; flex: none; }
.token-badged > .token-mark { width: 100%; height: 100%; }
.token-badged__net { position: absolute; right: -3px; bottom: -3px; display: block; border-radius: 50%; box-shadow: 0 0 0 2px var(--card); }

/* Card header: where the swap starts, and where it lands when that's another network */
.panel__route { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-2); height: var(--target); padding-inline: var(--s-3); font: var(--type-ui-strong); }
.panel__route-net { display: inline-flex; align-items: center; gap: var(--s-2); white-space: nowrap; }
.panel__route-net--to { animation: route-in var(--t-content) var(--ease) both; }
.panel__route-net--to > .icon { color: var(--text-quiet); }
.panel__route-on { color: var(--text-quiet); font-weight: 500; }
@keyframes route-in { from { opacity: 0; transform: translateX(-6px); } }

/* Header wallet: one icon per connected network */
.wallet-btn__nets { display: inline-flex; }
.wallet-btn__nets .net-icon + .net-icon { margin-left: -6px; box-shadow: 0 0 0 2px var(--card); }
.wallet-group + .wallet-group { margin-top: var(--s-4); }
.wallet-group__head { display: flex; align-items: center; gap: var(--s-2); }
.wallet-group__head:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--r-1); }
.wallet-group > .wallet-card { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-3); background: var(--well); }
.wallet-card__id { flex: 1; display: grid; min-width: 0; }
.pair-line__about { font: var(--type-ui); color: var(--text-quiet); }
.review-terms { display: grid; gap: var(--s-2); }
.recent__net { font: var(--type-small); color: var(--text-quiet); }

/* Token sheet: search next to the network filter */
.token-tools { display: flex; gap: var(--s-2); margin-inline: var(--s-2); min-width: 0; }
.token-tools .search { flex: 1; margin: 0; min-width: 0; }
.netpick--tool { flex: none; }
.netpick--tool .netpick__bar { width: auto; height: var(--field-h); padding-inline: var(--s-3); }
.netpick--tool .netpick__name { white-space: nowrap; }
.netpick--tool .netpick__pop { left: auto; right: 0; width: min(300px, calc(100vw - 2 * var(--s-4))); }
@media (max-width: 479px) { .token-tools .netpick__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }

/* Up and down */
.chg { display: inline-flex; align-items: center; gap: 4px; font: var(--type-ui-strong); white-space: nowrap; }
.chg--up { color: var(--good); }
.chg--down { color: var(--bad); }
.chg--flat { color: var(--text-quiet); }
.chg__arrow { fill: currentColor; flex: none; }

/* Sparklines: drawn left to right as each one scrolls into view */
.spark-box { display: block; width: 100%; min-width: 0; }
.spark { display: block; overflow: visible; }
.spark__line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width var(--t-hover) var(--ease); }
.spark__area { fill: var(--accent); opacity: 0.08; transition: opacity var(--t-hover) var(--ease); }
.spark__dot { fill: var(--accent); }
/* Entrances: an element waits unseen, plays once as it scrolls in, then simply stays (see useEnter) */
[data-enter="wait"] { opacity: 0; }
[data-enter="play"] { --at: calc(var(--ei, 0) * 60ms); animation: rise 520ms var(--ease-settle) var(--at) backwards; }
[data-enter="play"] .spark__line { animation: spark-draw 900ms var(--ease-settle) calc(var(--at) + 120ms) backwards; }
[data-enter="play"] .spark__area { animation: fade-in 600ms var(--ease) calc(var(--at) + 420ms) backwards; }
[data-enter="play"] .spark__dot { animation: dot-in 320ms var(--ease-settle) calc(var(--at) + 900ms) backwards; transform-box: fill-box; transform-origin: center; }
@keyframes spark-draw { from { stroke-dasharray: 1 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1 1; stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes dot-in { from { transform: scale(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Explore hero: one line of type with tokens drifting either side */
.main--explore { background: var(--field); }
.xhero { position: relative; overflow: hidden; }
.floaters--explore { height: auto; inset: 0; }
.floaters--explore .floater__tag { font: var(--type-small-strong); }
.floater__net { color: var(--text-quiet); font-weight: 500; }
.xhero__inner {
  position: relative; z-index: 1; max-width: var(--max); margin-inline: auto;
  padding: var(--s-8) var(--gutter) var(--s-7);
  display: grid; justify-items: center; text-align: center; pointer-events: none;
}
.xhero__inner > * { pointer-events: auto; }
.xhero__inner .display { text-wrap: balance; }
.xhero__inner .lead { margin-top: var(--s-3); color: var(--text-quiet); max-width: 38ch; text-wrap: balance; }
.xhero__note { margin-top: var(--s-3); font: var(--type-small); color: var(--text-quiet); }
.xhero__inner > * { animation: rise 560ms var(--ease-settle) backwards; }
.xhero__inner > :nth-child(2) { animation-delay: 60ms; }
.xhero__inner > :nth-child(3) { animation-delay: 120ms; }

.xbody { max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter) var(--s-9); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
.xsection-title { font: 700 1.375rem/1.75rem var(--font-display); text-wrap: balance; }

/* Biggest moves: four cards, each a link to the token's page */
.movers__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
.mover {
  display: grid; gap: var(--s-3); height: 100%; padding: var(--s-4) var(--s-4) var(--s-3);
  border-radius: var(--r-4); background: var(--card); box-shadow: var(--shadow-card);
  color: var(--text); text-decoration: none;
}
.mover .spark { width: 100%; height: auto; min-width: 0; }
.movers__list > li { min-width: 0; }
.mover__id { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.mover__name { display: grid; min-width: 0; }
.mover__sym { font: var(--type-ui-strong); }
.mover__sub { font: var(--type-small); color: var(--text-quiet); }
.mover__figs { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; }
.mover__price { font: 700 1.25rem/1.5rem var(--font-display); }
@media (hover: hover) {
  .mover:hover .spark__line { stroke-width: 2.75; }
  .mover:hover .spark__area { opacity: 0.16; }
}
.mover:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Tokens: filters, then the table */
.tokens, .movers { min-width: 0; }
.tokens__head { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); margin-bottom: var(--s-4); }
.tokens__titlebar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
/* The sort menu, for widths where some columns (and their sort buttons) are hidden */
.sort-pick { position: relative; display: none; align-items: center; color: var(--text-quiet); }
.sort-pick__select {
  appearance: none; -webkit-appearance: none; height: var(--target); padding: 0 calc(var(--s-3) + 20px) 0 var(--s-3);
  border: 0; border-radius: var(--r-2); background: var(--card); box-shadow: var(--shadow-lift);
  font: var(--type-ui-strong); color: var(--text); cursor: pointer;
}
.sort-pick__select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sort-pick > .icon { position: absolute; right: var(--s-3); pointer-events: none; }
.tokens__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); min-width: 0; }
.tokens__filters { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.search--tool { margin: 0; width: 220px; height: var(--field-h); background: var(--card); box-shadow: var(--shadow-lift); }
.tokens__filters .netpick__bar { background: var(--card); box-shadow: var(--shadow-lift); }
@media (hover: hover) { .tokens__filters .netpick__bar:hover { background: var(--well); } }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; max-width: 100%; padding: 3px; border-radius: var(--r-2); background: var(--well-hover); }
.seg__btn {
  flex: none; height: var(--target); padding-inline: var(--s-3); border-radius: calc(var(--r-2) - 3px);
  font: var(--type-ui-strong); color: var(--text-quiet);
  transition: background var(--t-hover) var(--ease), color var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}
@media (hover: hover) { .seg__btn:hover:not(.is-on) { color: var(--text); } }
.seg__btn.is-on { background: var(--card); color: var(--text); box-shadow: var(--shadow-lift); }
.seg__btn:focus-visible { outline-offset: -2px; }

.xtable-wrap { padding: var(--s-2); border-radius: var(--r-4); background: var(--card); box-shadow: var(--shadow-card); overflow: hidden; }
/* Fixed columns, so figures stay put when a tab or filter changes which rows show */
.xtable { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font: var(--type-ui); }
.xtable thead th { height: var(--target); padding: 0 var(--s-3); font: var(--type-small-strong); color: var(--text-quiet); text-align: right; white-space: nowrap; }
.xtable thead .xtable__token { text-align: left; }
.xtable thead .xtable__price { width: 136px; }
.xtable thead .xtable__h1, .xtable thead .xtable__d1 { width: 104px; }
.xtable thead .xtable__vol { width: 112px; }
.xtable thead .xtable__chart { width: 168px; }
.xtable__num { text-align: right; white-space: nowrap; }
.xtable__chart .spark { margin-left: auto; }
.xtable__mlabel { display: none; }
/* The whole header cell is the sort button */
.xtable thead .xtable__sort { padding: 0; }
.sort-btn { width: 100%; height: var(--target); display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; padding-inline: var(--s-3); border-radius: var(--r-2); font: inherit; color: inherit; }
@media (hover: hover) { .sort-btn:hover { color: var(--text); } }
.sort-btn.is-on { color: var(--text); }
.sort-btn__arrow { fill: currentColor; transition: rotate var(--t-hover) var(--ease); }
.sort-btn__arrow.is-asc { rotate: 180deg; }

.xrow { cursor: pointer; }
.xrow > th, .xrow > td { height: 68px; padding: var(--s-2) var(--s-3); vertical-align: middle; text-align: right; font-weight: 500; transition: background var(--t-hover) var(--ease); }
.xrow > .xtable__token { text-align: left; }
.xrow > :first-child { border-radius: var(--r-3) 0 0 var(--r-3); }
.xrow > :last-child { border-radius: 0 var(--r-3) var(--r-3) 0; }
@media (hover: hover) {
  .xrow:hover > * { background: var(--well); }
  .xrow:hover .spark__line { stroke-width: 2.75; }
}
.xrow__link { display: flex; align-items: center; gap: var(--s-3); min-width: 0; color: var(--text); text-decoration: none; }
.xrow__link:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--r-1); }
.xrow__id { display: grid; min-width: 0; }
.xrow__name { font: var(--type-ui-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xrow__sub { font: var(--type-small); color: var(--text-quiet); white-space: nowrap; }
.xtable__empty { padding: var(--s-6) var(--s-4); text-align: center; color: var(--text-quiet); }
.explore--intro .xrow { animation: rise 520ms var(--ease-settle) calc(var(--i) * 40ms + 220ms) backwards; }

/* Token page: price and chart on the left, the swap card on the right */
.tpage__inner { max-width: var(--max); margin-inline: auto; padding: var(--s-4) var(--gutter) var(--s-9); }
.back-link { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--target); font: var(--type-ui-strong); color: var(--text-quiet); text-decoration: none; }
@media (hover: hover) { .back-link:hover { color: var(--text); } }
.tpage__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--panel-w); grid-template-areas: "main swap" "more swap";
  column-gap: var(--s-7); align-items: start; margin-top: var(--s-3);
}
.tpage__main { grid-area: main; }
.tpage__swap { grid-area: swap; }
.tpage__more { grid-area: more; }
.tpage__main { min-width: 0; }
.tpage__head { display: flex; align-items: center; gap: var(--s-3); animation: rise var(--t-enter) var(--ease-settle) backwards; }
.tpage__title { font: var(--type-h2); text-wrap: balance; }
.tpage__sub { font: var(--type-ui); color: var(--text-quiet); }
.tpage__price { display: grid; gap: var(--s-1); margin-top: var(--s-5); animation: rise var(--t-enter) var(--ease-settle) 70ms backwards; }
.tpage__value { font: 800 clamp(2.25rem, 1.7rem + 1.8vw, 3.25rem)/1.1 var(--font-display); }
.tpage__chg { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); font: var(--type-ui); }
.tpage__swap { position: sticky; top: var(--s-5); }
.tpage__note { margin-top: var(--s-5); font: var(--type-small); color: var(--text-quiet); }

.pchart { position: relative; height: 320px; margin-top: var(--s-4); touch-action: pan-y; cursor: crosshair; border-radius: var(--r-2); user-select: none; -webkit-user-select: none; }
.pchart:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; }
/* Until a real chart arrives: a quiet box of the same height, so nothing jumps. */
.pchart-slot:empty, .pchart__empty { height: 320px; margin-top: var(--s-4); border-radius: var(--r-2); background: var(--well); }
.pchart-slot:empty { animation: pulse 1.4s var(--ease) infinite; }
.pchart__empty { display: grid; place-content: center; justify-items: center; gap: var(--s-3); padding: var(--s-4); font: var(--type-small); color: var(--text-quiet); text-align: center; }
.pchart__empty .btn { height: var(--target); }
.pchart__svg { display: block; overflow: visible; }
.pchart__line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.pchart__area { fill: var(--accent); opacity: 0.08; }
.pchart__draw { animation: chart-reveal 1100ms var(--ease-settle) 150ms backwards; }
@keyframes chart-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.pchart__base { stroke: var(--text-quiet); stroke-width: 1.25; stroke-dasharray: 3 5; }
.pchart__hover line { stroke: var(--text-quiet); stroke-width: 1; }
.pchart__hover circle { fill: var(--accent); stroke: var(--card); stroke-width: 3; }
.pchart__now { fill: var(--accent); stroke: var(--card); stroke-width: 2; animation: dot-in 360ms var(--ease-settle) 1150ms backwards; transform-box: fill-box; transform-origin: center; }
.pchart__time { position: absolute; top: 0; translate: -50% 0; font: var(--type-small-strong); color: var(--text-quiet); white-space: nowrap; pointer-events: none; }

.ranges { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(100%, 320px); margin-top: var(--s-4); padding: 4px; border-radius: var(--r-2); background: var(--well-hover); }
.ranges__thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n));
  translate: calc(var(--k) * 100%) 0; border-radius: var(--r-1); background: var(--card); box-shadow: var(--shadow-lift);
  transition: translate 320ms var(--ease);
}
.ranges__btn { position: relative; z-index: 1; height: var(--target); border-radius: var(--r-1); font: var(--type-ui-strong); color: var(--text-quiet); transition: color var(--t-hover) var(--ease); }
.ranges__btn.is-on { color: var(--text); }
.ranges__btn:focus-visible { outline-offset: -2px; }

.tstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); margin-top: var(--s-6); }
.tstats dt { font: var(--type-small); color: var(--text-quiet); }
.tstats dd { margin-top: 2px; font: var(--type-ui-strong); min-width: 0; }
.tstats__twins { font: var(--type-small); margin-left: var(--s-1); }
.tstats__twin { display: inline-flex; align-items: center; min-height: var(--target); }

/* Tablet */
@media (max-width: 1099px) {
  .floaters--explore .floater:nth-child(3), .floaters--explore .floater:nth-child(6) { display: none; }
}
@media (max-width: 959px) {
  .movers__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xtable__vol { display: none; }
  .sort-pick { display: inline-flex; }
  /* One column: price and chart, then the card, then the details */
  .tpage__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "swap" "more"; row-gap: var(--s-6); }
  .tstats { margin-top: 0; }
  .tpage__swap { position: static; max-width: var(--panel-w); width: 100%; justify-self: center; }
}
@media (max-width: 767px) {
  .xtable__h1 { display: none; }
  .tokens__filters { width: 100%; flex-wrap: nowrap; }
  .search--tool { flex: 1; width: auto; min-width: 0; }
  /* The picker sits at the left here, so its list opens to the right */
  .tokens__filters .netpick__pop { left: 0; right: auto; }
}
/* Phone */
@media (max-width: 599px) {
  .xhero__inner { padding-block: var(--s-6) var(--s-5); }
  .xbody { gap: var(--s-6); }
  .movers__list { gap: var(--s-2); }
  .mover { padding: var(--s-3) var(--s-3) var(--s-2); border-radius: var(--r-3); }
  .mover__price { font-size: 1.0625rem; }
  .xtable-wrap { padding: var(--s-1); }
  .xrow > th, .xrow > td { padding: var(--s-2); height: 64px; }
  .xtable thead th { padding-inline: var(--s-2); }
  .sort-btn { padding-inline: var(--s-2); }
  .xtable thead .xtable__d1 { width: 104px; }
  .xtable thead .xtable__chart { width: 80px; }
  .xrow__link { gap: var(--s-2); }
  .xrow__link .token-badged { width: 32px !important; height: 32px !important; }
  .xtable__mlabel { display: inline; }
  .xrow__link { overflow: hidden; }
  .xrow__name, .xrow__sub { overflow: hidden; text-overflow: ellipsis; }
  /* Tabs share the row evenly; the network picker shows just its icon */
  .seg { display: flex; width: 100%; }
  .seg__btn { flex: 1 1 auto; padding-inline: var(--s-2); }
  .tokens__filters .netpick__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mover__figs { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pchart, .pchart-slot:empty, .pchart__empty { height: 220px; }
  .tstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ranges { width: 100%; }
}
/* On a phone the price sits above the day's move, so the token name keeps its room */
.xrow__mprice { display: none; }
@media (max-width: 599px) {
  .xtable__price { display: none; }
  .xrow__mprice { display: block; font: var(--type-ui-strong); }
  .xtable__d1 .chg { font: var(--type-small-strong); }
}

/* Very narrow phones: the token's name matters more than its chart */
@media (max-width: 379px) {
  .xtable__chart { display: none; }
  .seg { gap: 0; }
  .seg__btn { padding-inline: 6px; font: var(--type-small-strong); }
}

@media (prefers-reduced-motion: reduce) {
  .pchart__draw, .pchart__now, .tpage__head, .tpage__price, .xhero__inner > * { animation: none; }
  [data-enter] { opacity: 1; animation: none; }
  .ranges__thumb { transition: none; }
}

/* "All networks": four network marks in a square */
.net-grid { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px; flex: none; align-content: center; justify-items: center; }
.wallet-group__icons { display: inline-flex; gap: 2px; }

/* ---------------------------------------------------------------------------
   Additions for the real service: pieces the demo preview didn't need
   (wallet sign-in, approvals, recovery, the activity session, the asset catalog).
   --------------------------------------------------------------------------- */
body { display: flex; flex-direction: column; }
body > main { flex: 1; }

/* Mode band: ink in demo and live, amber when new swaps are paused */
.demo-band[data-mode="paused"] { background: var(--warn); }

/* Notices carry their icon as a mask, so controllers can set plain text */
.notice::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px;
  background: var(--text-quiet);
  -webkit-mask: url('/img/icons/info.svg') center / contain no-repeat; mask: url('/img/icons/info.svg') center / contain no-repeat;
}
.notice--warn::before { background: var(--warn); -webkit-mask-image: url('/img/icons/warn.svg'); mask-image: url('/img/icons/warn.svg'); }
.notice--bad::before { background: var(--bad); -webkit-mask-image: url('/img/icons/bad.svg'); mask-image: url('/img/icons/bad.svg'); }
.notice--good::before { background: var(--good); -webkit-mask-image: url('/img/icons/good.svg'); mask-image: url('/img/icons/good.svg'); }
.notice--info::before { background: var(--accent); }
.notice--plain::before { display: none; }

/* Things that need the person's attention, under the card */
.attention {
  display: grid; gap: var(--s-3); margin-top: var(--s-3); padding: var(--s-5);
  border-radius: var(--r-4); background: var(--card); box-shadow: var(--shadow-card);
  font: var(--type-ui); animation: card-in var(--t-enter) var(--ease-settle) backwards;
}
.attention > p { color: var(--text-quiet); }
.attention .text-btn { justify-self: start; margin: 0; }
.attention .btn { height: var(--field-h); }

/* Wallet rows with a second line */
.wallet-row__name { display: grid; }
.wallet-row__sub { font: var(--type-small); color: var(--text-quiet); }
.wallet-row:disabled { cursor: not-allowed; opacity: 0.55; }
.wallet-row__icon { display: grid; place-items: center; width: var(--chip-h); height: var(--chip-h); flex: none; }

/* Header wallet button with the network mark and a short address */
.wallet-btn { font: var(--type-ui-strong); }
.wallet-btn .net-icon { width: 20px; height: 20px; }

/* Token sheet rows are buttons */
button.token-row { width: 100%; text-align: left; color: var(--text); transition: background var(--t-hover) var(--ease); }
@media (hover: hover) { button.token-row:hover:not([aria-disabled="true"]) { background: var(--hover); } }
button.token-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.token-row.is-current { background: var(--hover); }
.token-row.is-unavailable { cursor: not-allowed; }
.token-row.is-unavailable .token-row__sym, .token-row.is-unavailable .token-badged { opacity: 0.5; }
.token-row.is-unavailable .token-row__name { white-space: normal; }
.token-btn__sym { white-space: nowrap; }
.netpick__lead { display: inline-flex; }
.net-icon--blank { background: var(--well-strong); }

/* Settings with three choices */
.slip--three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 599px) { .slip--three { grid-template-columns: repeat(3, 1fr); } }

/* Review sheet: Back, then Approve or Confirm */
.sheet__buttons:has(> #approve:not([hidden])) { grid-template-columns: auto 1fr 1fr; }
.sheet__buttons .btn { height: var(--field-h); }
.review-note { font: var(--type-small); color: var(--text-quiet); }
.steps-box { padding: var(--s-4); border-radius: var(--r-3); background: var(--well); }
.steps-box > p:first-child { font: var(--type-ui-strong); }
.pair-line__net { font: var(--type-small); color: var(--text-quiet); }
.costs__row dd.mono { font: var(--type-mono); }

/* Busy buttons: the arrows keep turning while waiting, in the button's text colour */
.btn .logo-mark { color: inherit; }
.btn .logo-mark__coin { fill: currentColor; opacity: 0.4; }
.logo-mark--busy .logo-mark__spin { animation: logo-spin 900ms linear infinite; }
@keyframes logo-spin { to { transform: rotate(360deg); } }

/* Activity: grouped by owner, each row with its references and actions */
.activity-group { display: grid; gap: var(--s-3); }
.activity-group > .small { max-width: 60ch; }
.activity__item { display: grid; border-radius: var(--r-3); transition: background var(--t-hover) var(--ease); animation: rise 420ms var(--ease-settle) calc(var(--i, 0) * 40ms) backwards; }
@media (hover: hover) { .activity__item:hover { background: var(--hover); } .activity__item .activity__row:hover { background: none; } }
.activity__item .activity__row { cursor: default; }
.activity__more { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-4); padding: 0 var(--s-3) var(--s-3) calc(52px + var(--s-4) + var(--s-3)); font: var(--type-small); color: var(--text-quiet); }
.activity__more:empty { display: none; }
.activity__more a, .activity__more button { font: var(--type-small-strong); }
.activity__more .notice { font: var(--type-small); width: 100%; }
.activity__more .notice::before { width: 14px; height: 14px; }
.state { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--s-2); }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.state--pending::before, .state--submitted::before { animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.state--refunded { color: var(--text); }
@media (max-width: 599px) { .activity__more { padding-left: var(--s-3); } }

/* Swaps between networks: destination address well and the activity recovery code */
.field--dest { gap: var(--s-2); }
.dest-input {
  width: 100%; min-width: 0; height: var(--field-h); padding: 0; border: 0; outline: none; background: none;
  font: var(--type-mono); font-size: 0.9375rem; color: var(--text); caret-color: var(--accent);
}
.dest-input::placeholder { color: var(--text-quiet); opacity: 0.75; font-family: var(--font-text); }
.field--dest:has(.dest-input:focus) { background: var(--card); box-shadow: inset 0 0 0 1px var(--line-control); }
.field--dest:has(.dest-input:focus-visible) { box-shadow: inset 0 0 0 2px var(--focus); }
.code-box { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-3); background: var(--well); }
.code-box__code { font: 500 1.0625rem/1.5rem var(--font-mono); letter-spacing: 0.02em; overflow-wrap: anywhere; user-select: all; }
.code-box__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.code-box__actions .btn { height: var(--target); }
.session-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); padding-inline: var(--s-3); font: var(--type-small); color: var(--text-quiet); }
.disclose { font: var(--type-ui); }
.disclose > summary { cursor: pointer; display: inline-flex; align-items: center; min-height: var(--target); font: var(--type-ui-strong); list-style: none; }
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > summary::after { content: ""; width: 16px; height: 16px; margin-left: var(--s-2); background: var(--text-quiet); -webkit-mask: url('/img/icons/caret.svg') center / contain no-repeat; mask: url('/img/icons/caret.svg') center / contain no-repeat; transition: transform var(--t-hover) var(--ease); }
.disclose[open] > summary::after { transform: rotate(180deg); }
.disclose > :not(summary) { margin-top: var(--s-3); }
.cross-activity { width: 100%; max-width: var(--panel-w); margin: var(--s-6) auto 0; display: grid; gap: var(--s-3); text-align: left; }
.cross-activity__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }

/* Token page launcher and explore notes */
.launch-note { font: var(--type-small); color: var(--text-quiet); text-align: center; padding: 0 var(--s-3) var(--s-2); }
.xcatalog { display: grid; gap: var(--s-1); font: var(--type-small); color: var(--text-quiet); }
.xrow__avail { font: var(--type-small); color: var(--text-quiet); white-space: normal; }
.tstats dd.mono { font: var(--type-mono); overflow-wrap: anywhere; }

/* Help and legal pages */
.faq { display: grid; gap: var(--s-6); }
.prose h2 { font: var(--type-h3); }
.prose a { font-weight: 600; }
.prose section ol { list-style: decimal; padding-left: var(--s-5); display: grid; gap: var(--s-2); }
.prose section ol li { color: var(--text-quiet); }
.prose .costs { margin-top: var(--s-2); }
.legal-status { padding: var(--s-4); border-radius: var(--r-3); background: var(--card); box-shadow: var(--shadow-lift); font: var(--type-ui); max-width: 60ch; }

@media (prefers-reduced-motion: reduce) {
  .logo-mark--busy .logo-mark__spin, .state::before, .activity__item, .attention { animation: none; }
}
.activity__item .activity__row { grid-template-columns: auto minmax(0, 1fr) auto minmax(112px, auto); }
@media (max-width: 599px) { .activity__item .activity__row { grid-template-columns: auto minmax(0, 1fr) auto; } }
#destination-help[data-tone="bad"], #refund-help[data-tone="bad"] { color: var(--bad); }
#destination-help[data-tone="good"], #refund-help[data-tone="good"] { color: var(--good); }
.hide-phone { }
@media (max-width: 599px) { .hide-phone { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
#quote-form { display: grid; gap: var(--s-2); min-width: 0; }
.panel__notices:not(:has(> :not([hidden]))) { display: none; }
.panel__inflight:empty { display: none; }
.costs__row dd.mono { font: var(--type-mono); font-size: 0.75rem; }
.btn > .btn__text { display: inline; }

/* No-wallet swap: one-time deposit address view. */
.deposit { display: grid; gap: var(--s-4); padding: var(--s-5); }
.deposit__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.deposit__head h2:focus { outline: none; }
.deposit__amount { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font: var(--type-h3); }
.deposit__amount:empty { display: none; }
.deposit__amount .num { font: var(--type-amount); font-size: var(--size-amount-sm); }
.deposit__body { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.deposit__body:has(> .deposit__qr[hidden]) { grid-template-columns: minmax(0, 1fr); }
.deposit__fields { display: grid; gap: var(--s-3); min-width: 0; }
.deposit__qr { width: 176px; aspect-ratio: 1; border-radius: var(--r-3); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.deposit__qr-svg { display: block; width: 100%; height: 100%; }
.deposit__qr-bg { fill: oklch(1 0 0); }
.deposit__qr-ink { fill: oklch(0.18 0.03 285); }
.deposit__address { margin: 0; font: var(--type-mono); font-size: 0.9375rem; line-height: 1.5rem; color: var(--text); overflow-wrap: anywhere; word-break: break-all; user-select: all; }
.deposit__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); counter-reset: step; }
.deposit__step { display: flex; align-items: center; gap: var(--s-3); color: var(--text-quiet); font: var(--type-ui); counter-increment: step; }
.deposit__step::before { content: counter(step); display: grid; place-items: center; inline-size: 24px; block-size: 24px; flex: none; border-radius: 50%; background: var(--well); font: var(--type-small-strong); color: var(--text-quiet); }
.deposit__step.is-now { color: var(--text); font: var(--type-ui-strong); }
.deposit__step.is-now::before { background: var(--accent); color: var(--on-accent); }
.deposit__step.is-done { color: var(--text); }
.deposit__step.is-done::before { content: '✓'; background: oklch(0.5 0.13 155 / 0.14); color: var(--good); }
.deposit__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }
@media (max-width: 600px) {
  .deposit__body { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .deposit__fields { justify-self: stretch; }
}

/* Token page: a listed asset the swap provider does not offer yet. */
.panel--note { display: grid; gap: var(--s-3); padding: var(--s-5); }
.panel--note .launch-note { padding: 0; }

/* The swap card in two steps: what to swap, then where it goes. Each step slides in. */
.step { display: grid; min-width: 0; animation: step-in var(--t-content) var(--ease) both; }
@keyframes step-in { from { opacity: 0; transform: translateX(var(--s-3)); } }
.step--addresses { gap: var(--s-3); }
.step--addresses .field--dest { gap: var(--s-2); padding: var(--s-4); }
.panel__title { flex: 1; min-width: 0; padding-inline: var(--s-1); font: var(--type-h3); }
.panel__title:focus { outline: none; }
.summary { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-3); background: var(--well); }
.summary__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-width: 0; }
.summary__row dt { flex: none; font: var(--type-small-strong); color: var(--text); }
.summary__value { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--s-1) var(--s-2); min-width: 0; text-align: right; }
.summary__amount { font: var(--type-token); overflow-wrap: anywhere; }
.summary__net { font: var(--type-small); color: var(--text-quiet); white-space: nowrap; }
#sell-amount[aria-invalid="true"] { color: var(--bad); }
