@font-face { font-family: "Geist"; src: url("../../landing/fonts/Geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../../landing/fonts/GeistMono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink-3: #18181B;      /* raised surface, hover */
  --ink-4: #1F1F23;      /* pressed, selected chip */
  --line-2: #2E2E33;     /* hover hairline */
  --rule: rgb(237 234 227 / .1); /* bone 10 %, the rules between rows */
  --bone-60: rgb(237 234 227 / .6);
  --mute: #5E5C57;       /* third text role */
  --on-uv: #0A0A0B;
  --uv-hi: #A9D6FF;
  --uv-lo: #6FB2F2;
  --ease: cubic-bezier(.22,1,.36,1);
  --ease-in: cubic-bezier(.55,0,.75,.2);
  --r-xl: 6px; --r-l: 5px; --r-m: 4px; --r-s: 3px;
  --col: 640px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  background: var(--ink);
  color: var(--bone);
  font: 400 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01" 0;
}
button, input, output { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
/* amounts: Geist light, tabular, tight, the unit small and faint after them */
.num { font-family: var(--font); font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.u { font-size: max(11px, .42em); font-weight: 400; letter-spacing: 0; opacity: .45; margin-left: .34em; }
::selection { background: rgba(143,200,255,.35); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--uv); outline-offset: 2px; border-radius: var(--r-s); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: var(--ink-3); border-radius: var(--r-m); text-decoration: none; }
.skip:focus-visible { top: 12px; }

/* ---------- icons, spinner ---------- */
.ic { flex: none; display: block; }
.ic--sm { width: 14px; height: 14px; }
.ic--xs { width: 12px; height: 12px; }
.spin {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 1.5px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; opacity: .9;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: var(--r-m);
  font-weight: 500; font-size: 14px; white-space: nowrap; text-decoration: none;
  transition-property: background-color, color, box-shadow, border-color, transform, opacity;
  transition-duration: 160ms; transition-timing-function: var(--ease);
}
.btn:active:not(:disabled):not([aria-disabled]) { transform: scale(.96); }
.btn--ghost { border: 1px solid var(--line); color: var(--bone); }
.btn--ghost:hover:not(:disabled) { background: var(--ink-3); border-color: var(--line-2); }
.btn--ghost:active:not(:disabled) { background: var(--ink-4); }
.btn--ghost:disabled { color: var(--ash); cursor: default; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; gap: 6px; position: relative; }
.btn--sm::after { content: ""; position: absolute; inset: -4px 0; }
.btn--uv { background: var(--uv); color: var(--on-uv); }
.btn--uv:hover:not(:disabled) { background: var(--uv-hi); }
.btn--uv:active:not(:disabled) { background: var(--uv-lo); }
.btn--big { width: 100%; min-height: 54px; font-size: 15px; border-radius: var(--r-xl); transition-duration: 160ms; transition-timing-function: var(--ease); }
.btn--big.btn--uv:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 6px 16px rgb(143 200 255 / .12); }
.btn--big.btn--uv:active:not(:disabled) { transform: scale(.98); box-shadow: inset 0 1px 0 rgb(255 255 255 / .3); }
.btn__in { display: inline-flex; align-items: center; gap: 10px; }
.btn--uv:disabled { background: var(--ink-3); color: var(--ash); cursor: default; }
.btn--uv[data-mode="busy"] { background: var(--uv-lo); color: var(--on-uv); cursor: progress; }
.btn--uv[data-mode="busy"]:disabled { background: var(--ink-4); color: var(--bone); }
.btn--uv[data-mode="busy"] .spin { color: var(--uv-hi); }
.btn--uv[data-mode="done"]:disabled { background: var(--ink-4); color: var(--bone); }
.btn--uv[data-mode="done"] .ic { color: var(--uv-hi); }

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-m);
  color: var(--ash); transition: color 160ms var(--ease), background-color 160ms var(--ease), transform 160ms var(--ease);
}
.icon-btn:hover { color: var(--bone); background: var(--ink-3); }
.icon-btn:active, .link:active, .tab:active, .disclosure:active, .pop__item:active, .toast__x:active { transform: scale(.96); }

.link {
  font-size: 13px; font-weight: 500; color: var(--bone); min-height: 44px; padding: 0 2px;
  display: inline-flex; align-items: center; text-decoration: underline; text-decoration-color: var(--line-2);
  text-underline-offset: 3px; transition: color 140ms var(--ease), text-decoration-color 140ms var(--ease), transform 140ms var(--ease);
}
.link:hover { text-decoration-color: currentColor; }
.link--uv { color: var(--uv-hi); text-decoration-color: rgba(143,200,255,.35); }

/* ---------- bar ---------- */
.bar {
  max-width: 1280px; margin: 0 auto; height: 72px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; padding-right: 6px; border-radius: var(--r-m); }
.brand__logo { display: grid; place-items: center; width: 22px; height: 22px; color: var(--bone); }
.brand__logo svg { width: 22px; height: 22px; display: block; }
.brand__word { font-weight: 700; font-size: 15px; letter-spacing: .08em; }
.bar__r { display: flex; align-items: center; gap: 8px; }
.net {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  font-size: 13px; color: var(--ash); border-radius: var(--r-m);
}
.net::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bone); opacity: .55; }
.demo {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--uv-hi); border: 1px solid rgba(143,200,255,.35); border-radius: 999px; cursor: help;
}
.demo[hidden], .full[hidden] { display: none; }
.hlink { display: inline-flex; align-items: center; height: 36px; padding: 0 10px; font-size: 13px; color: var(--ash); text-decoration: none; border-radius: var(--r-m); transition: color 160ms var(--ease); }
.hlink:hover { color: var(--bone); }
.full { gap: 6px; }
.full svg { width: 12px; height: 12px; }
.wallet { min-width: 104px; }
.wallet.is-on { gap: 8px; padding: 0 12px 0 14px; }
.wallet .mono { font-size: 13px; }
.wallet .ic { color: var(--ash); transition: transform 200ms var(--ease); }
.wallet[aria-expanded="true"] .ic { transform: rotate(180deg); }
.wallet:disabled { cursor: default; color: var(--ash); }

/* ---------- layout ---------- */
.col { max-width: var(--col); margin: 0 auto; padding: 40px 24px 96px; transition: filter 260ms var(--ease); }
.bar { transition: filter 260ms var(--ease); }
@media (min-width: 1200px) {
  .col { max-width: 1280px; display: grid; grid-template-columns: minmax(0, 1fr) 472px; column-gap: 56px; align-items: start; align-content: start; padding-top: clamp(16px, 4vh, 40px); padding-bottom: 96px; }
  .col__main { min-width: 0; }
  .col__side { padding-top: 8px; position: sticky; top: 24px; }
  .col__side .sees { margin-top: 0; }
}

/* ---------- backdrop: still point field, slow cut ring ---------- */
.bal { position: relative; isolation: isolate; }
.act, .col__side { position: relative; } /* paint above the backdrop */
.field-bg {
  position: absolute; z-index: -1; left: 50%; top: 96px; width: 1000px; aspect-ratio: 1;
  translate: -50% -50%; pointer-events: none; color: var(--bone);
}
.field-bg__f, .field-bg__r { position: absolute; inset: 0; }
.field-bg svg { width: 100%; height: 100%; display: block; }
.field-bg__f { opacity: .09; }
.field-bg__r { opacity: .16; will-change: transform; animation: ring 420s linear infinite; }
@keyframes ring { to { transform: rotate(360deg); } }

/* ---------- balance ---------- */
.bal { padding: 8px 0 32px; }
.bal__top { display: flex; align-items: center; justify-content: space-between; margin: 0 -10px 0 0; height: 44px; }
.label { font-size: 13px; font-weight: 500; color: var(--ash); }
.bal__figw { position: relative; margin-top: 2px; width: fit-content; max-width: 100%; }
.bal__fig {
  font-family: var(--font); font-variant-numeric: tabular-nums; font-weight: 300;
  font-size: 68px; line-height: 1.04; letter-spacing: -0.02em;
  white-space: nowrap; min-height: 71px; position: relative;
}
.fig__c { color: var(--ash); }
.fig__p { margin: 0 -0.04em; }
.fig__u { font-size: 24px; margin-left: 12px; vertical-align: .12em; }
.bal__fig .c { position: relative; }
/* redaction bars, one per digit */
.bal__fig .c::after {
  content: ""; position: absolute; left: .06em; right: .06em; top: .24em; bottom: .16em;
  border-radius: 2px; background: var(--bone); opacity: 0;
}
.bal__fig .c.fig__p::after { content: none; }
.bal__fig.is-red .c:not(.fig__p), .bal__fig .c.x:not(.fig__p) { color: transparent; }
.bal__fig.is-red .c::after, .bal__fig .c.x::after { opacity: 1; }
.bal__fig.is-red .fig__p, .bal__fig .c.x.fig__p { color: transparent; }
.bal__fig .c.s { color: var(--ash); }
.scan {
  position: absolute; left: 0; top: -6px; bottom: -6px; width: 1px; background: var(--uv); opacity: 0;
  box-shadow: 0 0 0 .5px rgba(143,200,255,.35); pointer-events: none;
}
.bal.is-off .bal__fig { color: var(--mute); }
.bal.is-off .fig__c { color: var(--mute); }
.bal__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; min-height: 24px; }
.yield { display: flex; gap: 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.yield__apy { color: var(--bone); }
.yield__day { color: var(--ash); }
.yield.is-soon .yield__apy { color: var(--ash); }
.bal.is-off .yield { color: var(--mute); }
.bal.is-off .yield__apy { color: var(--ash); }

.anon { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; }
.anon__l { color: var(--ash); }
.anon__bar { display: inline-flex; gap: 2px; }
.anon__bar i { width: 14px; height: 6px; border-radius: 1px; background: var(--line); transition: background-color 240ms var(--ease); }
.anon__v { min-width: 34px; font-weight: 500; transition: color 240ms var(--ease); }
.anon[data-level="good"] .anon__bar i { background: var(--bone); }
.anon[data-level="fair"] .anon__bar i:nth-child(-n+2) { background: var(--bone); }
.anon[data-level="weak"] .anon__bar i:first-child { background: var(--bone); }
.anon[data-level="weak"] .anon__bar i:not(:first-child) { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.anon[data-level="weak"] .anon__v { color: var(--bone); }
.anon[data-level="fair"] .anon__v { color: var(--bone); }

.holdings { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; min-height: 32px; }
.hold {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px;
  border-radius: var(--r-m); background: var(--ink-2); border: 1px solid var(--line);
  font-size: 13px;
}
.bal:not(.is-loading) .holdings:empty { display: none; }
.bal.is-off .anon { opacity: .45; }
.hold .mark { width: 20px; height: 20px; font-size: 10px; }
.hold__s { color: var(--bone); opacity: .45; font-size: 11px; }
.hold--in { border-style: dashed; background: transparent; }
.hold--in .hold__v { opacity: .7; }
.hold__t { color: var(--bone); opacity: .45; font-size: 11px; }
.done-card__w { color: var(--bone); opacity: .6; font-size: 13px; }

/* zero balance: smaller figure, one quiet line */
.bal.is-zero { padding-bottom: 20px; }
.bal.is-zero .bal__fig { font-size: 44px; min-height: 48px; }
.bal.is-zero .fig__u { font-size: 17px; margin-left: 8px; }
.bal.is-zero .holdings { display: none; }

/* empty states: an icon in a circle, one line, the way out */
.empty-ic {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--ink-3); border: 1px solid var(--line-2); color: var(--bone);
}
.empty-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.empty-t { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.empty-l { font-size: 15px; color: var(--bone-60); text-wrap: pretty; min-width: 0; }
.empty-a { display: flex; gap: 8px; flex-wrap: wrap; }
.bal-empty {
  display: flex; align-items: center; gap: 12px; margin-top: 16px;
  animation: settle 240ms var(--ease);
}
.bal-empty .empty-ic { width: 32px; height: 32px; }
.bal-empty .empty-l { flex: 1; font-size: 14px; }
.empty-st { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 16px 16px 20px; min-height: 72px; }

/* loading skeletons */
.bal.is-loading .bal__fig, .bal.is-loading .yield, .bal.is-loading .holdings { color: transparent; position: relative; }
.bal.is-loading .bal__fig > *, .bal.is-loading .yield > * { visibility: hidden; }
.bal.is-loading .bal__fig::after, .bal.is-loading .yield::after, .bal.is-loading .holdings::after {
  content: ""; position: absolute; left: 0; top: 50%; translate: 0 -50%; border-radius: var(--r-s);
  background: var(--ink-3); animation: sk 1.4s var(--ease) infinite;
}
.bal.is-loading .bal__fig::after { width: 300px; height: 52px; border-radius: var(--r-m); }
.bal.is-loading .yield { min-width: 180px; height: 18px; }
.bal.is-loading .yield::after { width: 180px; height: 12px; }
.bal.is-loading .holdings::after { width: 280px; height: 32px; border-radius: var(--r-m); }
.sk { display: block; height: 12px; border-radius: var(--r-s); background: var(--ink-3); animation: sk 1.4s var(--ease) infinite; }
.sk--s { width: 28px; } .sk--m { width: 140px; height: 14px; } .sk--btn { width: 150px; height: 36px; border-radius: var(--r-m); margin-left: auto; }
@keyframes sk { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* veil: every other amount becomes a flat bar */
.amt { transition: color 200ms var(--ease), background-color 200ms var(--ease); border-radius: 3px; }
.veiled .amt { color: transparent !important; background-color: var(--line-2); user-select: none; text-decoration: none; display: inline-block; width: 64px; min-width: 0; overflow: hidden; white-space: nowrap; vertical-align: middle; line-height: 1.2; }
.veiled .hold__v { width: 48px; }
.veiled .amt * { visibility: hidden; }
.veiled .amt:empty { background: none; }
.veiled .hrow.is-error .hrow__amt { text-decoration: none; }

/* ---------- tabs ---------- */
.act { margin-top: 8px; }
.tabs {
  --i: 0;
  position: relative; display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 3px; border-radius: var(--r-xl); background: var(--ink-2); border: 1px solid var(--line);
}
.tabs__ind {
  will-change: transform;
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 7);
  border-radius: var(--r-m); background: var(--ink-4); border: 1px solid var(--line-2);
  transform: translateX(calc(var(--i) * 100%)); transition: transform 260ms var(--ease);
}
.tab {
  position: relative; z-index: 1; height: 44px; border-radius: var(--r-m);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--ash);
  transition: color 160ms var(--ease), transform 160ms var(--ease), background-color 160ms var(--ease);
}
.tab__ic { width: 16px; height: 16px; flex: none; opacity: .8; transition: opacity 160ms var(--ease); }
.tab:hover { color: var(--bone); }
.tab:hover:not([aria-selected="true"]) { background: rgb(237 234 227 / .03); }
.tab[aria-selected="true"] { color: var(--bone); }
.tab.is-soon:not([aria-selected="true"]) { opacity: .5; }
.soon { font-size: 15px; color: var(--bone-60); text-wrap: pretty; padding: 4px 0 20px; }
.tab[aria-selected="true"] .tab__ic { opacity: 1; }
.tab:focus-visible { outline-offset: -2px; }

/* ---------- panel ---------- */
.panel {
  margin-top: 12px; padding: 24px; border-radius: var(--r-xl);
  background: var(--ink-2); border: 1px solid var(--line);
}
.panel__body { display: flex; flex-direction: column; gap: 12px; }
.act-h { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.act-h__t { font-size: 20px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; }
.act-h__l { font-size: 15px; color: var(--bone-60); text-wrap: pretty; }

.field {
  position: relative; display: flex; align-items: center; gap: 12px;
  border-radius: var(--r-xl); background: var(--ink); border: 1px solid var(--line);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.field:hover { border-color: var(--line-2); }
.field:focus-within { border-color: var(--uv); }
.field.is-bad { border-color: var(--uv-hi); }
.field.is-bad .field__hint { color: var(--uv-hi); font-family: var(--font); font-size: 13px; }
.field__in {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font-variant-numeric: tabular-nums;
}
.field__in::placeholder { color: var(--mute); }
.field--amt, .field--into { flex-direction: column; align-items: stretch; gap: 0; padding: 14px 14px 14px 18px; }
.field--amt { cursor: text; }
.field__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; font-size: 13px; color: var(--ash); }
.field__cap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field__row { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.field--amt .field__in, .field--into .field__in { font-family: var(--font); font-size: 40px; font-weight: 300; letter-spacing: -0.02em; height: 60px; line-height: 60px; }
.field__usd { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ash); min-height: 18px; }
.field__usd:empty { display: none; }
.field__in.is-ph { color: var(--mute); }
.field--amt.is-fixed { cursor: default; }
.field--amt.is-fixed .field__in { display: flex; align-items: center; }
/* the other side: no input, a quieter surface */
.field--into { background: rgb(237 234 227 / .025); border-color: var(--line); }
.field--into:hover { border-color: var(--line); }
.field--into .field__in { display: flex; align-items: baseline; font-size: 32px; height: 52px; line-height: 52px; }
.field--into .field__row { min-height: 52px; }
.field--into.is-empty .field__in { color: var(--mute); }
.field--txt { height: 58px; padding: 0 16px 0 18px; gap: 12px; }
.field__lab { font-size: 13px; color: var(--ash); flex: none; width: 24px; }
.field__in--txt { font-size: 15px; height: 100%; }
.field__hint { font-size: 12px; color: var(--ash); flex: none; }

/* the seam between "from" and "into" */
.seam { display: flex; justify-content: center; height: 0; position: relative; z-index: 2; margin: -10px 0; }
.seam__chip, .flip {
  position: absolute; top: 50%; translate: 0 -50%; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--r-xl); background: var(--ink-2); border: 1px solid var(--line); color: var(--ash);
  box-shadow: 0 0 0 4px var(--ink-2);
}
.flip { color: var(--bone); transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease); }
.flip::after { content: ""; position: absolute; inset: -6px; }
.flip .ic { transition: transform 240ms var(--ease); }
.flip:hover { background: var(--ink-3); border-color: var(--line-2); }
.flip:hover .ic { transform: rotate(180deg); }
.flip:active { transform: scale(.94); }

/* small labels on a field: "Only you" in accent, a public one in ash */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ash); white-space: nowrap; }
.tag--uv { color: var(--uv); }

/* token marks */
.mark {
  position: relative; width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  font: 600 11px/1 var(--font); color: var(--ash);
}
.mark--img { background: none; box-shadow: none; }
.mark img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; user-select: none; }
.mark--img::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); pointer-events: none; }

.tok {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 8px;
  border-radius: var(--r-xl); background: var(--ink-3); border: 1px solid var(--line);
  font-weight: 500; font-size: 15px; flex: none;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.tok:hover { background: var(--ink-4); border-color: var(--line-2); }
.tok:active { transform: scale(.96); }
.tok__c { color: var(--ash); transition: transform 200ms var(--ease); }
.tok[aria-expanded="true"] { border-color: var(--line-2); background: var(--ink-4); }
.tok[aria-expanded="true"] .tok__c { transform: rotate(180deg); }
.tok--static { padding-right: 14px; cursor: default; background: transparent; }
.tok--static:active { transform: none; }
.tok--static:hover { background: transparent; border-color: var(--line); }

/* "In wallet 14,250 USDC  Max" */
.avail { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ash); min-height: 24px; white-space: nowrap; }
.avail.is-empty { display: none; }
.avail__v { color: var(--bone); font-size: 13px; }
.avail__max { min-height: 32px; padding: 0 6px; margin: -4px -6px -4px 0; border-radius: var(--r-s); text-decoration: none; color: var(--uv-hi); position: relative; }
.avail__max::after { content: ""; position: absolute; inset: -6px -2px; }
.avail__max:hover { background: rgb(143 200 255 / .1); }

/* chips */
.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.chip {
  min-height: 48px; padding: 0 10px; border-radius: var(--r-xl);
  background: var(--ink); border: 1px solid var(--line);
  font-family: var(--font); font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--ash);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.chip:hover { color: var(--bone); border-color: var(--line-2); }
.chip:active { transform: scale(.96); }
.chip[aria-checked="true"] { color: var(--bone); background: var(--ink-3); border-color: var(--uv); }
.chips--in { margin-top: 12px; gap: 6px; }
.chips--in .chip { min-height: 36px; background: var(--ink-2); }
.chips--in .chip[aria-checked="true"] { background: var(--ink-4); }
.chips--2 .chip { align-items: flex-start; padding: 10px 14px; min-height: 60px; }
.chip__l { font-size: 14px; font-weight: 500; }
.chip__s { font-size: 12px; color: var(--ash); font-weight: 400; }

/* Fee, Arrives, Limit */
.sum { display: flex; flex-direction: column; margin: 4px 0 0; }
.sum__r { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; border-top: 1px solid var(--rule); font-size: 15px; }
.sum__r:last-child { border-bottom: 1px solid var(--rule); }
.sum__l { color: var(--ash); }
.sum__v { color: var(--bone); text-align: right; font-variant-numeric: tabular-nums; }
.sum__v .mono { font-size: 13px; }
.sum + .btn--big, .sum + .fail { margin-top: 8px; }
.sum__was { color: var(--mute); text-decoration: line-through; margin-right: 8px; }
.sum__burn { margin-left: 10px; }
/* the Fee row with the $HYDE switch under it */
.sum__r--fee { flex-wrap: wrap; row-gap: 2px; padding: 8px 0 6px; }
.sum__x { flex-basis: 100%; display: flex; align-items: center; }
.sw {
  display: inline-flex; align-items: center; gap: 10px; min-height: 32px; margin-left: -4px; padding: 0 6px 0 4px;
  border-radius: var(--r-m); font-size: 14px; color: var(--ash); transition: color 160ms var(--ease);
}
.sw:hover, .sw[aria-checked="true"] { color: var(--bone); }
.sw__t {
  position: relative; width: 30px; height: 18px; flex: none; border-radius: var(--r-m);
  background: var(--ink-4); border: 1px solid var(--line-2);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.sw__k {
  position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: var(--r-s);
  background: var(--ash); transition: transform 200ms var(--ease), background-color 160ms var(--ease);
}
.sw:hover .sw__k { background: var(--bone); }
.sw[aria-checked="true"] .sw__t { background: var(--uv); border-color: var(--uv); }
.sw[aria-checked="true"] .sw__k { transform: translateX(12px); background: var(--on-uv); }
.sw:active .sw__t { transform: scale(.96); }
.sw__d { font-size: 12px; font-weight: 500; color: var(--uv); padding: 1px 5px; border: 1px solid rgb(143 200 255 / .3); border-radius: var(--r-s); }
/* lock: the 0% line */
.perk { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; font-size: 14px; color: var(--ash); border: 1px solid var(--line); border-radius: var(--r-l); transition: color 160ms var(--ease), border-color 160ms var(--ease); }
.perk__ic { flex: none; margin-top: 2px; color: var(--mute); transition: color 160ms var(--ease); }
.perk.is-on { color: var(--bone); border-color: rgb(143 200 255 / .35); }
.perk.is-on .perk__ic { color: var(--uv); }

/* buy: buy or sell, the token list, the picked token, slippage, the result */
.chips--seg { grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: var(--r-xl); background: var(--ink); border: 1px solid var(--line); }
.chips--seg .chip { min-height: 40px; border-color: transparent; background: transparent; border-radius: var(--r-m); }
.chips--seg .chip[aria-checked="true"] { background: var(--ink-4); border-color: var(--line-2); }
.grp { display: flex; flex-direction: column; gap: 8px; }
.grp__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px; font-size: 13px; color: var(--ash); }
.field--find .field__lab { width: auto; }
.tlist { display: flex; flex-direction: column; border-radius: var(--r-xl); background: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.trow, .pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; text-align: left; color: var(--bone); }
.tlist li + li .trow, .tlist .trow--sk + .trow--sk { border-top: 1px solid var(--rule); }
.trow { transition: background-color 160ms var(--ease); }
.trow:hover:not(:disabled) { background: var(--ink-3); }
.trow:active:not(:disabled) { background: var(--ink-4); }
.trow:focus-visible { outline-offset: -2px; }
.trow:disabled { cursor: default; color: var(--ash); }
.trow__main { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.trow__s { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow__n { font-size: 12px; color: var(--ash); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow__r { display: flex; flex-direction: column; align-items: flex-end; flex: none; line-height: 1.3; }
.trow__p { font-size: 14px; color: var(--bone); }
.trow__c { font-size: 12px; color: var(--ash); }
.trow__c.is-up { color: var(--uv-hi); }
.trow__skm { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.trow__skl { width: 40%; }
.pick { border-radius: var(--r-xl); background: var(--ink); border: 1px solid var(--line); padding-right: 6px; }
.pick__x { padding: 0 8px; text-decoration: none; flex: none; }
.pick__x:hover { text-decoration: underline; }
.slip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.slip .chip { min-height: 40px; }
.slip__c { flex-direction: row; gap: 2px; padding: 0 10px; cursor: text; }
.slip__c input { width: 100%; min-width: 0; padding: 0; background: none; border: 0; outline: none; text-align: right; color: var(--bone); }
.slip__c input::placeholder { color: var(--ash); text-align: center; }
.slip__c input:placeholder-shown + .slip__u { display: none; }
.slip__u { color: var(--ash); }
.slip__c:focus-within { border-color: var(--uv); }
.slip__c.is-on { color: var(--bone); background: var(--ink-3); border-color: var(--uv); }
.field--into.is-busy .field__in, .field--into.is-busy .field__usd { opacity: .45; transition: opacity 160ms var(--ease); }
.sum__dim { color: var(--ash); }
.empty-st--panel { padding: 16px; border-radius: var(--r-xl); background: var(--ink); border: 1px solid var(--line); }
.done-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px;
  border-radius: var(--r-xl); background: var(--ink); border: 1px solid rgb(143 200 255 / .35);
  animation: rise 220ms var(--ease);
}
.done-card__ic { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 6px; border-radius: 50%; background: var(--uv); color: var(--on-uv); }
.done-card__t { font-size: 15px; color: var(--bone-60); }
.done-card__v { font-size: 36px; font-weight: 300; line-height: 1.15; }
.done-card__usd { font-size: 13px; color: var(--ash); min-height: 18px; }
.done-card .btn { margin-top: 10px; }

/* advice */
.advice {
  display: flex; align-items: center; gap: 10px; padding: 0 4px 0 12px; min-height: 48px;
  border-radius: var(--r-xl); background: rgba(143,200,255,.08); border: 1px solid rgba(143,200,255,.28);
  font-size: 15px; animation: rise 220ms var(--ease);
}
.advice__ic { color: var(--uv-hi); display: grid; }
.advice__t { flex: 1; text-wrap: pretty; }
.advice__a { padding: 0 10px; text-decoration: none; }
.advice__a:hover { text-decoration: underline; }
.fail {
  display: flex; align-items: center; gap: 10px; padding: 0 4px 0 12px; min-height: 48px;
  border-radius: var(--r-xl); background: var(--ink); border: 1px solid var(--line-2);
  font-size: 15px; animation: rise 220ms var(--ease);
}
.fail__ic { color: var(--bone); display: grid; }
.fail__t { flex: 1; text-wrap: pretty; }
.fail__a { padding: 0 12px; text-decoration: none; }
.fail__a:hover { text-decoration: underline; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
@keyframes settle { from { opacity: 0; filter: blur(3px); transform: translateY(3px); } }

/* ---------- what the public sees ---------- */
.sees { padding: 20px 20px 8px; border-radius: var(--r-xl); background: var(--ink-2); border: 1px solid var(--line); }
.sees__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.sees__h h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-s);
  background: var(--uv); color: var(--on-uv); font-size: 12px; font-weight: 600; letter-spacing: .01em;
}
.badge svg { flex: none; }
.sees__list { display: flex; flex-direction: column; }
.sees__r { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; border-top: 1px solid var(--rule); font-size: 15px; }
.sees__l { color: var(--ash); white-space: nowrap; }
.sees__v { display: inline-flex; align-items: center; gap: 8px; color: var(--bone); text-align: right; min-width: 0; }
.sees__v > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sees__ic { color: var(--ash); }
.sees__v[data-kind="safe"] .sees__ic { color: var(--bone); opacity: .6; }
.sees__v .mono { font-size: 13px; }
.mask { font-family: var(--mono); font-size: 14px; letter-spacing: .14em; color: var(--bone); opacity: .5; }

/* ---------- popover ---------- */
.anchor { position: relative; }
.pop {
  position: absolute; top: calc(100% + 6px); z-index: 30; min-width: 260px; padding: 6px;
  border-radius: var(--r-xl); background: var(--ink-3); border: 1px solid var(--line-2); box-shadow: 0 12px 32px rgba(0,0,0,.5);
  transform-origin: top right; animation: pop-in 160ms var(--ease);
}
.pop--end { right: 0; }
.pop.is-out { animation: pop-out 120ms var(--ease-in) forwards; pointer-events: none; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(-2px) scale(.99); } }
.pop__item {
  width: 100%; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 10px;
  border-radius: var(--r-m); text-align: left; font-size: 14px; color: var(--bone);
  transition: background-color 120ms var(--ease), transform 120ms var(--ease);
}
.pop__item .ic { color: var(--ash); }
.pop__item:hover, .pop__item:focus-visible { background: var(--ink-4); outline: none; }
.pop__item:focus-visible { box-shadow: inset 0 0 0 1px var(--uv); }
.pop__main { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.pop__s { font-weight: 500; }
.pop__n { font-size: 12px; color: var(--ash); }
.pop__b { font-size: 13px; color: var(--ash); }
.pop__ck { color: var(--uv-hi) !important; opacity: 0; }
.pop__item.is-sel .pop__ck { opacity: 1; }
.bar .pop { min-width: 200px; }

/* ---------- sheet ---------- */
.has-sheet .bar, .has-sheet .col { filter: blur(6px); }
.scrim {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: rgb(10 10 11 / .6); animation: fade-in 260ms var(--ease);
}
.scrim.is-out { animation: fade-out 170ms var(--ease-in) forwards; pointer-events: none; }
.sheet {
  width: 420px; max-width: 100%; padding: 20px 24px 24px; border-radius: var(--r-xl);
  background: var(--ink); border: 1px solid var(--line-2); box-shadow: 0 24px 64px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 14px;
  animation: sheet-in 260ms var(--ease);
}
.scrim.is-out .sheet { animation: sheet-out 170ms var(--ease-in) forwards; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(8px) scale(.99); } }
.sheet__h { display: flex; align-items: center; justify-content: space-between; margin: 0 -12px -6px 0; }
.sheet__t { font-size: 20px; font-weight: 500; letter-spacing: -0.015em; }
.sheet__l { font-size: 15px; color: var(--bone-60); margin-bottom: 6px; }
.wopt {
  width: 100%; min-height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 14px; text-align: left;
  border-radius: var(--r-xl); background: var(--ink-2); border: 1px solid var(--line);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.wopt:hover:not(:disabled) { background: var(--ink-3); border-color: var(--line-2); }
.wopt:active:not(:disabled) { transform: scale(.985); background: var(--ink-4); }
.wopt:disabled { cursor: progress; }
.wopts { display: flex; flex-direction: column; gap: 8px; }
a.wopt { text-decoration: none; color: inherit; }
.wopt__ic img { width: 24px; height: 24px; display: block; border-radius: var(--r-m); object-fit: contain; }
.wopt__end { display: grid; place-items: center; width: 16px; }
.wopt__ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--r-xl); background: var(--ink-4); border: 1px solid var(--line-2); color: var(--bone); }
.wopt__m { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.wopt__t { font-size: 15px; font-weight: 500; }
.wopt__s { font-size: 13px; color: var(--ash); }
.wopt__go { color: var(--ash); transition: transform 160ms var(--ease), color 160ms var(--ease); }
.wopt:hover .wopt__go { color: var(--bone); transform: translateX(2px); }
.wopt .spin { color: var(--uv); }
.sheet__none, .sheet__err, .sheet__safe { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; text-wrap: pretty; }
.sheet__none { padding: 12px 14px; border-radius: var(--r-xl); border: 1px solid var(--line); color: var(--bone); }
.sheet__none .ic { color: var(--ash); margin-top: 1px; }
.sheet__err { padding: 12px 14px; border-radius: var(--r-xl); background: rgba(143,200,255,.08); border: 1px solid rgba(143,200,255,.28); color: var(--bone); }
.sheet__safe { color: var(--ash); padding-top: 4px; }
.sheet__safe .ic { margin-top: 2px; }

/* ---------- sections ---------- */
.accts, .locks { margin-top: 32px; }
.mark--hyde { background: var(--ink-3); }
.lk__r { display: flex; align-items: center; gap: 8px; flex: none; }
.lk__s { font-size: 13px; color: var(--ash); white-space: nowrap; }
.sec-h { display: flex; align-items: baseline; gap: 8px; padding: 0 4px 10px; }
.sec-h h2, .disclosure__t { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.sec-h__n { font-size: 13px; color: var(--ash); font-variant-numeric: tabular-nums; }

.list { border-radius: var(--r-xl); background: var(--ink-2); border: 1px solid var(--line); overflow: hidden; }
.row { display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 16px; min-height: 64px; }
.list > * + * { border-top: 1px solid var(--line); }
.empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; min-height: 64px; color: var(--ash); font-size: 14px; text-wrap: pretty; }

/* the cut thread: wallet point, cut, account point */
.cut { width: 34px; height: 15px; flex: none; overflow: visible; color: var(--ash); }
.cut line { stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; transform-box: fill-box; }
.cut__full { opacity: 0; transform-origin: left center; stroke: var(--uv-hi) !important; }
.cut__a { transform-origin: left center; }
.cut__b { transform-origin: right center; }
.cut__o { fill: var(--mute); }
.cut__p { fill: var(--bone); transform-box: fill-box; transform-origin: center; transition: fill 300ms var(--ease); }
.acct.is-funding .cut__p { fill: var(--ink-2); stroke: var(--uv-hi); stroke-width: 1.2; }
.acct__main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.acct__balw { display: flex; align-items: center; gap: 8px; }
.acct__balw .mark { width: 20px; height: 20px; }
.acct__bal { font-size: 16px; font-weight: 400; white-space: nowrap; }
.acct__sub { font-size: 12px; color: var(--ash); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.acct__sub > span:first-child { color: var(--bone); }
.acct__pnl { font-size: 14px; min-width: 76px; text-align: right; }
.acct__pnl.is-neg { color: var(--ash); }
.acct__open .ic { color: var(--ash); }
.acct__open-s { display: none; }
@media (max-width: 560px) { .acct__open-s { display: inline; } }
.acct__open[aria-disabled], .acct__key[aria-disabled] { opacity: .6; pointer-events: none; }
.acct.is-funding .acct__bal { color: var(--bone); }

.pips { display: inline-flex; gap: 4px; }
.pips i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); transition: background-color 300ms var(--ease), transform 300ms var(--ease); }
.pips i.on { background: var(--uv-hi); }
.pips i.in { animation: arrive 300ms var(--ease) backwards; }
@keyframes arrive { 0% { transform: translateY(-7px) scale(.4); background: var(--bone); } 60% { transform: translateY(1px) scale(1.25); } }

.hist { margin-top: 24px; }
.disclosure {
  width: 100%; display: flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 10px 4px; text-align: left;
  border-radius: var(--r-m); transition: transform 140ms var(--ease);
}
.disclosure__c { margin-left: auto; align-self: center; width: 16px; height: 16px; position: relative; color: var(--ash); transition: transform 200ms var(--ease), color 160ms var(--ease); }
.disclosure__c::before { content: ""; position: absolute; inset: 4px 3px 5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) scale(.7); transform-origin: center; }
.disclosure[aria-expanded="true"] .disclosure__c { transform: rotate(180deg); }
.disclosure:hover .disclosure__c { color: var(--bone); }
.hist__body { overflow: hidden; margin-top: 4px; }

.hrow .mark { width: 24px; height: 24px; }
.hrow__main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.hrow__t { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow__time { font-size: 12px; color: var(--ash); }
.hrow__r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.hrow__amt { font-size: 15px; white-space: nowrap; }
.hrow__st:empty { display: none; }
.hrow__st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ash); }
.hrow__st .spin { width: 10px; height: 10px; }
.hrow.is-wave .hrow__st, .hrow.is-in-batch .hrow__st, .hrow.is-pending .hrow__st { color: var(--bone); }
.st--err { color: var(--bone); }
.hrow.is-error .hrow__amt { color: var(--ash); text-decoration: line-through; text-decoration-color: var(--mute); }

/* ---------- toasts ---------- */
.toasts {
  position: fixed; left: 50%; translate: -50% 0; top: 10px; z-index: 80; /* over the empty middle of the bar */
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: min(400px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto; width: 100%; display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 14px; min-height: 52px;
  border-radius: var(--r-xl); background: var(--ink-3); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0,0,0,.55);
  font-size: 14px; animation: toast-in 260ms var(--ease);
}
.toast.is-out { animation: toast-out 200ms var(--ease-in) forwards; }
.toast__ic { display: grid; color: var(--ash); }
.toast--done .toast__ic { color: var(--uv-hi); }
.toast--error .toast__ic { color: var(--bone); }
.toast__tx { flex: 1; text-wrap: pretty; }
.toast__x { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ash); border-radius: var(--r-m); transition: color 140ms var(--ease), background-color 140ms var(--ease), transform 140ms var(--ease); }
.toast__x:hover { color: var(--bone); background: var(--ink-4); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }

/* ---------- load entrance ---------- */
body:not(.is-ready) .bal, body:not(.is-ready) .act, body:not(.is-ready) .col__side > section { opacity: 0; }
body.is-ready .bal, body.is-ready .act, body.is-ready .col__side > section { animation: enter 300ms var(--ease) backwards; }
body.is-ready .act { animation-delay: 50ms; }
body.is-ready .sees { animation-delay: 80ms; }
body.is-ready .accts { animation-delay: 110ms; }
body.is-ready .locks { animation-delay: 125ms; }
body.is-ready .hist { animation-delay: 140ms; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

/* ---------- mobile ---------- */
@media (max-width: 1199px) {
  .col__side { margin-top: 32px; }
}
@media (max-width: 560px) {
  .bar { height: 64px; padding: 0 16px; }
  .net { padding: 0 8px; }
  .hlink { padding: 0 6px; }
  .col { padding: 16px 16px 96px; }
  .col { padding-top: 4px; }
  .bal { padding: 0 0 14px; }
  .bal__top { height: 28px; }
  .bal__fig { font-size: 40px; min-height: 44px; }
  .bal.is-zero .bal__fig { font-size: 36px; min-height: 40px; }
  .fig__u { font-size: 15px; margin-left: 6px; }
  .bal__meta { flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; min-height: 20px; }
  .yield, .anon { font-size: 12px; }
  .holdings, .bal:not(.is-loading) .holdings { display: none; } /* each token balance shows in the token menu */
  .bal-empty { margin-top: 10px; }
  .bal-empty .empty-ic { display: none; }
  .bal-empty .empty-l { font-size: 13px; }
  /* the main button stays in reach */
  .panel .btn--big { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 0 0 16px var(--ink-2); }
  .panel .btn--big.btn--uv:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 0 0 16px var(--ink-2); }
  .panel .btn--big.btn--uv:active:not(:disabled) { box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 0 0 16px var(--ink-2); }
  .panel .btn--big::after { content: ""; position: absolute; left: -16px; right: -16px; top: 100%; height: calc(12px + env(safe-area-inset-bottom)); background: var(--ink-2); pointer-events: none; }
  .sum + .btn--big { margin-top: 20px; }
  .empty-st { grid-template-columns: auto minmax(0, 1fr); padding: 14px 16px; }
  .empty-st .empty-a { grid-column: 2; }
  /* the five actions: icon over label */
  .tabs { padding: 3px; }
  .tab { height: 58px; flex-direction: column; gap: 4px; font-size: 11px; letter-spacing: 0; }
  .tab__ic { width: 20px; height: 20px; }
  .panel { padding: 16px; }
  .act-h__t { font-size: 18px; }
  .field--amt, .field--into { padding: 12px 12px 12px 14px; }
  .field--amt .field__in { font-size: 34px; }
  .field--into .field__in { font-size: 28px; }
  .field__top { font-size: 12px; }
  .avail, .avail__v { font-size: 12px; }
  .chips--in .chip { font-size: 13px; padding: 0 4px; }
  .sees { padding: 16px 16px 6px; }
  .toasts { top: 6px; }
  .toast + .toast { display: none; } /* one at a time on a phone */
  .holdings { margin-top: 16px; }
  .col { overflow-x: clip; }
  .bal__top { margin-right: -4px; }
  .field-bg { width: 680px; top: 84px; }
  .acct { gap: 10px; padding-left: 12px; }
  .acct__balw .mark { display: none; }
  .acct__bal { font-size: 15px; }
  .acct__pnl { font-size: 13px; }
  .acct__open-l { display: none; }
  .acct__open { min-height: 40px; }
  .acct__pnl { min-width: 0; }
  /* token menu and wallet menu: bottom sheets */
  .pop {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 75; min-width: 0; max-height: 72dvh; overflow-y: auto;
    padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); border-radius: var(--r-xl) var(--r-xl) 0 0; border-width: 1px 0 0;
    background: var(--ink); box-shadow: 0 0 0 100vmax rgb(10 10 11 / .6);
    animation: sheet-up 260ms var(--ease);
  }
  .bar .pop { min-width: 0; }
  .pop::before { content: attr(aria-label); display: block; padding: 14px 10px 10px; font-size: 15px; font-weight: 500; }
  .pop.is-out { animation: sheet-down 170ms var(--ease-in) forwards; }
  .pop__item { min-height: 56px; }
  /* connect: bottom sheet */
  .scrim { place-items: end stretch; padding: 0; }
  .sheet { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; border-width: 1px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); animation-name: sheet-up; }
  .scrim.is-out .sheet { animation-name: sheet-down; }
}
@keyframes sheet-up { from { opacity: .6; transform: translateY(40px); } }
@keyframes sheet-down { to { opacity: 0; transform: translateY(32px); } }
@media (max-width: 360px) {
  .net { display: none; }
  .tab__l { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .spin { animation: spin 1.4s linear infinite !important; }
  .has-sheet .bar, .has-sheet .col { filter: none; }
  .btn--big.btn--uv:hover:not(:disabled), .btn--big.btn--uv:active:not(:disabled) { transform: none; }
}

/* Small text buttons keep a finger-sized target on touch screens. */
@media (pointer: coarse) {
  .avail__max, .sw, .btn--sm { position: relative; }
  .avail__max::after, .sw::after, .btn--sm::after { content: ''; position: absolute; inset: -8px -6px; }
}

/* ---------- one screen on a computer: every action fits the window, the main button stays in view ---------- */
.pair { display: contents; }
.act-h__i { display: none; }
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); z-index: 40; translate: -50% 0;
  width: max-content; max-width: 280px; padding: 8px 10px; border-radius: var(--r-m);
  background: var(--ink-4); border: 1px solid var(--line-2); box-shadow: 0 12px 32px rgba(0,0,0,.5);
  font: 400 13px/1.4 var(--font); letter-spacing: 0; color: var(--bone); text-align: left; white-space: normal; text-wrap: pretty;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 140ms var(--ease), visibility 140ms;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; visibility: visible; }

@media (min-width: 1200px) {
  .bar { height: 60px; }
  /* the slow ring behind the balance turns: it never makes the page taller */
  .col { padding-top: 4px; padding-bottom: 8px; column-gap: 48px; min-height: calc(100dvh - 60px); overflow-y: clip; }
  .col__side {
    padding-top: 0; top: 8px; display: flex; flex-direction: column; min-height: 0;
    max-height: calc(100dvh - 84px); overflow-y: auto; scrollbar-width: none;
  }
  .col__side::-webkit-scrollbar { display: none; }

  /* balance: one tight block, the tokens on one line */
  .bal { padding: 0 0 10px; }
  .bal__top { height: 28px; }
  .bal__fig { font-size: 50px; min-height: 52px; }
  .fig__u { font-size: 19px; margin-left: 10px; }
  .bal__meta { margin-top: 8px; min-height: 20px; }
  .holdings {
    flex-wrap: nowrap; margin-top: 12px; min-height: 28px; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .holdings::-webkit-scrollbar { display: none; }
  .hold { height: 28px; flex: none; white-space: nowrap; }
  .bal.is-zero { padding-bottom: 12px; }
  .bal-empty { margin-top: 10px; }
  .field-bg { top: 72px; }

  .act { margin-top: 0; }
  .tab { height: 38px; }
  .panel { position: relative; margin-top: 8px; padding: 14px 16px; }
  .panel__body { gap: 8px; }

  /* title row: the long line waits behind the mark */
  .act-h { flex-direction: row; align-items: center; gap: 4px; min-height: 30px; margin-bottom: 0; }
  .act-h__t { font-size: 17px; }
  .act-h__l { display: none; }
  .act-h__i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-m); color: var(--ash); cursor: help; transition: color 160ms var(--ease), background-color 160ms var(--ease); }
  .act-h__i:hover, .act-h__i:focus-visible { color: var(--bone); background: var(--ink-3); }
  .act-h__i[data-tip]::after { left: 0; translate: 0 0; }
  /* buy or sell sits on the title row */
  .panel__body > .chips--seg { position: absolute; top: 12px; right: 16px; width: 176px; }
  .chips--seg .chip { min-height: 28px; font-size: 13px; }

  /* from and into, side by side */
  .pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; position: relative; }
  .pair > .seam { position: absolute; left: 50%; top: 50%; width: 0; margin: 0; }
  .pair .seam__chip .ic { transform: rotate(-90deg); }
  .pair .flip .ic { transform: rotate(90deg); }
  .pair .flip:hover .ic { transform: rotate(270deg); }
  .field--amt, .field--into { padding: 10px 12px 10px 16px; }
  .field__top { min-height: 22px; }
  .field__row, .field--into .field__row { min-height: 44px; }
  .field--amt .field__in, .field--into .field__in { font-size: 30px; height: 44px; line-height: 44px; }
  .field--into .field__in { font-size: 28px; }
  .field__usd { font-size: 12px; min-height: 16px; }
  .tok { height: 38px; font-size: 14px; }
  .chips--in { margin-top: 8px; }
  .chips--in .chip { min-height: 32px; }
  .field--txt { height: 46px; }
  .chips--2 .chip { min-height: 46px; padding: 5px 12px; gap: 0; }
  .perk { padding: 6px 12px; font-size: 13px; }
  .advice, .fail { min-height: 40px; font-size: 14px; }
  .advice .link, .fail .link { min-height: 36px; }
  .btn--big { min-height: 46px; }
  .sum + .btn--big, .sum + .fail { margin-top: 0; }
  .soon { padding: 0 0 8px; }

  /* buy: slippage on one line, the token list scrolls inside itself */
  .grp--slip { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
  .grp--slip .slip { flex: 0 1 320px; }
  .slip .chip { min-height: 30px; font-size: 13px; }
  .pick { min-height: 46px; padding: 4px 6px 4px 14px; }
  .pick .link { min-height: 36px; }
  .trow { min-height: 46px; padding: 5px 14px; }
  .tlist { max-height: calc(100dvh - var(--list-k, 492px)); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
  .is-picking > .pair, .is-picking > .grp--slip, .is-picking > .sum { display: none; }
  .done-card { padding: 14px 16px; gap: 3px; }
  .done-card__ic { width: 26px; height: 26px; margin-bottom: 4px; }
  .done-card__v { font-size: 28px; }
  .done-card .btn { margin-top: 6px; min-height: 38px; }
  .empty-st--panel { padding: 10px 14px; min-height: 56px; }

  /* the side: the public card, then lists that scroll inside themselves */
  .sees { flex: none; padding: 14px 16px 4px; }
  .sees__h { padding-bottom: 8px; }
  .sees__r { min-height: 38px; font-size: 14px; }
  .accts, .locks { margin-top: 14px; display: flex; flex-direction: column; flex: 0 1 auto; min-height: 88px; }
  .sec-h { padding-bottom: 6px; flex: none; }
  .accts .list, .locks .list, .hist__body { overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
  .row { min-height: 54px; padding: 8px 10px 8px 14px; }
  .empty, .empty-st { min-height: 54px; padding-top: 8px; padding-bottom: 8px; }
  .empty-l { font-size: 14px; }
  .hist { margin-top: 8px; display: flex; flex-direction: column; flex: 0 1 auto; min-height: 40px; }
  .hist:has(.disclosure[aria-expanded="true"]) { min-height: 150px; }
  .disclosure { min-height: 40px; padding: 8px 4px; flex: none; }
  .hist__body { flex: 0 1 auto; margin-top: 0; }
  .pop { max-height: var(--pop-max, none); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
}

/* a short window: Fee, Arrives and the rest side by side */
@media (min-width: 1200px) and (max-height: 859px) {
  .sum { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; border-block: 1px solid var(--rule); }
  .sum__r, .sum__r:last-child { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 46px; padding: 5px 12px; border: 0; font-size: 14px; }
  .sum__r + .sum__r { border-left: 1px solid var(--rule); }
  .sum__r:first-child { padding-left: 2px; }
  .sum__l { font-size: 12px; }
  .sum__v { text-align: left; }
  .sum__r--fee { flex-wrap: nowrap; }
  .sum__x { flex-basis: auto; }
  .sw { min-height: 24px; font-size: 13px; }
  .sum__burn { margin-left: 6px; }
}

/* a tall window: room to breathe */
@media (min-width: 1200px) and (min-height: 860px) {
  .bar { height: 68px; }
  .col { padding-top: 12px; min-height: calc(100dvh - 68px); }
  .col__side { max-height: calc(100dvh - 104px); }
  .bal { padding-bottom: 14px; }
  .bal__top { height: 40px; }
  .bal__fig { font-size: 62px; min-height: 65px; }
  .fig__u { font-size: 22px; }
  .bal__meta { margin-top: 12px; }
  .holdings { margin-top: 16px; min-height: 32px; }
  .hold { height: 32px; }
  .tab { height: 44px; }
  .panel { margin-top: 12px; padding: 20px; }
  .panel__body { gap: 10px; }
  .panel__body > .chips--seg { top: 18px; right: 20px; }
  .act-h__t { font-size: 19px; }
  .field--amt, .field--into { padding: 12px 14px 12px 18px; }
  .field__row, .field--into .field__row { min-height: 52px; }
  .field--amt .field__in, .field--into .field__in { font-size: 36px; height: 52px; line-height: 52px; }
  .field--into .field__in { font-size: 32px; }
  .tok { height: 44px; font-size: 15px; }
  .chips--in .chip { min-height: 36px; }
  .field--txt { height: 52px; }
  .chips--2 .chip { min-height: 48px; padding: 6px 14px; }
  .sum__r { min-height: 34px; }
  .btn--big { min-height: 52px; }
  .pick { min-height: 52px; }
  .trow { min-height: 52px; }
  .tlist { --list-k: 596px; }
  .sees { padding: 18px 20px 6px; }
  .sees__r { min-height: 44px; font-size: 15px; }
  .accts, .locks { margin-top: 20px; }
  .row { min-height: 60px; }
}

/* a phone: every choice is at least a fingertip high */
@media (pointer: coarse) and (max-width: 1199px) {
  .chips .chip, .chips--in .chip, .chips--seg .chip, .slip .chip { min-height: 44px; }
}

/* ---------- launch pass ---------- */
/* buy: while no token is picked, the list is the whole screen */
.is-picking > .pair, .is-picking > .grp--slip, .is-picking > .sum { display: none; }
/* small buttons keep a 44 px target with any pointer */
.avail__max, .sw, .btn--sm { position: relative; }
.avail__max::after, .sw::after, .btn--sm::after { content: ''; position: absolute; inset: -4px -4px; }
@media (min-width: 1200px) { .chips--in .chip { min-height: 36px; } }
@media (min-width: 1200px) and (min-height: 860px) { .chips--in .chip { min-height: 44px; } .chips--seg .chip { min-height: 32px; } }
@media (max-width: 420px) { .net, .hlink--docs { display: none; } }
/* before a wallet connects, the side shows only what the public sees: one Connect button on the screen, not four */
body:not(.is-connected) .accts, body:not(.is-connected) .locks, body:not(.is-connected) .hist { display: none; }
/* a tablet keeps the main button in reach too */
@media (min-width: 561px) and (max-width: 1199px) {
  .panel .btn--big { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 0 0 12px var(--ink-2); }
}
/* the box label never cuts: the balance line gives way first */
.field__top > :first-child { flex: none; }
.avail { min-width: 0; }
.avail__v { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1200px) { .pair .avail__t { display: none; } }

/* account actions and key export */
.acct__acts { display: inline-flex; align-items: center; gap: 4px; }
/* the key button matches the Trade button next to it */
.acct__key { width: 36px; height: 36px; position: relative; border: 1px solid var(--line); }
.acct__key::after { content: ""; position: absolute; inset: -4px; }
.acct__key:hover { border-color: var(--line-2); }
.acct__key .ic { color: var(--ash); transition: color 160ms var(--ease); }
.acct__key:hover .ic { color: var(--bone); }
.keyx__warn { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-xl); background: rgba(143,200,255,.08); border: 1px solid rgba(143,200,255,.28); font-size: 14px; line-height: 1.45; color: var(--bone); text-wrap: pretty; }
.keyx__warn .ic { color: var(--uv-hi); margin-top: 2px; }
.keyx__row { display: flex; align-items: center; gap: 4px; padding: 10px 4px 10px 14px; border-radius: var(--r-xl); background: var(--ink-2); border: 1px solid var(--line); }
.keyx__v { flex: 1; min-width: 0; word-break: break-all; font-size: 13px; line-height: 1.55; color: var(--bone); user-select: all; transition: filter 200ms var(--ease), opacity 200ms var(--ease); }
.keyx__v.is-hidden { filter: blur(5px); opacity: .7; user-select: none; }
.keyx__how { color: var(--ash); font-size: 14px; line-height: 1.45; text-wrap: pretty; }
.keyx__go { margin-top: 4px; }
.keyx__go .ic { color: currentColor; }
@media (prefers-reduced-motion: reduce) { .keyx__v { transition: none; } }

/* a computer: accounts and locks keep whole rows (up to three accounts), history gives way first */
@media (min-width: 1200px) {
  .accts, .locks { flex: none; }
  .accts .list { max-height: 186px; }
  .locks .list { max-height: 132px; }
}

/* a tablet: seven actions on one row, icon and label side by side, never touching */
@media (min-width: 561px) and (max-width: 1199px) {
  .tab { gap: 6px; font-size: 13px; padding: 0 4px; }
  .tab__ic { width: 15px; height: 15px; }
}
/* phone and tablet: rows scrolling under the stuck main button fade out instead of being cut */
@media (max-width: 1199px) {
  .panel .btn--big { --halo: 12px; }
  .panel .btn--big::before { content: ""; position: absolute; left: calc(-1 * var(--halo)); right: calc(-1 * var(--halo)); bottom: calc(100% + var(--halo)); height: 14px; background: linear-gradient(to bottom, transparent, var(--ink-2)); pointer-events: none; }
}
@media (max-width: 560px) { .panel .btn--big { --halo: 16px; } }

/* a link of a feature not yet released stays hidden (launch.js shows it) */
[data-feature][hidden]{display:none!important}
