/* =====================================================================
   Fox MINT theme — the PNL card's look across the whole terminal.
   Loaded after style.css; only restyles, never hides features.
   ===================================================================== */
:root {
  --bg: #070908;
  --panel: #0e1311;
  --panel2: #131a16;
  --line: #222c27;
  --text: #eef4f0;
  --muted: #86948c;
  --accent: #c4f542;
  --accent-ink: #0a0d0b;
  --ok: #3ef08a;
  --bad: #ff4d6d;
  --warn: #ffc24d;
  --fox: #ff7a2a;
  --fox2: #ffb25c;
  --glass: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  --glass-line: rgba(255,255,255,.085);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --display: "Unbounded", "Space Grotesk", system-ui, sans-serif;
  --fox-head: 64px;
}

/* ---- page: deep background, soft glows, dot grid ---- */
html { background: var(--bg); scroll-behavior: smooth; }
/* style.css sets overflow-x: hidden on html and body, which turns body into a scroll box and stops the
   top bar and contract bar from sticking. clip still prevents sideways scrolling without that. */
html, body { overflow-x: clip; }
body {
  font-family: var(--sans); font-size: 14px; letter-spacing: .1px;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(62,240,138,.10), transparent 60%),
    radial-gradient(760px 480px at 100% 0%, rgba(255,122,42,.11), transparent 60%),
    radial-gradient(900px 600px at 70% 110%, rgba(196,245,66,.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.35) 70%, transparent 100%);
}
::selection { background: rgba(196,245,66,.3); }
* { scrollbar-width: thin; scrollbar-color: #2a3530 transparent; }

/* ---- top bar: logo · main tabs · chain · bell/lock, then section shortcuts ---- */
header {
  flex-wrap: wrap; row-gap: 10px; padding: 12px 24px;
  background: rgba(7,9,8,.78); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--glass-line);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.brand { font-size: 19px; }
.chainbar { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.chainbar .dot { box-shadow: 0 0 10px var(--ok); }

/* main tabs as one pill switch */
.tabs.fox-nav {
  border: 1px solid var(--glass-line); border-radius: 999px; padding: 4px; gap: 2px;
  background: rgba(255,255,255,.035); flex: none;
}
.fox-nav .tab {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 8px 16px;
  font-family: var(--sans); font-weight: 700; font-size: 13.5px; letter-spacing: .2px; text-transform: none;
  color: var(--muted); transition: color .15s, background .15s, box-shadow .15s;
}
.fox-nav .tab svg { width: 16px; height: 16px; flex: none; }
.fox-nav .tab > * { pointer-events: none; }   /* app.js reads data-tab from the clicked element */
.fox-nav .tab kbd { font: 600 10px/1 var(--mono); color: inherit; opacity: .55; border: 1px solid currentColor; border-radius: 4px; padding: 2px 4px; }
.fox-nav .tab:hover { color: var(--text); background: rgba(255,255,255,.05); }
.fox-nav .tab.active {
  color: var(--accent-ink); background: linear-gradient(135deg, #d9ff6a, var(--accent));
  box-shadow: 0 6px 20px rgba(196,245,66,.25), inset 0 1px 0 rgba(255,255,255,.4);
}
.fox-nav .tab.active kbd { opacity: .5; }
/* while the vault is locked there is nothing to navigate */
body:has(#appView.hidden) .fox-nav, body:has(#appView.hidden) .fox-sections { display: none; }

/* section tabs: one per titled section of the open tab; only the picked one shows */
.fox-sections {
  flex-basis: 100%; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding-top: 2px; margin: 0 -2px;
}
.fox-sections::-webkit-scrollbar { display: none; }
.fox-sections:empty { display: none; }
main section[data-fox-off] { display: none !important; }
.fox-sections button {
  flex: none; background: transparent; color: var(--muted); border: 1px solid var(--glass-line); border-radius: 999px;
  padding: 5px 12px; font: 600 12.5px/1.2 var(--sans); transition: all .15s;
}
.fox-sections button:hover { color: var(--text); border-color: rgba(255,255,255,.2); filter: none; }
.fox-sections button.on { color: var(--accent); border-color: rgba(196,245,66,.45); background: rgba(196,245,66,.08); }

/* ---- layout ---- */
main { max-width: 1180px; padding: 24px 20px 80px; gap: 18px; }
.tabpanel, #tab-mint { gap: 18px; }
main > nav.tabs[role=tablist] { display: none; }   /* moved into the top bar */
main section, .tabpanel > section { scroll-margin-top: calc(var(--fox-head) + 16px); }

/* ---- cards: glass panels ---- */
.card {
  background: var(--glass), var(--panel);
  border: 1px solid var(--glass-line); border-radius: 20px; padding: 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px rgba(0,0,0,.28);
}
.card.narrow { border-radius: 22px; padding: 28px; position: relative; overflow: hidden; }
/* Phones: the sign-in card keeps a gap from the screen edges */
@media (max-width: 420px) { .card.narrow { margin: 48px 16px; padding: 24px 20px; } }
.card.narrow::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--ok), var(--accent), var(--fox)); }
.mm-card { border-radius: 20px; padding: 22px; }
.sub { background: rgba(255,255,255,.025); border: 1px solid var(--glass-line); border-radius: 14px; }
h2 { font-family: var(--sans); font-weight: 700; font-size: 17px; letter-spacing: .1px; }
.mm-head h2, .dist-head h2 { font-size: 18px; }
h3 { font-family: var(--sans); letter-spacing: 2px; font-size: 11px; font-weight: 700; }
label { font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .2px; }
.mm-ic { border-radius: 11px; box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.35); }
.mm-ic.mint { background: linear-gradient(135deg, #e2ff7a, var(--accent)); }
.mm-ic.buy { background: linear-gradient(135deg, #a9dcff, #5fb4ff); }
.mm-ic.list { background: linear-gradient(135deg, var(--fox2), var(--fox)); }
.mm-ic.offer { background: linear-gradient(135deg, #d0bdff, #9a7bff); }

/* ---- inputs ---- */
input, select, textarea {
  background: rgba(0,0,0,.35); border: 1px solid var(--glass-line); border-radius: 12px; padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: rgba(255,255,255,.16); }
input:focus, select:focus, textarea:focus { border-color: rgba(196,245,66,.7); box-shadow: 0 0 0 4px rgba(196,245,66,.12); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
select { cursor: pointer; }
#caShared { border-radius: 14px; padding: 12px 16px; background: rgba(0,0,0,.45); }

/* ---- buttons ---- */
button {
  border-radius: 12px; padding: 9px 16px; font-family: var(--sans); font-weight: 700; letter-spacing: .1px;
  background: linear-gradient(135deg, #d9ff6a, var(--accent)); border-color: transparent;
  box-shadow: 0 6px 18px rgba(196,245,66,.18), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .12s, box-shadow .15s, filter .15s, background .15s, border-color .15s, color .15s;
}
button:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(196,245,66,.26), inset 0 1px 0 rgba(255,255,255,.4); }
button:active { transform: translateY(0); }
button.ghost {
  background: rgba(255,255,255,.04); border: 1px solid var(--glass-line); color: var(--text); box-shadow: none;
}
button.ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); box-shadow: none; }
button.danger, button.ghost.danger { color: var(--bad); }
button.ghost.danger:hover { border-color: rgba(255,77,109,.5); background: rgba(255,77,109,.08); }
button.primary.big, .dist-go { border-radius: 14px; font-size: 15px; }
button:disabled, button:disabled:hover { transform: none; box-shadow: none; filter: none; }
.tab, .dist-x, .chip, .fox-sections button { box-shadow: none; }
.tab:hover, .dist-x:hover, .chip:hover { transform: none; box-shadow: none; }

/* sub tabs (groups, list/edit…) as small pills */
.tabs:not(.fox-nav) { border-bottom: 0; gap: 6px; }
.subtabs .tab, .tabs:not(.fox-nav) .tab {
  border: 1px solid var(--glass-line); border-radius: 999px; padding: 6px 14px; font-family: var(--sans); font-weight: 700;
  letter-spacing: .3px; font-size: 12.5px; background: rgba(255,255,255,.03);
}
.subtabs .tab.active, .tabs:not(.fox-nav) .tab.active { color: var(--accent); border-color: rgba(196,245,66,.5); background: rgba(196,245,66,.1); }

/* chips & badges */
.chip { border-radius: 999px; border-color: var(--glass-line); font-family: var(--sans); font-weight: 600; }
.chip.on { background: linear-gradient(135deg, #d9ff6a, var(--accent)); border-color: transparent; }
.badge { border-radius: 999px; padding: 0 8px; border-color: rgba(196,245,66,.45); background: rgba(196,245,66,.08); }

/* ---- tables & lists ---- */
.tablewrap { border: 1px solid var(--glass-line); border-radius: 14px; background: rgba(0,0,0,.2); }
th { background: #111815; font-family: var(--sans); font-weight: 700; letter-spacing: 1.5px; font-size: 10.5px; }
th, td { border-bottom-color: rgba(255,255,255,.05); padding: 9px 12px; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255,255,255,.025); }
td a, .dist-who a { color: var(--accent); }
.dist-row { border-bottom-color: rgba(255,255,255,.05); }
.dist-row:hover { background: rgba(255,255,255,.02); }
.dist-box { border-color: var(--glass-line); border-radius: 14px; background: rgba(0,0,0,.18); }
.log div { border-bottom-color: rgba(255,255,255,.05); }

/* ---- dialogs ---- */
dialog {
  background: linear-gradient(180deg, #121916, #0b0f0d); border: 1px solid var(--glass-line); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.02);
}
dialog::backdrop { background: rgba(3,5,4,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dist-head { border-bottom-color: var(--glass-line); }

/* ---- big numbers get the card's display font ---- */
.cal-total, .pnl-main b, .fee-main b, #totalUsd, .total-big { font-family: var(--display); letter-spacing: -.5px; }
.cal-total.ok, .pnl-main b.ok { text-shadow: 0 0 30px rgba(62,240,138,.35); }
.cal-day { border-radius: 10px; background: rgba(255,255,255,.03); }
.cal-day.up { background: linear-gradient(180deg, rgba(62,240,138,.2), rgba(62,240,138,.07)); }
.cal-day.down { background: linear-gradient(180deg, rgba(255,77,109,.2), rgba(255,77,109,.07)); }
.ok { color: var(--ok); } .bad { color: var(--bad); }

/* sticky contract bar sits right under the top bar */
.ca-bar { top: var(--fox-head); border-radius: 18px; background: linear-gradient(180deg, rgba(20,28,24,.92), rgba(14,19,17,.92)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--glass-line); }
.ca-bar.set { border-color: rgba(196,245,66,.45); box-shadow: 0 10px 30px rgba(0,0,0,.4), 0 0 0 1px rgba(196,245,66,.08); }
.ca-ic { border-radius: 12px; }

/* back to top */
.fox-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 6; width: 44px; height: 44px; padding: 0; border-radius: 14px;
  display: grid; place-items: center; font-size: 18px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.fox-top.show { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  header { padding: 10px 14px; }
  .tabs.fox-nav { order: 5; flex-basis: 100%; overflow-x: auto; }
  .fox-nav .tab { flex: 1 0 auto; justify-content: center; }
  .fox-sections { order: 6; }
  .fox-nav .tab kbd { display: none; }
  .chainbar { flex-basis: 0; }
}
@media (max-width: 560px) {
  main { padding: 16px 12px 70px; }
  .card, .mm-card { padding: 16px; border-radius: 16px; }
  .fox-nav .tab { padding: 7px 8px; font-size: 12.5px; gap: 5px; }
  .fox-nav .tab svg { width: 14px; height: 14px; }
}
@media (max-width: 430px) { .fox-nav .tab svg { display: none; } }
/* Smallest phones: all five tabs fit on one line without scrolling */
@media (max-width: 360px) { .fox-nav .tab { padding: 7px 5px; font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
.fox-sections .fox-sep { flex: none; width: 1px; align-self: stretch; margin: 3px 4px; background: var(--glass-line); }

/* =====================================================================
   Home — "Mint Radar": a fox-themed 3-column mint terminal (home.js).
   Ember-dark warm panels, fox orange → amber as the brand accent, cream
   highlights, lime kept for live / healthy states. Scoped to Home.
   ===================================================================== */
#tab-home {
  --fx-bg: #0c0907; --fx-panel: #160f0b; --fx-card: #1c140f; --fx-card2: #251a12; --fx-chip: #2a1d14;
  --fx-line: rgba(255,170,110,.11); --fx-line2: rgba(255,138,61,.32);
  --fx-text: #fbf3ea; --fx-sub: #d8c4b2; --fx-muted: #9b8475;
  --fx-orange: #ff7a2a; --fx-amber: #ffb25c; --fx-ember: #ff5a1f; --fx-cream: #fff4e8; --fx-live: #c4f542;
  --fx-grad: linear-gradient(135deg, #ff6a1f 0%, #ff8a3d 45%, #ffb25c 100%);
  font-family: var(--sans); color: var(--fx-text);
}
body:has(#appView:not(.hidden) #tab-home:not(.hidden)) {
  background:
    radial-gradient(900px 520px at 6% -6%, rgba(255,122,42,.16), transparent 62%),
    radial-gradient(700px 480px at 100% 4%, rgba(255,178,92,.09), transparent 60%),
    radial-gradient(900px 600px at 60% 115%, rgba(255,90,31,.08), transparent 60%),
    #0c0907;
  background-attachment: fixed;
}
body:has(#tab-home:not(.hidden)) main { max-width: none; padding-left: 16px; padding-right: 16px; }
/* Profit & loss, Fees & spend and Activity show under every tab but Home */
body:has(#tab-home:not(.hidden)) main > section { display: none !important; }
/* …nor under Swap: it's a page of its own */
body:has(#tab-swap:not(.hidden)) main > section, body:has(#tab-disburse:not(.hidden)) main > section { display: none !important; }
.hx { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hx .mono { font-family: var(--mono); }
.hx .small { font-size: 11px; }
.hx-dim { color: var(--fx-muted); }

/* ---- hero ---- */
.hx-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: center; padding: 18px 20px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(120deg, rgba(255,122,42,.16), rgba(255,178,92,.05) 45%, rgba(22,15,11,.6)), var(--fx-panel);
  border: 1px solid var(--fx-line); box-shadow: 0 24px 60px -30px rgba(255,106,31,.45), inset 0 1px 0 rgba(255,255,255,.04); }
.hx-hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,138,61,.22), transparent 65%); pointer-events: none; }
.hx-brand { display: flex; align-items: center; gap: 16px; min-width: 0; position: relative; z-index: 1; }
.hx-fox { width: 60px; height: 60px; flex: none; filter: drop-shadow(0 6px 18px rgba(255,106,31,.55)); animation: fx-bob 5s ease-in-out infinite; }
@keyframes fx-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-2deg); } }
.hx-kicker { margin: 0 0 4px; font: 700 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fx-amber); }
.hx-title { margin: 0; font: 800 28px/1.05 var(--display); letter-spacing: -.01em;
  background: linear-gradient(90deg, var(--fx-cream), var(--fx-amber) 60%, var(--fx-orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hx-tag-line { margin: 6px 0 0; font-size: 13px; color: var(--fx-sub); }
.hx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; position: relative; z-index: 1; }
.hx-kpi { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(12,9,7,.55); border: 1px solid var(--fx-line); backdrop-filter: blur(6px); }
.hx-kpi span { font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fx-muted); white-space: nowrap; }
.hx-kpi b { font: 700 24px/1 var(--display); color: var(--fx-cream); }
.hx-kpi b.bump { animation: fx-bump 1.2s ease-out; }
@keyframes fx-bump { 0% { color: var(--fx-amber); text-shadow: 0 0 18px rgba(255,138,61,.9); } 100% { color: var(--fx-cream); text-shadow: none; } }

/* ---- search bar ---- */
.hx-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hx-search { display: flex; align-items: center; gap: 10px; flex: 0 1 420px; min-width: 220px; height: 42px; padding: 0 14px; background: var(--fx-card); border: 1px solid var(--fx-line); border-radius: 13px; color: var(--fx-muted); transition: border-color .15s, box-shadow .15s; }
.hx-search:focus-within { border-color: var(--fx-line2); box-shadow: 0 0 0 4px rgba(255,122,42,.12); }
.hx-search svg { width: 16px; height: 16px; flex: none; }
.hx-search input { all: unset; flex: 1; min-width: 0; font: 13.5px var(--sans); color: var(--fx-text); }
.hx-search input::placeholder { color: var(--fx-muted); }
.hx-toggle { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; background: var(--fx-card); border: 1px solid var(--fx-line); border-radius: 13px; font-size: 12.5px; font-weight: 600; color: var(--fx-sub); cursor: pointer; }
.hx-toggle input { width: auto; margin: 0; accent-color: var(--fx-orange); }
.hx-status { flex: 1; min-width: 0; font-size: 11.5px; color: var(--fx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
#tab-home .live-pill.on { color: var(--fx-live); border-color: rgba(196,245,66,.4); }
#tab-home .live-pill.on .live-dot { background: var(--fx-live); }

/* ---- project details ---- */
.hx-detail { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(220px, 1.2fr) auto minmax(220px, 1.4fr) minmax(300px, 2fr); gap: 20px; align-items: center; min-height: 92px; padding: 16px 48px 16px 18px; border-radius: 18px; background: var(--fx-panel); border: 1px solid var(--fx-line); }
.hx-detail::before { content: ""; position: absolute; inset: -40px; z-index: -2; background: var(--banner, none) center / cover no-repeat; filter: blur(30px) saturate(1.35); opacity: .38; transform: scale(1.1); transition: opacity .4s; }
.hx-detail::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14,10,7,.55), rgba(14,10,7,.86) 55%, rgba(14,10,7,.92)); }
.hx-detail.empty { display: flex; justify-content: center; border-style: dashed; border-color: rgba(255,170,110,.18); }
.hx-detail.empty::after { background: radial-gradient(500px 120px at 50% 50%, rgba(255,122,42,.08), transparent); }
.hx-ph { display: flex; align-items: center; gap: 14px; }
.hx-ph-fox { width: 40px; height: 40px; flex: none; opacity: .9; animation: fx-bob 4s ease-in-out infinite; }
.hx-ph b { display: block; font: 700 14.5px var(--sans); color: var(--fx-cream); }
.hx-ph span { font-size: 12px; color: var(--fx-muted); }
.hx-d-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hx-d-name { display: grid; gap: 5px; min-width: 0; }
.hx-d-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hx-d-title b { font: 800 19px var(--display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-d-addr { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fx-sub); }
.hx-icbtn { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.06); color: var(--fx-sub); font-size: 11px; text-decoration: none; }
.hx-icbtn:hover { color: var(--fx-amber); background: rgba(255,122,42,.14); }
.hx-d-act { display: grid; gap: 7px; }
.hx-btn { all: unset; cursor: pointer; box-sizing: border-box; text-align: center; height: 36px; line-height: 36px; padding: 0 16px; border-radius: 11px; background: rgba(255,255,255,.06); border: 1px solid var(--fx-line); color: var(--fx-text); font: 700 12.5px var(--sans); white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s; }
.hx-btn:hover { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.hx-btn.primary { background: var(--fx-grad); border-color: transparent; color: #1a0d06; box-shadow: 0 8px 22px -8px rgba(255,106,31,.75); }
.hx-btn.primary:hover { box-shadow: 0 10px 28px -6px rgba(255,106,31,.9); }
.hx-d-prog { display: grid; gap: 7px; min-width: 0; }
.hx-d-prog-top { display: flex; justify-content: space-between; gap: 10px; font: 700 10.5px var(--mono); letter-spacing: .1em; color: var(--fx-amber); }
.hx-d-prog-top b { color: var(--fx-cream); letter-spacing: 0; font-size: 13px; }
.hx-meter { position: relative; display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.hx-meter > span { position: relative; display: block; height: 100%; border-radius: 4px; background: var(--fx-grad); box-shadow: 0 0 14px rgba(255,122,42,.7); transition: width .8s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
.hx-meter > span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: translateX(-100%); animation: fx-shine 2.4s ease-in-out infinite; }
@keyframes fx-shine { to { transform: translateX(100%); } }
.hx-d-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; }
.hx-d-stats div { display: grid; gap: 3px; min-width: 0; }
.hx-d-stats span { font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fx-muted); white-space: nowrap; }
.hx-d-stats b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-x { all: unset; cursor: pointer; position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--fx-muted); font-size: 18px; }
.hx-x:hover { background: rgba(255,255,255,.08); color: var(--fx-text); }

/* ---- columns ---- */
.hx-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.hx-panel { position: relative; display: grid; grid-template-rows: auto 1fr; min-width: 0; padding: 12px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(38,26,18,.92), rgba(20,14,10,.94)); border: 1px solid var(--fx-line); box-shadow: 0 24px 48px -30px rgba(0,0,0,.9); }
/* narrow columns: drop the 24H box so names and supply stay readable */
.hx-panel { container-type: inline-size; }
@container (max-width: 330px) { .hx-mini { display: none; } .hx-rank { width: 18px; height: 18px; } .hx-row { gap: 8px; padding: 8px 9px; } }
/* A column never grows wider than its panel: before, a header too wide for a narrow column (Trending's title + the
   1m…24h switch) widened the whole column, so its rows ran under the next column and got cut off. */
.hx-panel { grid-template-columns: minmax(0, 1fr); }
.hx-head { min-width: 0; }
.hx-panel .hx-head .hx-seg { flex: 0 1 auto; min-width: 0; }
.hx-rate { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 360px) {   /* .hx-panel prefix: these must beat the general rules further down */
  .hx-panel .hx-head { gap: 6px; }
  .hx-panel .hx-head .hx-seg button { padding: 5px 5px; }
  .hx-panel .hx-spark { min-width: 28px; }
  .hx-panel .hx-rate-x { display: none; }
}
.hx-panel::before { content: ""; position: absolute; left: 18px; top: -1px; width: 56px; height: 2px; border-radius: 2px; background: var(--fx-grad); box-shadow: 0 0 12px rgba(255,122,42,.8); }
.hx-head { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 2px 10px; }
.hx-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 800 14px var(--display); color: var(--fx-cream); letter-spacing: 0; text-transform: none; white-space: nowrap; }
.hx-hic { flex: none; width: 16px; height: 16px; color: var(--fx-orange); filter: drop-shadow(0 0 6px rgba(255,122,42,.7)); }
.hx-count { font: 500 11px var(--mono); color: var(--fx-muted); }
.hx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fx-live); box-shadow: 0 0 10px var(--fx-live); animation: pulse 1.4s ease-in-out infinite; }
.hx-spark { flex: 1; min-width: 50px; height: 26px; }
.hx-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hx-spark polyline { fill: none; stroke: var(--fx-orange); stroke-width: 1.75; vector-effect: non-scaling-stroke; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(255,122,42,.6)); }
.hx-rate { font-size: 10.5px; color: var(--fx-muted); white-space: nowrap; }
.hx-rate b { font: 700 13px var(--display); color: var(--fx-cream); }

/* segmented chips */
.hx-seg { display: inline-flex; gap: 2px; padding: 3px; margin-left: auto; background: rgba(0,0,0,.35); border: 1px solid var(--fx-line); border-radius: 12px; flex: none; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.hx-panel .hx-head .hx-seg:first-child { margin-left: 0; }
.hx-seg button { all: unset; cursor: pointer; padding: 5px 9px; border-radius: 9px; font: 700 11px var(--sans); color: var(--fx-sub); white-space: nowrap; transition: color .15s, background .15s; }
.hx-seg button:hover { color: var(--fx-cream); background: rgba(255,255,255,.05); }
.hx-seg button.on { background: var(--fx-grad); color: #1a0d06; box-shadow: 0 4px 14px -4px rgba(255,106,31,.8); }
.hx-seg button b { font-weight: 700; opacity: .7; margin-left: 3px; }
.hx-seg.small button { padding: 4px 7px; font-size: 10.5px; }

/* rows */
.hx-list { display: grid; align-content: start; gap: 7px; overflow-y: auto; height: calc(100vh - var(--fox-head) - 230px); min-height: 380px; padding: 2px 3px 2px 1px; scrollbar-width: thin; scrollbar-color: #3a2a1e transparent; }
.hx-row { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 11px; background: var(--fx-card); border: 1px solid rgba(255,255,255,.03); border-radius: 13px;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), background .18s, border-color .18s, box-shadow .18s; }
.hx-row:hover { transform: translateY(-1px); background: var(--fx-card2); border-color: rgba(255,138,61,.28); box-shadow: 0 10px 22px -14px rgba(255,106,31,.6); }
.hx-row.on { border-color: var(--fx-orange); box-shadow: 0 0 0 1px rgba(255,122,42,.35), 0 10px 26px -14px rgba(255,106,31,.8); background: linear-gradient(90deg, rgba(255,122,42,.12), var(--fx-card2)); }
.hx-row.fresh { animation: fx-in 2.4s ease-out; }
.hx-row.fresh::before { content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--fx-grad); box-shadow: 0 0 10px rgba(255,122,42,.9); animation: fx-fade 2.4s ease-out forwards; }
@keyframes fx-in { 0% { background: rgba(255,122,42,.24); transform: translateX(-4px); } 25% { transform: none; } 100% { background: var(--fx-card); } }
@keyframes fx-fade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
.hx-rank { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 7px; background: rgba(255,255,255,.06); font: 700 10.5px var(--mono); color: var(--fx-muted); }
.hx-row.top .hx-rank { background: var(--fx-grad); color: #1a0d06; box-shadow: 0 0 10px rgba(255,122,42,.5); }
.hx-ic { position: relative; overflow: hidden; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; font: 800 12px var(--display); color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 62% 46%), hsl(calc(var(--h) + 40) 70% 28%)); box-shadow: inset 0 0 0 1px rgba(255,220,190,.16), 0 4px 12px -6px rgba(0,0,0,.8); text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.hx-ic.big { width: 58px; height: 58px; border-radius: 15px; font-size: 17px; box-shadow: inset 0 0 0 1px rgba(255,220,190,.22), 0 10px 28px -10px rgba(255,106,31,.6); }
.hx-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--fx-card2); }
.hx-main { display: grid; gap: 3px; flex: 1; min-width: 0; }
.hx-main > b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-sub { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 11px; color: var(--fx-sub); white-space: nowrap; overflow: hidden; }
.hx-sub b { font-weight: 700; color: var(--fx-cream); }
.hx-px { display: inline-flex; align-items: center; gap: 3px; }
.hx-eth { width: 7px; height: 11px; color: var(--fx-amber); }
.hx-free { color: var(--fx-live) !important; }
.hx-minibar { display: block; height: 3px; margin-top: 2px; border-radius: 2px; background: rgba(255,255,255,.07); overflow: hidden; }
.hx-minibar i { display: block; height: 100%; border-radius: 2px; background: var(--fx-grad); }
.hx-right { display: grid; justify-items: end; gap: 4px; flex: none; }
.hx-plus { flex: none; padding: 3px 8px; border-radius: 999px; background: rgba(255,122,42,.14); border: 1px solid rgba(255,138,61,.25); font: 700 12px var(--mono); color: var(--fx-amber); }
.hx-mini { display: grid; justify-items: center; gap: 1px; flex: none; min-width: 44px; padding: 3px 7px; background: rgba(0,0,0,.3); border: 1px solid var(--fx-line); border-radius: 9px; }
.hx-mini span { font: 700 8.5px var(--mono); color: var(--fx-muted); letter-spacing: .06em; }
.hx-mini b { font: 700 11px var(--mono); color: var(--fx-cream); }
.hx-took { font: 800 13px var(--display); color: var(--fx-amber); }
.hx-when { font-size: 12px; font-weight: 700; color: var(--fx-cream); }
.hx-tag { display: inline-flex; align-items: center; height: 19px; padding: 0 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; flex: none; }
.hx-tag.sold { background: rgba(255,122,42,.16); color: var(--fx-amber); }
.hx-tag.live { background: rgba(196,245,66,.14); color: var(--fx-live); }
.hx-tag.up { background: rgba(255,244,232,.1); color: var(--fx-cream); }
.hx-empty, .hx-note { margin: 8px 4px; font-size: 12px; color: var(--fx-muted); }

/* ---- best time (side panel) ---- */
.hx-recs { display: grid; gap: 7px; }
.hx-rec { display: grid; gap: 3px; padding: 10px 12px; background: var(--fx-card); border-radius: 12px; border: 1px solid var(--fx-line); border-left: 3px solid var(--fx-chip); }
.hx-rec span { font: 700 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fx-muted); }
.hx-rec b { font: 800 15px var(--display); color: var(--fx-cream); }
.hx-rec small { font-size: 11px; color: var(--fx-sub); line-height: 1.4; }
.hx-rec.launch { border-left-color: var(--fx-orange); }
.hx-rec.mint { border-left-color: var(--fx-live); }
.hx-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 11.5px; font-weight: 700; color: var(--fx-sub); }
.hx-chart-head .hx-seg { margin-left: 0; }
.hx-legend { display: flex; align-items: center; gap: 6px; margin: 2px 2px 0; font-size: 11px; color: var(--fx-muted); }
.hx-legend .sw { width: 9px; height: 9px; border-radius: 3px; margin-left: 8px; }
.hx-legend .sw.L { background: var(--fx-orange); margin-left: 0; }
.hx-legend .sw.M { background: var(--fx-live); }
#tab-home .hm-chart { position: relative; }
#tab-home .hm-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
#tab-home .hm-chart .base { stroke: var(--fx-line); }
#tab-home .hm-chart .hit { fill: transparent; }
#tab-home .hm-chart .fill { fill: #3b2a1f; transition: fill .15s; }
#tab-home .hm-chart .tag-L .fill { fill: var(--fx-orange); }
#tab-home .hm-chart .tag-M .fill { fill: var(--fx-live); }
#tab-home .hm-chart .hm-bar:hover .fill { fill: var(--fx-cream); }
#tab-home .hm-chart .axis { fill: var(--fx-muted); font: 9.5px var(--mono); text-anchor: middle; }
#tab-home .hm-tip { position: absolute; z-index: 5; max-width: 260px; pointer-events: none; background: #120c08; border: 1px solid var(--fx-line2); border-radius: 10px; padding: 7px 10px; font-size: 11.5px; color: var(--fx-text); box-shadow: 0 10px 28px rgba(0,0,0,.6); }

@media (prefers-reduced-motion: reduce) {
  #tab-home *, #tab-home *::before, #tab-home *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 1180px) {
  .hx-detail { grid-template-columns: minmax(0, 1fr) auto; }
  .hx-d-prog, .hx-d-stats { grid-column: 1 / -1; }
  .hx-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .hx-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-cols > :last-child { grid-column: 1 / -1; }
  .hx-cols > :last-child .hx-list { height: auto; max-height: 520px; min-height: 0; }
}
@media (max-width: 640px) {
  .hx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-title { font-size: 22px; }
  .hx-cols { grid-template-columns: 1fr; }
  .hx-list { height: auto; max-height: 460px; min-height: 0; }
  .hx-detail { grid-template-columns: 1fr; padding-right: 18px; }
  .hx-d-act { grid-auto-flow: column; }
  .hx-d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-status { text-align: left; flex-basis: 100%; }
}
/* Small phones (iPhone SE and narrower): the four counters and the search box fit without spilling off the right edge */
@media (max-width: 380px) {
  .hx-hero { padding: 16px 14px; gap: 14px; }
  .hx-kpis { gap: 8px; }
  .hx-kpi { padding: 10px; }
  .hx-kpi span { white-space: normal; letter-spacing: .04em; }
  .hx-kpi b { font-size: 21px; }
  .hx-search { min-width: 0; flex: 1 1 100%; }
}

/* Watch: search bar (paste a contract address) */
/* Profit & loss, Fees & spend and Activity show under every tab but Home and Watch */
body:has(#tab-watch:not(.hidden)) main > section { display: none !important; }
.wx-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.wx-field { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; background: var(--panel); border: 1px solid var(--glass-line); border-radius: 14px; color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.wx-field:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.wx-field svg { width: 18px; height: 18px; flex: none; }
.wx-field input { all: unset; flex: 1; min-width: 0; font: 14px var(--mono); color: var(--text); }
.wx-field input::placeholder { color: var(--muted); font-family: var(--sans); }
.wx-search > button { height: 48px; padding: 0 22px; border-radius: 14px; }
.wx-hint { grid-column: 1 / -1; margin: -2px 4px 0; min-height: 0; font-size: 12px; color: var(--muted); }
.wx-hint:empty { display: none; }
.watch-card.hidden { display: none; }

/* =====================================================================
   Fox theme, app-wide: ember-dark warm surfaces with fox orange → amber as
   the accent on every tab (it was lime). Green still means profit / OK and
   red still means loss / danger. Overrides the rules above; Home's own
   block (#tab-home) uses the same palette.
   ===================================================================== */
:root {
  --bg: #0c0907; --panel: #160f0b; --panel2: #1e150f; --line: #2e2118;
  --text: #fbf3ea; --muted: #a08a7a;
  --accent: #ff8a3d; --accent-ink: #1a0d06;
  --glass: linear-gradient(180deg, rgba(255,190,140,.055), rgba(255,190,140,.015));
  --glass-line: rgba(255,170,110,.11);
  --fox-grad: linear-gradient(135deg, #ff6a1f 0%, #ff8a3d 45%, #ffb25c 100%);
}
body {
  background:
    radial-gradient(900px 520px at 6% -6%, rgba(255,122,42,.14), transparent 62%),
    radial-gradient(760px 480px at 100% 0%, rgba(255,178,92,.08), transparent 60%),
    radial-gradient(900px 600px at 60% 115%, rgba(255,90,31,.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before { background-image: radial-gradient(rgba(255,210,170,.045) 1px, transparent 1.4px); }
::selection { background: rgba(255,122,42,.32); }
* { scrollbar-color: #3a2a1e transparent; }

/* top bar */
header { background: rgba(12,9,7,.8); box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 1px 0 rgba(255,138,61,.06); }
.brand { background: var(--fox-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-fox { filter: drop-shadow(0 3px 10px rgba(255,106,31,.5)); }
.fox-nav .tab.active { background: var(--fox-grad); color: var(--accent-ink); box-shadow: 0 6px 22px rgba(255,106,31,.38), inset 0 1px 0 rgba(255,255,255,.35); }
.fox-sections button.on { color: var(--fox2); border-color: rgba(255,138,61,.5); background: rgba(255,122,42,.1); }
.fox-sections button:hover { border-color: rgba(255,170,110,.3); }

/* surfaces */
.card { box-shadow: 0 1px 0 rgba(255,220,190,.04) inset, 0 18px 40px rgba(0,0,0,.35); }
.card.narrow::before { background: var(--fox-grad); }
.sub { background: rgba(255,200,160,.025); }
th { background: #1a120d; }
tbody tr:hover { background: rgba(255,170,110,.035); }
td a, .dist-who a { color: var(--fox2); }
a { color: var(--fox2); }
dialog { background: linear-gradient(180deg, #1c140f, #0f0a07); box-shadow: 0 30px 80px rgba(0,0,0,.65), 0 0 0 1px rgba(255,138,61,.06); }
dialog::backdrop { background: rgba(8,5,3,.66); }
.ca-bar { background: linear-gradient(180deg, rgba(30,21,15,.94), rgba(20,14,10,.94)); }
.ca-bar.set { border-color: rgba(255,138,61,.5); box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(255,122,42,.1), 0 0 30px -10px rgba(255,106,31,.45); }
.ca-ic { background: var(--fox-grad); color: var(--accent-ink); }

/* section icons */
.mm-ic.mint { background: var(--fox-grad); }
.mm-ic.list { background: linear-gradient(135deg, #fff1dc, #ffc98a); }

/* inputs */
input:focus, select:focus, textarea:focus { border-color: rgba(255,138,61,.75); box-shadow: 0 0 0 4px rgba(255,122,42,.14); }
input:hover, select:hover, textarea:hover { border-color: rgba(255,190,140,.2); }

/* buttons */
button { background: var(--fox-grad); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(255,106,31,.25), inset 0 1px 0 rgba(255,255,255,.3); }
button:hover { box-shadow: 0 10px 26px rgba(255,106,31,.38), inset 0 1px 0 rgba(255,255,255,.35); }
button.ghost { background: rgba(255,220,190,.04); color: var(--text); box-shadow: none; }
button.ghost:hover { background: rgba(255,170,110,.08); border-color: rgba(255,170,110,.28); box-shadow: none; }
.fox-top { background: var(--fox-grad); color: var(--accent-ink); }

/* pills, chips, badges */
.subtabs .tab.active, .tabs:not(.fox-nav) .tab.active { color: var(--fox2); border-color: rgba(255,138,61,.55); background: rgba(255,122,42,.12); }
.chip.on { background: var(--fox-grad); color: var(--accent-ink); }
.badge { border-color: rgba(255,138,61,.45); background: rgba(255,122,42,.1); color: var(--fox2); }

/* Watch tab: live cards + mint page */
.watch-card { background: var(--panel2); border-color: var(--glass-line); border-radius: 14px; transition: transform .18s, border-color .18s, box-shadow .18s; }
.watch-card:hover { transform: translateY(-1px); border-color: rgba(255,138,61,.35); box-shadow: 0 10px 22px -14px rgba(255,106,31,.6); }
.watch-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(255,122,42,.3), 0 10px 26px -14px rgba(255,106,31,.75); }
.bar span, .mp-bar span { background: var(--fox-grad); }
.pill-btn { background: rgba(255,220,190,.05); border-color: var(--glass-line); }
.pill-btn:hover { border-color: rgba(255,138,61,.45); }
.wx-field:focus-within { border-color: rgba(255,138,61,.6); box-shadow: 0 0 0 3px rgba(255,122,42,.14); }

/* Profit (outside mints + sales) inside Profit & loss */
.pnl-profit { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--glass-line); }
.pnl-profit .pnl-sub-h { font-size: 15px; }
.pnl-profit .sales-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .pnl-profit .sales-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Watch → Mint schedule: everything 20% smaller (text, dots, spacing) */
#wdSchedule { zoom: .8; }

/* Button rows that stay on one line (Wallets list, Balance & groups): compact buttons; the info text on the left
   gives way first, and on a very narrow screen the row scrolls sideways instead of wrapping. */
.row.one-line { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.row.one-line::-webkit-scrollbar { display: none; }
.row.one-line > button { flex: none; padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
.row.one-line > span:first-child { flex: 0 1 auto; min-width: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.one-line > .spacer { flex: 1 1 0; min-width: 4px; }
@media (max-width: 720px) {
  .row.one-line { gap: 5px; }
  .row.one-line > button { padding: 6px 8px; font-size: 11.5px; }
  .row.one-line > span:first-child { display: none; }   /* the count shows on the ticked boxes / group tab anyway */
}
