/* =====KEEP DONT DELETE=== */
/* Align labels + values into two neat columns */
#hlPositions {
  --kv-label-w: 88px;
}

/* adjust if your longest label wraps */
#hlPositions .pill-text {
  white-space: normal;
  display: block
}

#hlPositions .kv {
  display: grid;
  grid-template-columns: var(--kv-label-w) 1fr;
  column-gap: 10px;
  align-items: baseline;
  margin: 2px 0;
}

#hlPositions .kv b {
  justify-self: end;
  opacity: .85
}

#hlPositions .kv .v {
  font-variant-numeric: tabular-nums
}



/* ===== Base + Theme ===== */
:root {
  --maxw: 980px;
  --gap: 12px;
  --radius: 12px;
  --control-h: 52px;
  /* ← uniform height for both */
  --bg-0: #502168;
  --bg-1: #0d0c0d;
  --text: #ffffffd4;
  --muted: #a6b0c2;
  --ring: rgba(113, 4, 128, 0.752);
  --stroke: rgba(255, 255, 255, .10);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif
}

/* ===== Layout ===== */
.page-wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px
}

.brand-wrap {
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--stroke)
}

.dora-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .2px
}

/* ===== Search Row (YOUR TEXTBOX + BUTTON) =====
   Always uniform size, no shift before/after clicking */
.pipeline-section .d-flex {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) auto;
  /* input grows, button auto */
  column-gap: var(--gap);
  align-items: center;
}

/* Textbox */
#addrInput {
  height: var(--control-h);
  width: 100%;
  min-width: 0;
  /* allows shrinking on smaller screens */
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, #50216862, rgba(12, 16, 25, .45));
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border .25s, box-shadow .25s, transform .12s;
}

#addrInput::placeholder {
  color: var(--muted);
  font-weight: 500
}

#addrInput:hover {
  border-color: rgba(72, 6, 94, 0.748)
}

#addrInput:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--ring), 0 0 0 8px rgba(79, 135, 246, .12);
  transform: translateY(-1px);
}

/* Button */
#addrBtn {
  all: unset;
  /* neutralize Bootstrap/old styles */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-h);
  min-width: 130px;
  /* same as your other project */
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .3px;
  color: rgb(255, 255, 255);

}



/* ===== Section Titles & Results ===== */
.section-title {
  margin: 16px 0 6px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffffff57;
}

.pill-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px
}

/* Pills (kept simple) */
.link-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(185, 179, 201, 0.136);
  /* subtle tinted bg */
  transition: border .18s, transform .12s, box-shadow .2s;
}

.link-pill:hover {
  border-color: rgba(255, 255, 255, .28);
  border-width: 2px;
  transform: translateY(-1px)
}

.pill-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis
}

.new-tab-icon {
  display: flex;
  align-items: center;
  opacity: .85
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .pipeline-section .d-flex {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 560px) {
  .pipeline-section .d-flex {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  #addrBtn {
    min-width: 0;
    width: 100%;
  }

  /* full-width button on small screens */
}

/* Revert results to theme text color (from your variables) */
.pill-wrap a.link-pill,
.pill-wrap .pill-text,
#hlPositions .kv b,
#hlPositions .kv .v,
.pill-wrap .new-tab-icon {
  color: inherit !important;
}

/* Let the "No open positions" stay muted like before */
#hlNoPositions {
  color: var(--muted) !important;
}


/* If your section titles should stay grey, nothing else to do.
   If you also want the titles white, add: */
/* .section-title { color: #fff !important; } */

/* No underline on results pills */
.pill-wrap a.link-pill,
.pill-wrap a.link-pill:link,
.pill-wrap a.link-pill:visited,
.pill-wrap a.link-pill:hover,
.pill-wrap a.link-pill:focus,
.pill-wrap a.link-pill:active {
  text-decoration: none !important;
}

/* Optional: keep a clear focus style without underline */
.pill-wrap a.link-pill:focus-visible {
  text-decoration: none !important;
  outline: none;
  box-shadow: 0 0 0 2px var(--ring), 0 0 0 8px rgba(79, 135, 246, .12);
}



/* Dark-purple gradient button 

/* === Purple-unify + consistent borders (drop at END) === */

/* 1) Theme ring/glow: switch from blue to purple */
:root {
  --ring: rgba(139, 92, 246, .55);
  /* purple focus ring */
  --ring-soft: rgba(139, 92, 246, .14);
  /* outer halo */
  /* keep your existing --stroke; or tighten it slightly to match pills */
  --stroke: rgba(196, 181, 253, .20);
}

/* 2) TEXT BOX BORDER = RESULTS PILL BORDER (no color shift on hover) */
#addrInput {
  border-color: var(--stroke) !important;
}

#addrInput:hover {
  border-color: var(--stroke) !important;
  /* stop hover from changing the border color */
}

#addrInput:focus {
  border-color: transparent !important;
  box-shadow: 0 0 0 2px var(--ring), 0 0 0 8px var(--ring-soft) !important;
  /* no blue */
}

/* 3) Results pills: remove any blue focus glow, keep border as-is */
.pill-wrap a.link-pill:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px var(--ring), 0 0 0 8px var(--ring-soft) !important;
}



/* 5) (Optional) If you want pill borders to stay EXACTLY the same on hover, uncomment:
.link-pill:hover{
  border-color: var(--stroke) !important;
  border-width: 1px !important;
  transform: translateY(-1px);
}
*/

/* Text box + button: 2px rgba(255,255,255,.28) border */
#addrInput,
#addrBtn {
  border: 2px solid rgba(255, 255, 255, .28) !important;
}

#addrInput:hover,
#addrInput:focus,
#addrBtn:hover,
#addrBtn:focus,
#addrBtn:focus-visible {
  border-color: rgba(255, 255, 255, .28) !important;
  border-width: 2px !important;
}

#addrBtn .fa {
  font-size: 18px;
  line-height: 1;
}

/* HL Account Balance: multiline lines inside the pill */
#hlEquity .pill-text {
  white-space: normal;
  display: block;
}

#hlEquity .kv {
  display: block;
  line-height: 1.25;
  margin: 2px 0;
}

#hlEquity .kv b {
  opacity: .85;
  margin-right: 6px;
}

/* HL Account pill: align values in a second column */
#hlEquity {
  --kv-label-w: 110px;
}

#hlEquity .pill-text {
  white-space: normal;
  display: block;
}

#hlEquity .kv {
  display: grid;
  grid-template-columns: var(--kv-label-w) 1fr;
  column-gap: 10px;
  align-items: baseline;
  margin: 2px 0;
}

#hlEquity .kv b {
  justify-self: end;
  opacity: .85;
}

#hlEquity .kv .v {
  font-variant-numeric: tabular-nums;
}

/* ===== Global KV layout for ALL pills ===== */
/* Default label column width (override per section if needed) */
.pill-wrap {
  --kv-label-w: 136px;
}

/* Only switch pills to multiline when they actually contain .kv rows or <br> */
.pill-wrap .link-pill .pill-text:has(.kv),
.pill-wrap .link-pill .pill-text:has(br) {
  display: block;
  white-space: normal;
  /* allow wrapping */
  overflow: visible;
  /* prevent first-letter clipping */
  text-overflow: clip;
  /* cancel global ellipsis */
}

/* Label | Value alignment shared by all pills using .kv rows */
.pill-wrap .kv {
  display: grid;
  grid-template-columns: var(--kv-label-w) 1fr;
  column-gap: 10px;
  align-items: baseline;
  margin: 2px 0;
}

.pill-wrap .kv b {
  justify-self: end;
  opacity: .85;
  padding-right: 6px;
}

.pill-wrap .kv .v {
  font-variant-numeric: tabular-nums;
}

/* Optional: section-specific widths if a label is longer */
#hlPositions {
  --kv-label-w: 128px;
}

#hlEquity {
  --kv-label-w: 136px;
}

/* "Withdrawable" fits comfortably */

/* Button: gradient tuned to rgba(138, 92, 246, 0.23) */
/* Button gradient around #28033ad6 (deep plum) */



/* Bridge sections: one pill per row */
#arbToHlTransfers,
#hlToArbTransfers {
  display: grid;
  grid-template-columns: 1fr;
  /* single column */
  gap: 10px;
}

/* Make each pill fill the row + allow line breaks */
#arbToHlTransfers .link-pill,
#hlToArbTransfers .link-pill {
  width: 100%;
}

#arbToHlTransfers .pill-text,
#hlToArbTransfers .pill-text {
  white-space: normal;
  /* enable second line */
}

/* Subtle styling for the date/time line */
.pill-dt {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

/* === Deposit/Withdraw: keep compact tile width even with 1 item === */
#arbToHlTransfers,
#hlToArbTransfers {
  /* fixed-ish tile tracks instead of 1fr so a single pill won't stretch */
  --pill-min: 260px;
  --pill-max: 345px;
  /* tweak this to match your other tiles */
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(var(--pill-min), var(--pill-max))) !important;
  justify-content: start;
  /* leftover space stays on the right */
  gap: 10px !important;
}

/* Pills fill their track (so all equal) but never full-width of the container */
#arbToHlTransfers .link-pill,
#hlToArbTransfers .link-pill {
  width: 100% !important;
  max-width: 100% !important;
}

/* Keep multiline (date/time on line 2) */
#arbToHlTransfers .pill-text,
#hlToArbTransfers .pill-text {
  white-space: normal;
}

/* Date/time style stays compact */
.pill-dt {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

/* External Deposits (Other sources → Arbitrum) */
#extHeader2 {
  grid-area: extH2;
}

/* H2: External Deposits */
#extHeader {
  grid-area: extH4;
}

/* H4: subtitle */
#extToArbTransfers {
  grid-area: extPills;
}

/* pills list */
/* Keep each column's content height-only, even if neighbor is taller */
#arbToHlTransfers,
#hlToArbTransfers,
#extToArbTransfers {
  align-self: start;
  /* don't stretch to full row height */
}

#arbToHlTransfers .link-pill,
#hlToArbTransfers .link-pill,
#extToArbTransfers .link-pill {
  height: auto !important;
  /* ensure the pill itself doesn't stretch */
  align-self: start;
  /* belt & suspenders */
}

#extToArbTransfers .pill-icon-hl {
  display: none !important;
}


/* === Two-column placement (no HTML changes) === */
/* === Three-column placement (Deposits | Withdrawals | External) === */
.pipeline-section {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "search       search       search"
    "arbAccHeader hlAccHeader  ."
    "arbAccPills  hlAccPills   ."
    "extH2        depH2        wdrH2"
    "extH4        depH4        wdrH4"
    "extPills     depPills     wdrPills"
    /* NEW: trades above positions */
    "trdHeader    trdHeader    trdHeader"
    "trdPills     trdPills     trdPills"
    "posHeader    posHeader    posHeader"
    "posPills     posPills     posPills";
  column-gap: 24px;
  row-gap: 12px;
}

#hlTradesHeader {
  grid-area: trdHeader;
}

#hlTrades {
  grid-area: trdPills;
}



/* Search row stays full width */
.search-card {
  grid-area: search;
}

/* LEFT column: Hyperliquid Account + Deposits (Arbitrum → Hyperliquid) */
#hlAccountHeader {
  grid-area: hlAccHeader;
}

#hlEquity {
  grid-area: hlAccPills;
}

#bridgeHeader2 {
  grid-area: depH2;
}

/* "Perps Deposits" (H2) */
#bridgeHeader {
  grid-area: depH4;
}

/* "Arbitrum → Hyperliquid L1" (H4) */
#arbToHlTransfers {
  grid-area: depPills;
}

/* RIGHT column: Arbitrum Account + Withdrawals (Hyperliquid → Arbitrum) */
#arbUsdcBalanceHeader {
  grid-area: arbAccHeader;
}

#arbUsdcBalance {
  grid-area: arbAccPills;
}

#bridgeHeaderBack2 {
  grid-area: wdrH2;
}

/* "Perps Withdrawals" (H2) */
#bridgeHeaderBack {
  grid-area: wdrH4;
}

/* "Hyperliquid L1 → Arbitrum" (H4) */
#hlToArbTransfers {
  grid-area: wdrPills;
}

/* Open Positions stays full width, below both columns */
#hlPositionsHeader {
  grid-area: posHeader;
}

#hlPositions {
  grid-area: posPills;
}

#hlNoPositions {
  grid-column: 1 / -1;
}

/* full width when shown */

/* Responsive: stack on small screens */
@media (max-width: 900px) {
  .pipeline-section {
    grid-template-columns: 1fr;
    grid-template-areas:
      "search"
      "hlAccHeader"
      "hlAccPills"
      "arbAccHeader"
      "arbAccPills"
      "depH2"
      "depH4"
      "depPills"
      "wdrH2"
      "wdrH4"
      "wdrPills"
      "posHeader"
      "posPills";
  }
}

/* Make Arbitrum balance pill use the same label width as HL balance */
#arbUsdcBalance {
  --kv-label-w: 136px;
}

/* Add a subtle bottom spacer so the Arbitrum pill matches HL visually */
#arbUsdcBalance .pill-text::after {
  content: "";
  display: block;
  height: 4px;
  margin-left: 10px;
  /* adjust 4–8px as needed */
}

/* Bigger, whiter labels for top-of-section H2s */
#bridgeHeader2,
#bridgeHeaderBack2,
#hlPositionsHeader,
#hlAccountHeader,
#arbUsdcBalanceHeader,
#hlTradesHeader {
  font-size: 16px;
  /* larger than your 12px section-title */
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffffffd9;
  /* whiter */
  margin: 16px 0 2px;
  /* a bit tighter above the H4 */
}

/* Remove space between H2 and H4 headers */
#bridgeHeader2,
#bridgeHeaderBack2 {
  margin-bottom: 0 !important;
  /* H2 bottom = 0 */
}

#bridgeHeader2+#bridgeHeader,
#bridgeHeaderBack2+#bridgeHeaderBack {
  margin-top: 0 !important;
  /* H4 top = 0 when following its H2 */
}

/* Ultra-tight H2 → H4 stack */
#bridgeHeader2,
#bridgeHeaderBack2 {
  margin: 0 !important;
  /* no outside gap from H2 */
  line-height: 1.05;
  /* tighten the H2 line box */
}

#bridgeHeader2+#bridgeHeader,
#bridgeHeaderBack2+#bridgeHeaderBack {
  margin-top: -6px !important;
  /* pull H4 up into the H2 */
  line-height: 1.05;
  /* keep H4 compact too */
}

/* Add space ABOVE "Deposits" (H2) only */
#bridgeHeader2 {
  margin-top: 18px !important;
  /* adjust 12–24px to taste */
  margin-bottom: 0 !important;
  /* keep it tight to the H4 below */
}

/* Preserve the tight H2 → H4 stack */
#bridgeHeader2+#bridgeHeader {
  margin-top: -6px !important;
  /* same pull-up you liked */
  line-height: 1.05;
}

#bridgeHeaderBack2 {
  margin-top: 18px !important;
  margin-bottom: 0 !important;
}

#bridgeHeaderBack2+#bridgeHeaderBack {
  margin-top: -6px !important;
  line-height: 1.05;
}

/* Slightly smaller gap between any section title and its pills */
.section-title {
  margin-bottom: 0px;
  /* was 6px */
}

/* Ensure no extra top margin sneaks in on the pill container */
.section-title+.pill-wrap {
  margin-top: 0;
}

/* Keep your ultra-tight H2→H4 stack intact (from earlier) */
#bridgeHeader2,
#bridgeHeaderBack2 {
  margin-bottom: 0;
  /* H2 stays tight to H4 */
}

#bridgeHeader2+#bridgeHeader,
#bridgeHeaderBack2+#bridgeHeaderBack {
  /* keep whatever negative top you liked previously (e.g., -6px) */
  margin-top: -6px;
}


/* 0) Opaque mate of your semi-transparent --bg-0 */
:root {
  --bg-0-solid: #652a83;
}

/* opaque #652a83c0 */

/* 1) Kill any other backgrounds that might repaint/“tile” */
body,
.page-wrap {
  background: transparent !important;
}

.page-wrap::before,
.page-wrap::after {
  content: none !important;
}

/* 2) Fixed, single-pass backdrop behind all content */
.page-wrap {
  position: relative;
  isolation: isolate;
}

.bg-plate {
  position: fixed;
  inset: 0;
  z-index: -1;
  /* behind everything in .page-wrap’s stacking context */
  pointer-events: none;

  /* gradient once + solid fill below it (no repeat) */
  background:
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%) no-repeat,
    var(--bg-0-solid);
  background-size: 100% 160vh, auto;
  /* adjust 120–200vh to taste */
  background-position: top left, top left;
}

/* 3) Ensure anything under the page is the same solid purple */
html {
  background: var(--bg-0-solid) !important;
}

/* ===== Button theme around --bg-0 / --bg-1 ===== */
:root {
  /* helper tones derived from your palette */
  --btn-deep: #3b174e;
  /* darker than --bg-0 */
  --btn-mid: #5f2783;
  /* close to --bg-0 */
  --btn-pop: #8d5ac4;
  /* brighter purple accent */
  --btn-glow: rgba(141, 90, 196, .55);
  --btn-glow-2: rgba(141, 90, 196, .18);
}



/* Button: requested gradient + purple glow */
#addrBtn {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .28) !important;
  background: linear-gradient(180deg, #502168 0%, #52226c 100%) !important;
  box-shadow:
    0 10px 26px rgba(80, 33, 104, .35),
    inset 0 -10px 22px rgba(0, 0, 0, .22);
  transition: transform .08s ease, filter .2s ease, box-shadow .25s ease;
}

#addrBtn:hover {
  filter: brightness(1.05) saturate(1.05);
  box-shadow:
    0 0 0 2px rgba(80, 33, 104, .60),
    0 0 24px 8px rgba(80, 33, 104, .22),
    0 16px 40px rgba(80, 33, 104, .45),
    inset 0 -10px 22px rgba(0, 0, 0, .26);
}

#addrBtn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(80, 33, 104, .60),
    0 0 0 8px rgba(80, 33, 104, .18),
    0 12px 30px rgba(80, 33, 104, .42);
}

#addrBtn:active {
  transform: translateY(1px);
}

/* Bold all pill text only */
.pill-wrap .link-pill,
.pill-wrap .link-pill .pill-text,
.pill-wrap .link-pill .kv,
.pill-wrap .link-pill .kv .v {
  font-weight: 700 !important;
}

/* Ensure <b>/<strong> in pills matches the same weight */
.pill-wrap .link-pill b,
.pill-wrap .link-pill strong {
  font-weight: 700 !important;
}

/* Keep Font Awesome icons crisp (don’t down-weight them) */
.pill-wrap .link-pill .fa {
  font-weight: 900 !important;
}

/* Centered header (keeps your current look) */
.brand-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 16px 0 10px;
  border-bottom: 1px solid var(--stroke);
}

/* Animated gradient text using the SAME colors */
.dora-title {
  margin: 0;
  line-height: 1.05;
  letter-spacing: .3px;
  font-weight: 900;
  font-size: clamp(20px, 5vw, 54px);

  /* exact same gradient stops */
  background:
    linear-gradient(135deg,
      #ede9e9 0%,
      rgba(186, 104, 224, 0.92) 10%,
      #b58de0 40%,
      #7e3fd1 70%,
      #502168 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* animate the gradient position */
  background-size: 220% 220%;
  animation: dora-title-pan 7s ease-in-out infinite alternate;

  text-shadow: 0 2px 12px rgba(80, 33, 104, .25);
}

/* animated accent line under the title (same colors) */


/* keyframes for the title gradient */
@keyframes dora-title-pan {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

/* keyframes for the underline sweep */
@keyframes dora-underline-scan {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dora-title {
    animation: none;
    background-position: 50% 50%;
  }

  .dora-title::after {
    animation: none;
  }
}

/* Remove the full-width header line */
.brand-wrap {
  border-bottom: none !important;
  box-shadow: none !important;
  /* just in case */
}

/* If you also added the short accent under the title and want to keep it: do nothing.
   If you want to remove that too, uncomment below: */
/* .dora-title::after { display: none !important; } */

/* Right-side icon row inside transfer pills */
.pill-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  flex-shrink: 0;
}

.pill-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  opacity: .92;
  transition: opacity .15s ease, transform .15s ease;
}

.pill-icon:hover svg {
  opacity: 1;
  transform: translateY(-1px);
}

/* ===== Transfer pill icon sizing ===== */
:root {
  --pill-icon-size: 24px;
  /* tweak 24–28px to taste */
  --pill-icon-pad: 6px;
  /* click padding around the icon */
}

/* Make Deposits / Withdrawals / External all use the same icon size */
#arbToHlTransfers,
#hlToArbTransfers,
#extToArbTransfers {
  --pill-icon-size: 26px;
}




.pill-icon:hover {
  transform: translateY(-1px);
  opacity: 1;
}

/* Inline SVGs */
.pill-icon svg {
  width: var(--pill-icon-size);
  height: var(--pill-icon-size);
  display: block;
}

/* If you use <img> icons instead of inline SVGs */
.pill-icon img {
  width: var(--pill-icon-size);
  height: var(--pill-icon-size);
  display: block;
}

/* If you ever use a Font Awesome fallback (<i class="fa ...">) */
.pill-icon i.fa {
  font-size: var(--pill-icon-size);
  line-height: 1;
}

/* Keep the “fallback” HL icon slightly softer if it links to address (no tx) */
.pill-icon-hl.is-fallback {
  opacity: .8;
}

.title-link {
  text-decoration: none;
  color: inherit;
}

.title-link:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Ensure the same size system */
:root {
  --pill-icon-size: 22px;
}

/* Make new-tab icon box exactly the same footprint as pill-icon */
.link-pill .new-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pill-icon-size);
  height: var(--pill-icon-size);
  margin-left: 8px;
  cursor: pointer;
}

/* Scale the actual art to fill the box */
.link-pill .new-tab-icon svg,
.link-pill .new-tab-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

/* If you still use a Font Awesome fallback inside */
.link-pill .new-tab-icon i.fa,
.link-pill .new-tab-icon .custom-icon-size {
  font-size: var(--pill-icon-size) !important;
  line-height: 1;
}

/* (Optional) optical tweak: some SVGs have internal padding.
   Bump slightly to match your other logos visually. */
.link-pill .new-tab-icon svg {
  transform: scale(1.08);
  transform-origin: center;
}

:root {
  --pill-icon-size: 22px;
}

/* single source of truth */

/* Make *every* pill’s end icon the same size */
.link-pill .new-tab-icon,
.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pill-icon-size) !important;
  height: var(--pill-icon-size) !important;
  flex: 0 0 var(--pill-icon-size);
}

/* Scale the artwork inside (SVG/IMG/FA) to fill that box */
.link-pill .new-tab-icon svg,
.link-pill .new-tab-icon img,
.link-pill .new-tab-icon i.fa,
.pill-icon svg,
.pill-icon img,
.pill-icon i.fa {
  width: 95% !important;
  height: 95% !important;
  line-height: 1;
  font-size: var(--pill-icon-size) !important;
  /* for FA fallback */
}

/* Match Deposits/Withdrawals icon size (26px) */
#hlEquity,
#arbUsdcBalance,
#hlPositions {
  --pill-icon-size: 26px;
}

/* Ensure we can absolutely-position the tiny nav inside the header */
.brand-wrap {
  position: relative;
}

/* Small, top-left link list */
.site-links {
  position: absolute;
  top: 10px;
  /* tweak if you want closer/farther from top */
  left: 16px;
  /* aligns with your container padding */
  font-size: 12px;
  /* small text as requested */
  letter-spacing: .02em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* space around the bullet separator */
  pointer-events: auto;
}

.site-links .sep {
  opacity: .7;
}

.site-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  /* subtle emphasis, still “small” */
}

.site-links a:hover,
.site-links a:focus-visible {
  color: var(--text);
  /* brighten on hover/focus */
  text-decoration: underline;
  /* remove this line if you prefer no underline */
  outline: none;
}

/* Optional: on very small screens, shrink or hide if it collides */
@media (max-width: 420px) {
  .site-links {
    font-size: 11px;
    gap: 6px;
    left: 12px;
  }
}

/* Bigger, whiter labels for top-of-section H2s */
#bridgeHeader2,
#bridgeHeaderBack2,
#hlPositionsHeader,
#hlAccountHeader,
#arbUsdcBalanceHeader,
#extHeader2 {
  /* ← add this */
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffffffd9;
  margin: 16px 0 2px;
}

/* Remove space between H2 and H4 headers */
#bridgeHeader2,
#bridgeHeaderBack2,
#extHeader2 {
  /* ← add this */
  margin-bottom: 0 !important;
}

#bridgeHeader2+#bridgeHeader,
#bridgeHeaderBack2+#bridgeHeaderBack,
#extHeader2+#extHeader {
  /* ← add this */
  margin-top: 0 !important;
}

/* --- Mobile fixes: center search, make button smaller than input --- */
@media (max-width: 560px) {
  .pipeline-section .d-flex {
    grid-template-columns: 1fr;
    /* already stacking */
    row-gap: 10px;
    justify-items: center;
    /* center children horizontally */
  }

  #addrInput {
    width: min(520px, 92%);
    /* full-ish width but centered */
    margin: 0 auto;
  }

  /* override earlier "width: 100%" on mobile */
  #addrBtn {
    width: auto !important;
    /* not full width */
    min-width: 110px;
    /* smaller than input */
    margin: 0 auto;
    /* center the button */
  }
}

/* --- Header overlap fix on small screens --- */
@media (max-width: 720px) {
  .brand-wrap {
    display: flex;
    flex-direction: column;
    /* title on top, links below */
    align-items: center;
    gap: 6px;
    padding-top: 12px;
  }

  .site-links {
    position: static !important;
    /* no absolute overlap */
    order: 2;
    font-size: 12px;
    left: auto;
    top: auto;
  }

  .dora-title {
    text-align: center;
  }
}


/* Trade History: one pill per row, full width */
#hlTrades {
  display: grid;
  grid-template-columns: 1fr;
  /* single column */
  gap: 10px;
}

#hlTrades .link-pill {
  width: 100%;
  max-width: 100%;
}

/* Ensure single-line truncation for the pill's content */
#hlTrades .pill-text {
  white-space: nowrap;
  /* keep on one line */
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Skeleton loading state for pills — shimmer bars + icon blocks */
.link-pill.skeleton {
  position: relative;
  overflow: hidden;
  opacity: 0.9;
  border-radius: 16px;
}

/* hide any real text inside the skeleton pill */
.link-pill.skeleton .pill-text {
  display: none;
}

/* layout for the placeholder content */
.link-pill.skeleton .sk-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0px 0px;
}

.link-pill.skeleton .sk-left {
  flex: 1;
  min-width: 0;
}

.link-pill.skeleton .sk-right {
  display: flex;
  gap: 8px;
}

/* the bars that mimic title + meta lines */
.link-pill.skeleton .sk-line {
  height: 12px;
  margin: 6px 0;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.10);
}

.link-pill.skeleton .sk-title {
  height: 14px;
  width: 55%;
}

.link-pill.skeleton .sk-meta {
  width: 80%;
  opacity: 0.85;
}

/* icon placeholders on the right */
.link-pill.skeleton .sk-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.10);
}

/* shimmer sweep */
.link-pill.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, .25) 45%,
      rgba(255, 255, 255, 0) 90%);
  transform: translateX(-100%);
  animation: shimmer 1.1s infinite;
  mix-blend-mode: overlay;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* subtle fade when swapping skeleton → real content */
.link-pill {
  transition: opacity .18s ease, transform .18s ease;
}

/* Compact skeleton (used in Trade History) */
.link-pill.skeleton.compact .sk-wrap {
  padding: 6px 10px;
  /* tighter vertical padding */
  gap: 8px;
}

.link-pill.skeleton.compact .sk-title {
  height: 12px;
  /* shorter bar */
  width: 50%;
  margin: 0;
}

.link-pill.skeleton.compact .sk-meta {
  display: none;
  /* single-line look, like the pill */
}

.link-pill.skeleton.compact .sk-icon {
  width: 20px;
  /* smaller icons to match pill’s feel */
  height: 20px;
  border-radius: 6px;
}

.link-pill.skeleton.compact {
  border-radius: 14px;
  /* closer to your pill radius */
}