/* foldoy: the one header and the one footer of every page outside the inbox and the landing (swap, pricing, add funds,
   payments, legal, guides, log in, sign up). Built from the inbox's top bar: the same mark and name, the same 56 px bar,
   neutral greys, 8 px buttons. Self-contained (its own values), so the log-in page, which doesn't load site.css, wears
   it the same. */

.sh, .sf {
  --sh-bg: #101010; --sh-pop: #161616; --sh-ink: #F5F5F7; --sh-ink-2: #A3A3AA; --sh-mute: #8E8E94;
  --sh-hair: rgba(255, 255, 255, .085); --sh-ring: rgba(255, 255, 255, .14); --sh-hover: rgba(255, 255, 255, .06); --sh-sel: rgba(255, 255, 255, .09);
  font-family: "Geist Var", "Geist", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.012em; -webkit-font-smoothing: antialiased;
}
.sh *, .sf * { box-sizing: border-box; }
.sh [hidden], .sf [hidden] { display: none !important; }

/* ---------- header ---------- */
.sh { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 20px;
  padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right));
  background: var(--sh-bg); color: var(--sh-ink); font-size: 14px; font-weight: 500; line-height: 1; }
.sh a { color: inherit; text-decoration: none; }
.sh-brand { flex: none; display: inline-flex; align-items: center; gap: 9px; height: 40px; margin-right: 18px; padding: 0 4px; border-radius: 8px;
  font-size: 18px; font-weight: 680; letter-spacing: -.04em; color: var(--sh-ink); }
.sh-logo { flex: none; width: 22px; height: 22px; fill: currentColor; }
.sh-nav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.sh-nav a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 8px; color: var(--sh-ink-2); white-space: nowrap;
  transition: background-color .12s, color .12s; }
.sh-nav a:hover { background: var(--sh-hover); color: var(--sh-ink); }
.sh-nav a[aria-current="page"] { background: var(--sh-sel); color: var(--sh-ink); font-weight: 600; }
.sh-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sh-bal { display: inline-flex; align-items: center; height: 34px; padding: 0 8px; border-radius: 8px; color: var(--sh-ink-2); font-weight: 550;
  font-variant-numeric: tabular-nums; white-space: nowrap; transition: background-color .12s, color .12s; }
.sh-bal:hover { background: var(--sh-hover); color: var(--sh-ink); }
.sh-btn { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px; border-radius: 8px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--sh-ring); color: var(--sh-ink); font-weight: 600; transition: background-color .12s, box-shadow .12s; }
.sh-btn:hover { background: var(--sh-hover); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26); }
.sh-btn.ghost { box-shadow: none; }
.sh-btn[aria-current="page"] { background: var(--sh-sel); }
.sh-btn.ghost:hover { box-shadow: none; }
.sh-btn.primary { background: var(--sh-ink); color: #101010; box-shadow: none; }
.sh-btn.primary:hover { background: #FFFFFF; }
.sh a:focus-visible, .sh summary:focus-visible, .sf a:focus-visible, .sf button:focus-visible { outline: 2px solid var(--sh-ink); outline-offset: 2px; }

/* phones: the mark and one Menu (a <details>, so it opens with scripts off) */
.sh-menu { display: none; position: relative; margin-left: auto; }
.sh-menu > summary { list-style: none; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--sh-ring); font-weight: 600; user-select: none; -webkit-user-select: none; }
.sh-menu > summary::-webkit-details-marker { display: none; }
.sh-menu[open] > summary { background: var(--sh-sel); }
.sh-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(320px, calc(100vw - 32px)); padding: 6px; border-radius: 14px; background: var(--sh-pop);
  box-shadow: 0 0 0 1px var(--sh-ring), 0 24px 64px rgba(0, 0, 0, .6); }
.sh-panel nav a { display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 8px; font-size: 16px; color: var(--sh-ink); }
.sh-panel nav a:hover { background: var(--sh-hover); }
.sh-panel nav a[aria-current="page"] { background: var(--sh-sel); font-weight: 600; }
.sh-acct { margin-top: 6px; padding: 10px 6px 4px; box-shadow: inset 0 1px 0 var(--sh-hair); }
.sh-acct-row { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 6px; border-radius: 8px; font-size: 15px; color: var(--sh-ink-2); }
.sh-acct-row b { color: var(--sh-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-acts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding-top: 6px; }
.sh-acts .sh-btn { height: 44px; font-size: 15px; }
@media (max-width: 760px) {
  .sh { height: 56px; padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .sh-brand { margin-right: 0; }
  .sh > .sh-nav, .sh > .sh-end { display: none; }
  .sh-menu { display: block; }
}

/* ---------- footer: one line ---------- */
.sf { margin-top: auto; color: var(--sh-mute); font-size: 13.5px; line-height: 1.4; }
.sf-in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px;
  padding: 16px max(24px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.sf a { color: inherit; text-decoration: none; padding: 4px 0; transition: color .12s; }
.sf a:hover { color: var(--sh-ink); }
.sf .sf-end { margin-left: auto; display: inline-flex; align-items: center; gap: 22px; }
.sf .hosted { display: inline-flex; align-items: center; gap: 8px; }
.sf .hosted img { width: 19px; height: 14px; }
.sf .htmlsw-form { display: inline-flex; margin: 0; }
.sf button.htmlsw { display: inline-flex; align-items: center; gap: 9px; padding: 4px 0; border: 0; background: none; cursor: pointer;
  color: inherit; font: inherit; letter-spacing: inherit; white-space: nowrap; transition: color .12s; }
.sf button.htmlsw:hover, .sf button.htmlsw.on { color: var(--sh-ink); }
.sf .htmlsw .sw { position: relative; flex: none; width: 28px; height: 16px; border-radius: 8px; background: #2E2E32; transition: background .15s; }
.sf .htmlsw .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--sh-ink); transition: transform .15s; }
.sf .htmlsw.on .sw { background: #6BA6FF; }
.sf .htmlsw.on .sw::after { transform: translateX(12px); }
@media (max-width: 760px) {
  .sf-in { justify-content: center; gap: 4px 18px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .sf .sf-end { margin-left: 0; width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .sh *, .sf * { transition: none !important; } }
