/* uterm-bar.css — persistent bottom utility toolbar shared by
   Trenches.html and Trending.html. CSS variables consumed by the
   toolbar + popovers below. The base landing CSS doesn't expose
   these names, so we declare them here scoped to :root.
   Amber matches our --amber phosphor. */
  :root {
    --accent:        #F0B83A;
    --accent-bright: #FFC95A;
    --ink-1:         #ECECEC;
    --ink-2:         #A8A8A8;
    --ink-3:         #6B6B6B;
    --mono:          'JetBrains Mono', ui-monospace, Menlo, monospace;
  }

  body { padding-bottom: 56px; }
  .ut-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 36px;
    z-index: 80;
    background: #0A0A0A;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: stretch;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-2);
    letter-spacing: 0.01em;
    user-select: none;
  }
  .ut-bar .side {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
  }
  .ut-bar .side.left { flex: 0 0 auto; min-width: 0; }
  .ut-bar .side.right { flex: 1; justify-content: flex-end; min-width: 0; }
  .ut-bar .item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    color: var(--ink-2);
    text-decoration: none;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 120ms, color 120ms;
    white-space: nowrap;
  }
  .ut-bar .side.right .item {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
  }
  .ut-bar .item:hover { background: #141414; color: var(--ink-1); }
  .ut-bar .item.active { color: var(--ink-1); }
  .ut-bar .item.amber { color: var(--accent); }
  .ut-bar .item.amber:hover { color: var(--accent-bright); }
  .ut-bar .preset {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 12px; border-right: 1px solid rgba(255,255,255,0.04);
    color: var(--ink-1);
    white-space: nowrap;
  }
  /* When the preset is itself the popover trigger, give it button
     reset + match the surrounding toolbar items' hover/open states. */
  .ut-bar button.preset {
    background: none;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.04);
    font: inherit;
    height: 100%;
    cursor: pointer;
    transition: background 120ms;
  }
  .ut-bar .item-wrap.is-open button.preset {
    background: #141414;
  }
  .ut-bar .preset .bolt { color: #4ADE80; font-size: 11px; }
  .ut-bar .preset .label {
    color: var(--ink-1); font-weight: 600; letter-spacing: 0.04em;
  }
  .ut-bar .slot {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 0 8px; height: 100%;
    color: var(--ink-2); cursor: pointer;
  }
  .ut-bar .slot .num { color: var(--ink-1); font-weight: 500; }
  .ut-bar .slot .caret { font-size: 8px; opacity: 0.6; margin-left: 1px; }
  .ut-bar .slots {
    display: inline-flex; align-items: stretch;
    border-right: 1px solid rgba(255,255,255,0.04);
  }
  .ut-bar .slots .slot + .slot {
    border-left: 1px solid rgba(255,255,255,0.04);
  }
  .ut-bar .ico {
    width: 13px; height: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-3);
  }
  .ut-bar .ico svg { width: 100%; height: 100%; }
  .ut-bar .item.amber .ico { color: var(--accent); }
  .ut-bar .item .dot {
    width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto;
  }
  .ut-bar .item .dot.green { background: #22C55E; box-shadow: 0 0 4px rgba(34,197,94,0.5); }
  .ut-bar .item .dot.red { background: #EF4444; box-shadow: 0 0 4px rgba(239,68,68,0.5); }
  .ut-bar .item .dot.amber { background: var(--accent); box-shadow: 0 0 4px rgba(255,176,46,0.5); }
  .ut-bar .balance {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 12px; color: var(--ink-1); font-weight: 500;
    border-right: 1px solid rgba(255,255,255,0.04);
  }
  .ut-bar .balance .dim { color: var(--ink-3); }
  .ut-bar .conn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 12px; color: #4ADE80;
    border-right: 1px solid rgba(255,255,255,0.04);
  }
  .ut-bar .conn .pulse {
    width: 6px; height: 6px; border-radius: 50%; background: #22C55E;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
    animation: ut-bar-pulse 2s ease-out infinite;
  }
  @keyframes ut-bar-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    70% { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
  }
  .ut-bar .icon-only {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; padding: 0;
    color: var(--ink-3);
    border-left: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 120ms, color 120ms;
  }
  .ut-bar .icon-only:hover { background: #141414; color: var(--ink-1); }
  .ut-bar .icon-only svg { width: 13px; height: 13px; }

  /* Popover system: an .item-wrap containing a trigger and a hidden
     .ut-pop. Toggled open by JS — anchored above the trigger so the
     toolbar stays the visual ground line. */
  .ut-bar .item-wrap {
    position: relative;
    display: inline-flex;
    align-items: stretch;
  }
  .ut-bar button.item {
    background: none;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    font: inherit;
    height: 100%;
  }
  .ut-bar .item-wrap.is-open .item {
    background: #141414;
    color: var(--ink-1);
  }
  .ut-pop {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 520px;
    max-width: calc(100vw - 32px);
    background: #0E0E0E;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.5);
    font-family: var(--mono);
    color: var(--ink-1);
    z-index: 90;
    display: flex;
    flex-direction: column;
    max-height: 480px;
  }
  /* Right-anchored variant for popovers triggered by items near the
     right edge of the toolbar — would overflow the viewport otherwise. */
  .ut-pop--region { left: auto; right: 0; width: 320px; }
  .ut-pop[hidden] { display: none; }
  .ut-pop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex: 0 0 auto;
  }
  .ut-pop-head-l {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .ut-pop-btn {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-2);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 5px 10px;
    cursor: pointer;
    transition: background 120ms, color 120ms, border-color 120ms;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }
  .ut-pop-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink-1);
  }
  .ut-pop-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 600;
  }
  .ut-pop-btn.active:hover {
    background: var(--accent-bright);
    border-color: var(--accent-bright);
  }
  .ut-pop-cog {
    background: none;
    border: none;
    color: var(--ink-3);
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 120ms;
  }
  .ut-pop-cog:hover { color: var(--ink-1); }
  .ut-pop-cog svg { width: 15px; height: 15px; }
  .ut-pop-list {
    overflow-y: auto;
    flex: 1 1 auto;
  }
  .ut-pop-list::-webkit-scrollbar { width: 6px; }
  .ut-pop-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); }

  /* Wallet row — checkbox / [name + address] / ETH balance / count */
  .ut-wal {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }
  .ut-wal:last-child { border-bottom: none; }
  .ut-wal:hover { background: rgba(255, 255, 255, 0.02); }
  .ut-wal-check {
    width: 14px; height: 14px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }
  .ut-wal-check.checked {
    background: var(--accent);
    border-color: var(--accent);
  }
  .ut-wal-check.checked::after {
    content: '';
    width: 4px; height: 8px;
    border: solid #000;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) translate(-1px, -1px);
  }
  .ut-wal-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .ut-wal-name .label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-1);
    letter-spacing: -0.005em;
    line-height: 1.2;
  }
  .ut-wal.active .ut-wal-name .label { color: var(--accent); }
  .ut-wal-name .meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
  }
  .ut-wal-name .meta .copy {
    width: 10px; height: 10px;
    color: var(--ink-3);
    cursor: pointer;
    transition: color 120ms;
  }
  .ut-wal-name .meta .copy:hover { color: var(--ink-1); }
  .ut-wal-bal {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--ink-1);
  }
  .ut-wal-bal .eth-glyph { width: 9px; height: 12px; color: var(--ink-2); }
  /* Tiny pill toggle: knob on the left, count on the right. The
     accent-tinted variant only appears when the wallet has open
     positions (count > 0). */
  .ut-wal-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px 3px 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
    cursor: pointer;
  }
  .ut-wal-toggle .knob {
    width: 10px; height: 10px;
    background: var(--ink-2);
  }
  .ut-wal-toggle.has-positions {
    background: rgba(255, 176, 46, 0.06);
    border-color: rgba(255, 176, 46, 0.20);
    color: var(--accent);
  }
  .ut-wal-toggle.has-positions .knob {
    background: var(--accent);
  }

  /* Width modifiers per popover — base is 520px (Wallet). */
  .ut-pop--social   { width: 460px; }
  .ut-pop--discover { width: 640px; max-height: 540px; }
  .ut-pop--pulse    { width: 640px; max-height: 540px; }
  .ut-pop--pnl      { width: 540px; }

  /* Title block in popover head (used by Social, PnL) */
  .ut-pop-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-1);
    letter-spacing: -0.005em;
  }
  .ut-pop-title .ut-pop-sub {
    color: var(--ink-3);
    font-weight: 400;
    font-size: 11.5px;
    letter-spacing: 0;
  }
  .ut-pop-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: #EF4444;
    box-shadow: 0 0 4px rgba(239,68,68,0.5);
  }
  .ut-pop-head-actions { display: inline-flex; align-items: center; gap: 4px; }

  /* Empty-state body (Social) */
  .ut-pop-empty {
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }
  .ut-pop-empty p {
    margin: 0;
    color: var(--ink-2);
    font-size: 12.5px;
  }
  .ut-pop-cta {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    color: #000;
    background: var(--accent);
    border: 1px solid var(--accent);
    padding: 8px 16px;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background 120ms;
  }
  .ut-pop-cta:hover { background: var(--accent-bright); }

  /* Tab strip (Discover, Pulse) */
  .ut-pop-tabs {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 6px;
    flex: 0 0 auto;
  }
  .ut-tab {
    background: none;
    border: none;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    padding: 12px 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 120ms, border-color 120ms;
    margin-bottom: -1px;
  }
  .ut-tab:hover { color: var(--ink-1); }
  .ut-tab.is-active {
    color: var(--ink-1);
    border-bottom-color: var(--accent);
  }

  .ut-pop-subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex: 0 0 auto;
    gap: 8px;
  }
  .ut-time { display: inline-flex; align-items: stretch; gap: 2px; }
  .ut-time-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 11.5px;
    padding: 3px 8px;
    cursor: pointer;
  }
  .ut-time-btn:hover { color: var(--ink-1); }
  .ut-time-btn.is-active {
    color: var(--accent);
    border-color: rgba(255, 176, 46, 0.20);
    background: rgba(255, 176, 46, 0.06);
  }

  .ut-bond {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 176, 46, 0.06);
    border: 1px solid rgba(255, 176, 46, 0.20);
    font-size: 11.5px;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
  }
  .ut-bond-label { color: var(--ink-3); font-weight: 400; }
  .ut-bond-val { font-weight: 600; }

  .ut-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex: 1 1 auto;
    max-width: 220px;
    color: var(--ink-3);
  }
  .ut-search input {
    background: none;
    border: none;
    outline: none;
    font: inherit;
    color: var(--ink-1);
    font-size: 11.5px;
    width: 100%;
  }
  .ut-search input::placeholder { color: var(--ink-3); }

  /* Compact discover/pulse row */
  .ut-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }
  .ut-row:last-child { border-bottom: none; }
  .ut-row:hover { background: rgba(255, 255, 255, 0.02); }
  .ut-row .av {
    width: 32px; height: 32px;
    background: #1a1a1a;
    overflow: hidden;
    position: relative;
  }
  .ut-row .av img { width: 100%; height: 100%; object-fit: cover; }
  .ut-row .info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .ut-row .info .top {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px;
  }
  .ut-row .info .top .tk { color: var(--ink-1); font-weight: 600; }
  .ut-row .info .top .nm { color: var(--ink-3); font-weight: 400; }
  .ut-row .info .bot {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 10.5px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
  }
  .ut-row .info .bot .age { color: var(--accent); }
  .ut-row .stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-family: var(--mono);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }
  .ut-row .stats .l1, .ut-row .stats .l2 {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--ink-2);
  }
  .ut-row .stats .k { color: var(--ink-3); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; }
  .ut-row .stats .v { color: var(--ink-1); }
  .ut-row .stats .v.amber { color: var(--accent); font-weight: 600; }
  .ut-row .stats .pct { font-weight: 600; }
  .ut-row .stats .pct.pos { color: #4ADE80; }
  .ut-row .stats .pct.neg { color: #FF5C5C; }

  /* PnL stats grid */
  .ut-pnl-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .ut-pnl-stat {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
  }
  .ut-pnl-stat:last-child { border-right: none; }
  .ut-pnl-stat .k {
    font-size: 10px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .ut-pnl-stat .v {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-1);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
  }
  .ut-pnl-stat .v.pos { color: #4ADE80; }
  .ut-pnl-stat .v.neg { color: #FF5C5C; }
  .ut-pnl-stat .dim { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

  .ut-pop-listhead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    flex: 0 0 auto;
  }
  .ut-pop-listhead .dim { color: var(--ink-3); }

  /* PnL fill row */
  .ut-fill {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--mono);
    font-size: 11.5px;
  }
  .ut-fill:last-child { border-bottom: none; }
  .ut-fill .side {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border: 1px solid;
    font-weight: 600;
  }
  .ut-fill .side.buy  { color: #4ADE80; border-color: rgba(74,222,128,0.30); background: rgba(74,222,128,0.06); }
  .ut-fill .side.sell { color: #FF5C5C; border-color: rgba(255,92,92,0.30);  background: rgba(255,92,92,0.06); }
  .ut-fill .nm {
    display: flex; flex-direction: column; gap: 1px; min-width: 0;
  }
  .ut-fill .nm .tk { color: var(--ink-1); font-weight: 600; }
  .ut-fill .nm .meta { color: var(--ink-3); font-size: 10px; }
  .ut-fill .pl {
    display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
    font-variant-numeric: tabular-nums;
  }
  .ut-fill .pl .v { font-weight: 600; }
  .ut-fill .pl .v.pos { color: #4ADE80; }
  .ut-fill .pl .v.neg { color: #FF5C5C; }
  .ut-fill .pl .dim { color: var(--ink-3); font-size: 10px; }

  /* ===== Trading Settings popover (PRESET 1) ===== */
  .ut-pop--preset { width: 460px; }
  .ut-set { padding: 14px; display: flex; flex-direction: column; gap: 12px; }

  /* Preset tabs row — three labelled tabs + a colored "extra slot"
     button to the right (matches Axiom's quick-slot icon). */
  .ut-set-presets {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .ut-set-presets-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .ut-pset {
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 8px 6px;
    cursor: pointer;
    transition: background 120ms, color 120ms;
  }
  .ut-pset:last-child { border-right: none; }
  .ut-pset:hover { color: var(--ink-1); }
  .ut-pset.is-active {
    background: rgba(255,176,46,0.10);
    color: var(--accent);
  }
  .ut-set-extra {
    width: 36px; height: 36px;
    background: rgba(255,176,46,0.08);
    border: 1px solid rgba(255,176,46,0.30);
    color: var(--accent);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .ut-set-extra:hover { background: rgba(255,176,46,0.14); }

  /* Buy / Sell mode segmented control */
  .ut-set-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .ut-mode {
    background: transparent;
    border: none;
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    padding: 9px 8px;
    cursor: pointer;
    border-right: 1px solid rgba(255,255,255,0.06);
    transition: background 120ms, color 120ms;
  }
  .ut-mode:last-child { border-right: none; }
  .ut-mode:hover { color: var(--ink-1); }
  .ut-mode.is-active {
    background: rgba(74, 222, 128, 0.08);
    color: #4ADE80;
  }

  /* Three-column numeric input grid (slippage / priority / bribe) */
  .ut-set-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    border: 1px solid rgba(255,255,255,0.08);
  }
  .ut-num {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.02);
    border-right: 1px solid rgba(255,255,255,0.06);
  }
  .ut-num:last-child { border-right: none; }
  .ut-num-row {
    display: flex;
    align-items: center;
    padding: 8px 10px 4px;
    gap: 4px;
  }
  .ut-num input {
    background: none; border: none; outline: none;
    font: inherit;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-1);
    font-variant-numeric: tabular-nums;
    width: 100%;
    min-width: 0;
    padding: 0;
  }
  .ut-num-suffix {
    color: var(--ink-3);
    font-size: 11px;
    font-family: var(--mono);
  }
  .ut-num-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px 8px;
    color: var(--ink-3);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
  }
  .ut-num-label svg { color: var(--ink-3); flex: 0 0 auto; }

  /* Inline number input variant (Max Fee) */
  .ut-num--inline {
    flex-direction: row;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    flex: 1 1 auto;
    max-width: 220px;
  }
  .ut-num--inline .ut-num-pre {
    color: var(--ink-3); font-size: 10.5px; text-transform: uppercase;
    letter-spacing: 0.06em; margin-right: 6px;
  }
  .ut-num--inline input { font-size: 12px; font-weight: 500; }

  /* Generic horizontal row (label + control pair) */
  .ut-set-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  /* Custom checkbox */
  .ut-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--ink-1);
    font-size: 12px;
  }
  .ut-check input { display: none; }
  .ut-check-box {
    width: 14px; height: 14px;
    border: 1px solid rgba(255,255,255,0.20);
    background: transparent;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .ut-check input:checked + .ut-check-box {
    background: var(--accent);
    border-color: var(--accent);
  }
  .ut-check input:checked + .ut-check-box::after {
    content: '';
    width: 4px; height: 8px;
    border: solid #000;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) translate(-1px, -1px);
  }

  /* MEV mode segmented control */
  .ut-mev-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ink-1);
    font-size: 12px;
  }
  .ut-mev-label svg { color: var(--ink-3); }
  .ut-mev-seg {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid rgba(255,255,255,0.08);
  }
  .ut-mev {
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 11.5px;
    padding: 6px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 120ms, color 120ms;
  }
  .ut-mev:last-child { border-right: none; }
  .ut-mev:hover { color: var(--ink-1); }
  .ut-mev.is-active {
    background: rgba(255,176,46,0.08);
    color: var(--accent);
  }

  /* RPC input row */
  .ut-set-rpc {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .ut-set-rpc .k {
    color: var(--ink-3);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--mono);
  }
  .ut-set-rpc input {
    background: none; border: none; outline: none;
    font: inherit;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-1);
    flex: 1 1 auto;
    min-width: 0;
  }

  /* Continue button — full-width primary action */
  .ut-set-go {
    width: 100%;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #000;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 14px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 120ms;
  }
  .ut-set-go:hover { background: var(--accent-bright); border-color: var(--accent-bright); }

  /* ===== Regions popover ===== */
  .ut-region-list {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    overflow-y: auto;
  }
  .ut-region {
    display: grid;
    grid-template-columns: 4px 18px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: none;
    border: none;
    font: inherit;
    font-family: var(--mono);
    color: var(--ink-1);
    cursor: pointer;
    transition: background 100ms;
    text-align: left;
  }
  .ut-region:hover { background: rgba(255,255,255,0.03); }
  .ut-region .bar { width: 2px; height: 16px; background: transparent; justify-self: start; margin-left: -4px; }
  .ut-region.is-active { background: rgba(255,176,46,0.05); }
  .ut-region.is-active .bar { background: var(--accent); }
  .ut-region .ic {
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .ut-region .ic svg { width: 14px; height: 14px; }
  .ut-region .nm {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
  }
  .ut-region .ms {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }
  .ut-region.tier-fast .ic   { color: var(--accent); }
  .ut-region.tier-fast .ms   { color: var(--accent); }
  .ut-region.tier-mid .ic    { color: #E8924D; }
  .ut-region.tier-mid .ms    { color: #E8924D; }
  .ut-region.tier-slow .ic   { color: #FF6B6B; }
  .ut-region.tier-slow .ms   { color: #FF6B6B; }
  /* Ethereum diamond glyph used in place of the Solana mark in the
     balance pill — keeps brand consistency with the header chain pill. */
  .eth-glyph {
    width: 9px; height: 12px; flex: 0 0 auto;
    color: var(--ink-2);
  }