/* The Grokto app (site/app/): a wallet app shell on the site's tokens. Phone first: a bottom tab bar under 860 px, a left rail above.
   8 px grid, three radii, one accent gradient used sparingly, tabular numbers for money, springs instead of fades. */
.app-page { --r1: 12px; --r2: 18px; --r3: 24px; --glass: rgba(15 15 14 / .74); --edge: rgba(255 255 255 / .07); --spring: cubic-bezier(.2, .9, .25, 1.12); }
.app-page.in .foot { display: none; }
.app { padding: 24px 0 calc(128px + env(safe-area-inset-bottom)); } /* the end of every tab clears the phone tab bar */
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn { transition: transform .15s var(--spring), border-color .2s, background .2s; }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 12px; }
.btn.ghost { background: none; border-style: dashed; }
.btn.danger { border-color: rgba(255 77 77 / .45); background: rgba(255 77 77 / .1); color: #ff8a8a; }
.btn.danger:hover { background: rgba(255 77 77 / .18); border-color: var(--bad); }
.num, .w-big, .w-split, .w-num { font-variant-numeric: tabular-nums; }

/* signed out */
.app-out { display: grid; justify-items: center; gap: 16px; max-width: 720px; margin: 48px auto 0; text-align: center; }
.app-out h1 { font: 800 clamp(40px, 6.4vw, 84px)/.98 var(--sans); letter-spacing: -.055em; text-wrap: balance; }
.app-out .lead { max-width: 56ch; font: 400 17px/1.5 var(--sans); color: var(--dim); }

/* shell */
.wapp { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; align-items: start; }
.w-rail { position: sticky; top: 84px; display: grid; gap: 4px; padding: 8px; border: 1px solid var(--edge); border-radius: var(--r3); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.w-me { display: flex; align-items: center; gap: 12px; padding: 8px 8px 16px; margin-bottom: 4px; border-bottom: 1px solid var(--edge); min-width: 0; }
.av { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); object-fit: cover; }
.w-me span { display: grid; gap: 4px; min-width: 0; } .w-me b { font: 600 15px/1.2 var(--sans); overflow: hidden; text-overflow: ellipsis; } .w-me small { font: 400 11.5px/1 var(--mono); color: var(--soft); }
.w-tab { display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; border-radius: var(--r1); background: none; font: 500 15px/1 var(--sans); color: var(--dim); cursor: pointer; transition: background .2s, color .2s, transform .15s var(--spring); }
.w-tab svg { flex: none; width: 20px; height: 20px; }
.w-tab:hover { color: var(--text); }
.w-tab[aria-selected="true"] { color: var(--text); background: rgba(255 255 255 / .07); }
.w-tab:active { transform: scale(.96); }
.w-panel { display: grid; gap: 16px; min-width: 0; animation: w-in .4s var(--spring) both; }
@keyframes w-in { from { opacity: 0; transform: translateY(10px); } }
.w-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.w-head h1 { font: 700 28px/1.1 var(--sans); letter-spacing: -.03em; }
.w-mechip { display: none; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--edge); border-radius: 99px; background: var(--glass); font: 500 13px/1 var(--sans); }
.w-mechip .av { width: 28px; height: 28px; }
.sheet .w-mechip { display: inline-flex; font: 600 14px/1 var(--sans); } /* the Deposit sheet names the account, so a wrong-account sign-in shows before money moves */
.w-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--edge); border-radius: 99px; background: var(--glass); }
.w-seg button { padding: 8px 12px; border: 0; border-radius: 99px; background: none; font: 500 13px/1 var(--sans); color: var(--dim); cursor: pointer; transition: background .2s, color .2s; }
.w-seg button[aria-pressed="true"] { background: var(--text); color: #050505; }

/* balance */
.w-bal { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 8px; padding: 32px 16px 24px; border: 1px solid transparent; border-radius: var(--r3); text-align: center;
  background: linear-gradient(#0b0b0a, #0b0b0a) padding-box, linear-gradient(135deg, rgba(153 69 255 / .55), rgba(20 241 149 / .3) 50%, rgba(204 255 0 / .25)) border-box; }
.w-bal::before { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(50% 50% at 50% 0%, rgba(var(--accent-rgb) / .12), transparent 70%); pointer-events: none; }
.w-big { font: 700 clamp(44px, 9vw, 72px)/1 var(--sans); letter-spacing: -.045em; color: var(--text); }
.w-big.sm { font-size: 40px; }
.w-split { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; font: 400 13px/1 var(--mono); color: var(--soft); } .w-split b { font-weight: 500; color: var(--text); }
.w-acts { position: relative; display: grid; grid-template-columns: repeat(4, 72px); gap: 16px; margin-top: 16px; }
.w-act { display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: none; font: 500 12.5px/1.2 var(--sans); color: var(--dim); cursor: pointer; }
.w-act i { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--edge); border-radius: 50%; background: var(--raise); color: var(--text); transition: transform .18s var(--spring), background .2s, border-color .2s; }
.w-act svg { width: 22px; height: 22px; }
.w-act:hover i { background: #242320; border-color: rgba(var(--accent-rgb) / .4); }
.w-act:active i { transform: scale(.9); }
.w-act.primary i { background: var(--brand); border-color: transparent; color: #031a0e; }

/* skeletons: never a blank or a jump */
.sk { position: relative; overflow: hidden; display: block; border-radius: 8px; background: rgba(255 255 255 / .06); }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255 255 255 / .07), transparent); animation: w-shimmer 1.3s infinite; }
@keyframes w-shimmer { to { transform: translateX(100%); } }

/* cards and rows */
.w-card { display: grid; padding: 8px; border: 1px solid var(--edge); border-radius: var(--r3); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.w-card > h2 { padding: 12px 12px 8px; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.w-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 12px; border: 0; border-radius: var(--r2); background: none; text-align: left; color: var(--text); cursor: pointer; transition: background .2s, transform .15s var(--spring); }
.w-row:hover { background: rgba(255 255 255 / .04); }
.w-row:active { transform: scale(.985); }
.w-row.static { cursor: default; } .w-row.static:active { transform: none; }
.w-row > span { display: grid; gap: 4px; min-width: 0; }
.w-row b { font: 600 15px/1.25 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-row small { font: 400 12px/1.35 var(--mono); color: var(--soft); overflow-wrap: anywhere; }
.w-row .ci { width: 40px; height: 40px; padding: 9px; display: grid; place-items: center; font: 600 15px/1 var(--sans); background: var(--cc, var(--raise)); }
.w-row .ci.full { padding: 0; }
.w-num { text-align: right; }
.w-links { display: flex; gap: 12px; justify-content: flex-end; font: 500 12px/1 var(--mono); } .w-links a { color: var(--text); }
.w-note { padding: 16px 12px; font: 400 14px/1.5 var(--sans); color: var(--dim); }
.w-empty { display: grid; justify-items: center; gap: 12px; padding: 24px 16px 16px; text-align: center; }
.w-empty b { font: 600 18px/1.2 var(--sans); }
.qr { justify-self: center; width: min(232px, 64vw); padding: 12px; border-radius: var(--r2); background: #f4f4f1; }
.qr svg { display: block; width: 100%; height: auto; }
.w-addr { justify-self: start; padding: 0; border: 0; background: none; font: 500 15px/1.3 var(--mono); color: var(--text); cursor: pointer; }
.w-addr:hover { color: var(--accent); }
.addr-full { padding: 12px 16px; border: 1px solid var(--line-2); border-radius: var(--r1); font: 500 13.5px/1.5 var(--mono); color: var(--text); overflow-wrap: anywhere; }
.chip { justify-self: start; display: inline-block; padding: 5px 8px; border-radius: 99px; background: var(--raise); font: 600 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.chip.ok { background: rgba(var(--accent-rgb) / .14); color: var(--ok); } .chip.warn { background: rgba(255 201 74 / .14); color: var(--warn); } .chip.bad { background: rgba(255 77 77 / .14); color: #ff8a8a; }

/* trading by tag */
.w-trade { gap: 12px; padding: 16px; }
.w-chain { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--edge); border-radius: var(--r2); background: rgba(255 255 255 / .02); }
.w-chain > span { display: grid; gap: 4px; } .w-chain b { font: 600 16px/1.2 var(--sans); } .w-chain small { font: 400 12.5px/1.35 var(--sans); color: var(--soft); }
.switch.big { padding: 0; border: 0; background: none; }
.switch.big i { width: 56px; height: 32px; } .switch.big i::after { top: 4px; left: 4px; width: 24px; height: 24px; }
.switch.big[aria-checked="true"] i::after { translate: 24px 0; }
.switch:disabled { opacity: .45; cursor: not-allowed; }
.w-slider { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--edge); border-radius: var(--r2); }
.w-slider span { display: flex; justify-content: space-between; font: 500 14px/1 var(--sans); color: var(--dim); } .w-slider b { font: 600 16px/1 var(--sans); color: var(--text); font-variant-numeric: tabular-nums; }
.w-slider input { width: 100%; height: 28px; margin: 0; background: none; accent-color: var(--accent); cursor: pointer; }
.meter { height: 6px; border-radius: 99px; background: var(--raise); overflow: hidden; }
.meter i { display: block; width: calc(var(--v) * 100%); height: 100%; background: var(--brand); transition: width .6s var(--spring); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--raise); color: var(--dim); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { background: rgba(var(--accent-rgb) / .14); color: var(--ok); } .pill.frozen { background: rgba(120 180 255 / .14); color: #9cc8ff; }

/* wallets */
.w-wallets { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 8px; padding: 0 8px 8px; }
.w-wallet { position: relative; display: grid; gap: 12px; align-content: start; padding: 16px; border: 1px solid var(--edge); border-radius: var(--r2); background: rgba(255 255 255 / .02); }
.w-wallet header { display: flex; align-items: center; gap: 8px; }
.w-wallet.new { place-items: center; min-height: 104px; border-style: dashed; background: none; font: 500 14px/1 var(--sans); color: var(--dim); cursor: pointer; transition: border-color .2s, color .2s, transform .15s var(--spring); }
.w-wallet.new:hover { color: var(--text); border-color: var(--soft); } .w-wallet.new:active { transform: scale(.98); }
.w-menu { position: relative; margin-left: auto; }
.w-menu summary { list-style: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 600 18px/1 var(--sans); color: var(--dim); cursor: pointer; }
.w-menu summary::-webkit-details-marker { display: none; }
.w-menu summary:hover { background: rgba(255 255 255 / .06); color: var(--text); }
.w-menu > div { position: absolute; z-index: 5; top: 36px; right: 0; display: grid; min-width: 160px; padding: 6px; border: 1px solid var(--line-2); border-radius: var(--r1); background: #121211; box-shadow: 0 18px 40px -12px rgba(0 0 0 / .7); animation: w-in .25s var(--spring) both; }
.w-menu > div button { padding: 10px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font: 500 14px/1 var(--sans); color: var(--text); cursor: pointer; }
.w-menu > div button:hover { background: rgba(255 255 255 / .06); }

/* sheets: a centered modal on desktop, a bottom sheet you can drag down on phones */
.sheet { width: min(440px, calc(100% - 24px)); max-height: calc(100% - 24px); margin: auto; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r3); background: #0c0c0b; color: var(--text); overflow: auto; }
.sheet[open] { animation: w-pop .4s var(--spring) both; }
@keyframes w-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.sheet::backdrop { background: rgba(0 0 0 / .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet-in { position: relative; display: grid; gap: 16px; padding: 24px; }
.sheet h2 { font: 700 26px/1.1 var(--sans); letter-spacing: -.03em; padding-right: 40px; }
.sheet-x { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 50%; background: none; font: 400 20px/1 var(--sans); color: var(--dim); cursor: pointer; }
.grab { display: none; justify-self: center; width: 40px; height: 5px; margin: -8px 0 0; border-radius: 99px; background: rgba(255 255 255 / .22); touch-action: none; cursor: grab; }
.coin-head { display: flex; align-items: center; gap: 12px; } .coin-head .ci { width: 44px; height: 44px; padding: 10px; display: grid; place-items: center; background: var(--cc, var(--raise)); } .coin-head .ci.full { padding: 0; } .coin-head h2 { padding: 0; }
.row-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.wd { display: grid; gap: 8px; }
.wd .w-row.pick { border: 1px solid var(--line-2); border-radius: var(--r1); background: #0f0f0e; }
.wd .w-row.pick .w-num small { color: var(--accent); }
.w-list { display: grid; gap: 2px; margin: 0 -12px; }
.w-row[aria-current="true"] { background: rgba(var(--accent-rgb) / .08); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb) / .35); }
.wd input { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r1); background: #0f0f0e; font: 500 15px/1 var(--mono); color: var(--text); }
.wd .q-v input { flex: 1; }
.note.bad { color: #ff8a8a; }

@media (max-width: 860px) {
  .app { padding-top: 8px; }
  .wapp { grid-template-columns: minmax(0, 1fr); }
  .w-rail { position: fixed; z-index: 40; top: auto; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px; border-radius: 22px; box-shadow: 0 16px 40px -12px rgba(0 0 0 / .8); }
  .w-me { display: none; }
  .w-tab { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 4px; font-size: 11px; }
  .w-mechip { display: inline-flex; }
  .app-page.in .top nav a:not(.x) { display: none; } /* the tab bar is the navigation inside the app */
  .w-wallet.new { min-height: 64px; }
  .w-acts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .sheet { width: 100%; max-width: none; max-height: 90dvh; margin: auto 0 0; border-width: 1px 0 0; border-radius: var(--r3) var(--r3) 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .sheet[open] { animation: w-up .45s var(--spring) both; }
  .grab { display: block; }
}
@keyframes w-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .w-panel, .sheet[open], .w-menu > div { animation: none; } .sk::after { animation: none; } .meter i { transition: none; } }

/* the pieces moved out of grokto.css with the old panel: the switch and a label/value row */
.switch { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line-2); border-radius: 99px; background: none; font: 500 14px/1 var(--sans); color: var(--text); cursor: pointer; }
.switch i { position: relative; width: 34px; height: 20px; border-radius: 99px; background: var(--raise); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--dim); transition: translate .25s var(--spring), background .2s; }
.switch[aria-checked="true"] i { background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb) / .5); }
.switch[aria-checked="true"] i::after { translate: 14px 0; background: #050505; }
.cap { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 400 14px/1.3 var(--sans); color: var(--dim); }
.cap span { font: 500 15px/1.3 var(--mono); color: var(--text); text-align: right; overflow-wrap: anywhere; }
.w-row.order { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.w-row.order .chip { margin-bottom: 4px; }
.w-row .ci svg { width: 20px; height: 20px; }
.w-caps { display: grid; gap: 8px; }
.btn[aria-busy="true"] { opacity: 1; filter: none; cursor: progress; } /* "Loading…" while Privy starts: never a blank, greyed button */
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.trade-note { max-width: 46ch; text-align: center; text-wrap: balance; } /* the sign-in disclosure: signing in switches trading by tag on */
.w-chains { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.w-presets { display: flex; flex-wrap: wrap; gap: 8px; } /* the daily limit sheet: a few amounts, or type one */
.w-presets button { padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 99px; font: 500 13.5px/1 var(--mono); color: var(--text); transition: border-color .2s, transform .15s var(--spring); }
.w-presets button:hover { border-color: var(--soft); } .w-presets button:active { transform: scale(.95); }
