#exchange-filter{
      width:330px;
      max-width:92vw;
      max-height:70vh;
      overflow:hidden;
    }

    .exch-scroll{
      max-height:56vh;
      overflow:auto;
    }

    .exch-item{
      display:flex;
      align-items:center;
      gap:8px;
      padding:6px 10px;
      margin-bottom:6px;
      border:1px solid #e5e7eb;
      border-radius:10px;
      background:#fff;
      font-size:14px;
      line-height:1.2;
    }

    .exch-item input{
      margin:0;
    }

    .exch-item img{
      width:16px;
      height:16px;
    }

    .exch-item span{
      color:#111;
      font-weight:500;
    }

    .exch-item:hover{
      background:#f7f7f7;
    }

#arbitrage-table{
  width:100%;
  min-width:1100px;
  max-width:100%;
      border-left:1px solid var(--border);
      border-right:1px solid var(--border);
    }

    #arbitrage-table th,
    #arbitrage-table td{
      padding-top:8px;
      padding-bottom:8px;
    }

    
#arbitrage-table th:nth-child(1),
#arbitrage-table td:nth-child(1){
  width:164px;
  max-width:196px;
  padding-left:6px;
  padding-right:6px;
}

    #arbitrage-table th:nth-child(2),
    #arbitrage-table td:nth-child(2){
      width:230px;
      max-width:250px;
    }

    
    #arbitrage-table th:nth-child(3),
    #arbitrage-table td:nth-child(3),
    #arbitrage-table th:nth-child(4),
    #arbitrage-table td:nth-child(4),
    #arbitrage-table th:nth-child(5),
    #arbitrage-table td:nth-child(5),
    #arbitrage-table th:nth-child(6),
    #arbitrage-table td:nth-child(6),
    #arbitrage-table th:nth-child(7),
    #arbitrage-table td:nth-child(7),
    #arbitrage-table th:nth-child(8),
    #arbitrage-table td:nth-child(8){
      padding-left:6px;
      padding-right:6px;
    }

    
    #arbitrage-table td[data-label="Token"] a{
      color:#2f8cff;
      text-decoration:none;
      font-weight:700;
    }

    #arbitrage-table td[data-label="Token"] a:hover{
      color:#63b2ff;
      text-decoration:underline;
    }

    #arbitrage-table td[data-label="Token"] mark{
      background:rgba(255,255,0,.18);
      padding:0 2px;
    }

    .token-cell{
      display:grid;
      grid-template-columns:52px 1fr;
      align-items:center;
      column-gap:6px;
      min-width:0;
    }

.token-label{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:visible;
  white-space:nowrap;
  line-height:1.25;
}

    .group-toggle{
      display:inline-flex;
      align-items:center;
      gap:4px;
      padding:2px 6px;
      border-radius:999px;
      border:1px solid var(--border);
      background:rgba(255,255,255,.04);
      color:#9fb3c8;
      font-size:11px;
      line-height:1;
      cursor:pointer;
      min-width:46px;
      justify-content:center;
    }

    .group-toggle .caret{
      width:0;
      height:0;
      border-left:4px solid transparent;
      border-right:4px solid transparent;
      border-top:6px solid currentColor;
      transition:transform .2s ease;
    }

    .group-toggle.expanded .caret{
      transform:rotate(180deg);
    }

    .group-toggle.spacer{
      visibility:hidden;
    }

.token-cell a{
  justify-self:start;
}

.token-label-content{
  display:inline-flex;
  align-items:flex-start;
  gap:2px;
  min-width:0;
  max-width:100%;
}

.token-label-text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.token-new-badge{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:12px;
  height:12px;
  border:1px solid rgba(34,197,94,.7);
  border-radius:999px;
  background:rgba(34,197,94,.18);
  color:#22c55e;
  padding:0;
  margin-left:2px;
  transform:translateY(-.05em);
  font-size:8px;
  font-weight:800;
  line-height:1;
  letter-spacing:0;
}

.matched-new-token-links{
  margin-top:12px;
  padding:6px 8px;
  border:1px solid rgba(148,163,184,.12);
  border-radius:8px;
  background:rgba(15,23,42,.35);
}
.matched-new-token-links[hidden]{
  display:none!important;
}
.matched-new-token-links__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
}
.matched-new-token-links__title{
  display:inline-flex;
  align-items:center;
  min-height:0;
  margin:0;
  padding:0;
  border:none;
  background:transparent;
  color:rgba(148,163,184,.82);
  font-size:11px;
  font-weight:700;
  line-height:1;
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
}
.matched-new-token-links__meta{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  font-size:12px;
  color:rgba(148,163,184,.86);
  background:rgba(30,41,59,.4);
  border:1px solid rgba(148,163,184,.16);
  border-radius:999px;
  padding:0 8px;
}
.matched-new-token-links__items{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.matched-new-token-link{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:8px;
  border:1px solid rgba(96,165,250,.28);
  background:rgba(15,23,42,.6);
  color:#e2e8f0;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
}
.page-title-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.page-info-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.45);
  color:rgba(226,232,240,.9);
  font-size:12px;
  font-weight:800;
  text-decoration:none;
}
.page-info-icon:hover,
.page-info-icon:focus{
  color:#fff;
  border-color:rgba(59,130,246,.6);
  text-decoration:none;
}
.page-info-sheet{
  position:relative;
  margin-top:10px;
  border:1px solid rgba(148,163,184,.18);
  background:rgba(10,16,24,.88);
  box-shadow:0 16px 32px rgba(0,0,0,.28);
  border-radius:10px;
  max-height:0;
  opacity:0;
  overflow:hidden;
  transition:max-height .2s ease, opacity .2s ease;
}
.page-info-sheet[open]{
  max-height:70vh;
  opacity:1;
}
.page-info-sheet summary{
  display:none;
}
.page-info-sheet .arb-seo-disclosure-body{
  max-height:70vh;
  overflow:auto;
  padding:22px 24px 26px;
}
.page-info-sheet .page-info-sheet__close{
  position:absolute;
  top:12px;
  right:16px;
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.35);
  background:transparent;
  color:rgba(226,232,240,.9);
  font-size:16px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
}
.page-info-sheet .page-info-sheet__close:hover,
.page-info-sheet .page-info-sheet__close:focus{
  color:#fff;
  border-color:rgba(59,130,246,.6);
}
.matched-new-token-link:hover,
.matched-new-token-link:focus{
  color:#fff;
  border-color:rgba(59,130,246,.6);
  text-decoration:none;
}
.matched-new-token-empty{
  color:rgba(148,163,184,.9);
  font-size:12px;
}
.matched-new-token-links.is-compact{
  display:flex;
  align-items:center;
  gap:10px 12px;
  flex-wrap:wrap;
}
.matched-new-token-links.is-compact .matched-new-token-links__head{
  display:contents;
}
.matched-new-token-links.is-compact .matched-new-token-links__items{
  order:2;
  gap:6px;
  flex:1 1 280px;
  min-width:0;
}
.matched-new-token-links.is-compact .matched-new-token-links__title{
  order:1;
  margin:0;
  white-space:nowrap;
}
.matched-new-token-links.is-compact .matched-new-token-links__meta{
  order:3;
  margin-left:auto;
  white-space:nowrap;
}
.matched-new-token-links.is-compact .matched-new-token-empty{
  white-space:nowrap;
}
body.light .matched-new-token-links{
  border-color:rgba(148,163,184,.22);
  background:rgba(255,255,255,.82);
}
body.light .matched-new-token-links__title{
  color:rgba(71,85,105,.88);
}
body.light .matched-new-token-links__meta{
  color:rgba(71,85,105,.88);
  background:rgba(241,245,249,.92);
  border-color:rgba(148,163,184,.22);
}
body.light .matched-new-token-link{
  border-color:rgba(148,163,184,.3);
  background:#fff;
  color:#0f172a;
}
body.light .matched-new-token-link:hover,
body.light .matched-new-token-link:focus{
  color:#0f172a;
  border-color:rgba(59,130,246,.35);
  background:rgba(248,250,252,.98);
}
body.light .matched-new-token-empty{
  color:rgba(71,85,105,.9);
}

.commodity-tag{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  font-size:11px;
  line-height:1;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}

.commodity-tag-oil{
  background:linear-gradient(180deg, rgba(53,117,83,.95), rgba(23,67,45,.95));
  color:#e8fff2;
}

.commodity-tag-metal{
  background:linear-gradient(180deg, rgba(122,132,146,.95), rgba(67,74,84,.95));
  color:#f5f7fa;
}

.token-group-row.is-collapsed{
  display:none;
}

    .token-group-row{
      background:rgba(0,0,0,.02);
    }

    body.dark .token-group-row{
      background:rgba(255,255,255,.03);
    }

    .token-group-row .token-cell{
      grid-template-columns:52px minmax(0, 1fr);
      justify-content:flex-start;
      min-width:0;
    }

    .token-group-row .group-toggle.spacer{
      display:inline-flex;
      visibility:hidden;
    }

    .token-group-row .token-cell a{
      justify-self:start;
      min-width:0;
      max-width:100%;
      overflow:hidden;
      text-overflow:ellipsis;
      white-space:nowrap;
      display:block;
    }

    
    .exchange-cell{
      display:flex;
      flex-direction:column;
      justify-content:center;
      gap:4px;
    }

    .exchange-row{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:6px;
      padding:3px 6px;
      border-radius:6px;
      background:#fafafa;
      min-height:28px;
    }

    .exchange-name{
      display:flex;
      align-items:center;
      gap:6px;
      width:110px;
      min-width:110px;
      white-space:nowrap;
      overflow:hidden;
    }

    .exchange-name img{
      width:16px;
      height:16px;
    }

    .exchange-name span{
      font-weight:500;
      font-size:13px;
      white-space:nowrap;
    }

    .exchange-price{
      font-variant-numeric:tabular-nums;
      color:#333;
      font-size:13px;
      min-width:60px;
      text-align:right;
    }

    .bg-long,
    .bg-short{
      border-radius:6px;
      padding:2px 6px;
      display:inline-flex;
      align-items:center;
      gap:6px;
    }

    .bg-long{
      background:#d4f8e6;
    }

    .bg-short{
      background:#f8d4d4;
    }

    
    td.fund-col{
      background:transparent;
    }

    .fund-wrap{
      display:inline-flex;
      flex-direction:column;
      align-items:center;
      gap:4px;
      padding:5px 6px;
      background:#f3f4f6;
      border-radius:5px;
      border:1px solid #e1e4ea;
    }

    .fund-row{
      display:grid;
      grid-template-columns:76px 34px 60px;
      justify-content:center;
      align-items:center;
      column-gap:8px;
      line-height:1.4;
    }

    .fund-rate{
      display:block;
      font-weight:500;
      text-align:right;
      min-width:0;
      font-variant-numeric:tabular-nums;
    }

    .fund-interval{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      font-size:11px;
      font-weight:600;
      border-radius:4px;
      padding:2px 4px;
      text-align:center;
      color:#fff;
      min-width:0;
    }

    .timer{
      display:block;
      min-width:0;
      width:100%;
      text-align:center;
      font-size:11px;
      font-weight:400;
      font-variant-numeric:tabular-nums;
    }

    .fund-rate.is-empty,
    .fund-interval.is-empty,
    .timer.is-empty{
      text-align:center;
    }

    .fund-interval.is-empty{
      background:transparent !important;
      color:inherit !important;
      border:none !important;
      padding:0 !important;
    }

    td.funding-history-cell{
      text-align:center;
    }

    .funding-history-cell .fh24-link{
      display:block;
      color:inherit;
      text-decoration:none;
      line-height:1.8;
      font-weight:600;
    }

    .interval-1h{ --interval-bg:rgba(134,239,172,.18); --interval-border:rgba(134,239,172,.34); --interval-fg:#bbf7d0; }
    .interval-2h{ --interval-bg:rgba(59,130,246,.14); --interval-border:rgba(59,130,246,.26); --interval-fg:#93c5fd; }
    .interval-3h{ --interval-bg:rgba(132,204,22,.14); --interval-border:rgba(132,204,22,.26); --interval-fg:#bef264; }
    .interval-4h{ --interval-bg:rgba(4,120,87,.22); --interval-border:rgba(4,120,87,.38); --interval-fg:#34d399; }
    .interval-6h{ --interval-bg:rgba(234,179,8,.14); --interval-border:rgba(234,179,8,.28); --interval-fg:#fde68a; }
    .interval-8h{ --interval-bg:rgba(249,115,22,.14); --interval-border:rgba(249,115,22,.28); --interval-fg:#fdba74; }
    .interval-default{ --interval-bg:rgba(148,163,184,.14); --interval-border:rgba(148,163,184,.26); --interval-fg:#cbd5e1; }

    
    .volume-col{
      text-align:center;
    }

    .volume-col .vol-line{
      display:block;
      line-height:1.8;
      font-weight:600;
      margin:0;
      font-size:inherit;
      color:inherit;
      font-variant-numeric:tabular-nums;
    }

    body.dark .volume-col .vol-line{ opacity:.85; }

    .badge-cell{
      display:inline-block;
      padding:5px 7px;
      border-radius:6px;
      font-weight:bold;
      min-width:70px;
    }

    body.table-usdc #arbitrage-table th:nth-child(1),
    body.table-usdc #arbitrage-table td:nth-child(1){
      width:178px;
      max-width:212px;
    }

    body.table-usdc #arbitrage-table th:nth-child(2),
    body.table-usdc #arbitrage-table td:nth-child(2){
      width:270px;
      max-width:300px;
    }

    body.table-usdc .token-cell{
      grid-template-columns:44px minmax(0,1fr);
      column-gap:6px;
    }

    body.table-usdc .group-toggle{
      min-width:40px;
      padding:2px 4px;
    }

    body.table-usdc .exchange-row{
      gap:4px;
      padding:2px 5px;
    }

    body.table-usdc .exchange-name{
      width:132px;
      min-width:132px;
      gap:4px;
    }

    body.table-usdc .exchange-name span{
      font-size:12px;
      font-weight:600;
    }

    body.table-usdc .exchange-price{
      font-size:12px;
      min-width:74px;
    }

    body.table-usdc-exchange-wide #arbitrage-table th:nth-child(2),
    body.table-usdc-exchange-wide #arbitrage-table td:nth-child(2){
      width:286px;
      max-width:320px;
    }

    body.table-usdc-exchange-wide .exchange-name{
      width:144px;
      min-width:144px;
    }

    body.table-usdc-exchange-wide .exchange-price{
      min-width:76px;
    }

    @media (max-width: 900px){
      .table-wrapper{
        padding:2px 4px 10px;
        overflow:visible;
        min-height:160px;
      }

      #arbitrage-table{
        min-width:0;
        width:100%;
        border:0;
        background:transparent;
        box-shadow:none;
      }

      #arbitrage-table thead{
        display:none;
      }

      #arbitrage-table tbody{
        display:grid;
        grid-template-columns:1fr;
        gap:10px;
      }

      #arbitrage-table tr{
        display:grid;
        grid-template-columns:minmax(0, 1fr) auto;
        grid-template-areas:
          "token apr"
          "open spread"
          "exchange exchange"
          "funding funding"
          "fh24 vol"
          "life life";
        gap:7px 8px;
        border:1px solid var(--border);
        border-radius:14px;
        background:linear-gradient(165deg, rgba(27, 32, 40, 0.96), rgba(16, 19, 24, 0.96));
        box-shadow:0 12px 24px rgba(0, 0, 0, 0.28);
        padding:10px;
      }

      body.light #arbitrage-table tr{
        background:linear-gradient(180deg, #ffffff, #f8fafc);
        box-shadow:0 10px 22px rgba(15, 23, 42, 0.09);
      }

      #arbitrage-table tr.token-group-row{
        margin-top:-3px;
        border-style:dashed;
        opacity:.96;
      }

      #arbitrage-table tr.token-group-row.is-collapsed{
        display:none !important;
      }

      #arbitrage-table td{
        border:0;
        padding:0;
        margin:0;
        min-width:0;
        text-align:left;
        white-space:normal;
        overflow:visible;
      }

      #arbitrage-table td::before{
        display:none;
      }

      #arbitrage-table td:nth-child(1){ grid-area:token; }
      #arbitrage-table td:nth-child(2){ grid-area:exchange; }
      #arbitrage-table td:nth-child(3){ grid-area:funding; }
      #arbitrage-table td:nth-child(4){ grid-area:fh24; }
      #arbitrage-table td:nth-child(5){ grid-area:vol; }
      #arbitrage-table td:nth-child(6){ grid-area:apr; justify-self:end; }
      #arbitrage-table td:nth-child(7){ grid-area:spread; justify-self:end; }
      #arbitrage-table td:nth-child(8){ grid-area:open; justify-self:start; }
      #arbitrage-table td:nth-child(9){ grid-area:life; }

      #arbitrage-table td:nth-child(4),
      #arbitrage-table td:nth-child(5),
      #arbitrage-table td:nth-child(9){
        display:block;
      }

      #arbitrage-table td:nth-child(4)::before,
      #arbitrage-table td:nth-child(5)::before,
      #arbitrage-table td:nth-child(9)::before{
        display:block;
        font-size:10px;
        font-weight:700;
        letter-spacing:.05em;
        text-transform:uppercase;
        color:var(--muted);
        margin-bottom:4px;
      }

      #arbitrage-table td:nth-child(4)::before{ content:"FH 24h"; }
      #arbitrage-table td:nth-child(5)::before{ content:"Vol 24h"; }
      #arbitrage-table td:nth-child(9)::before{ content:"Lifetime"; }

      #arbitrage-table td:nth-child(6),
      #arbitrage-table td:nth-child(7),
      #arbitrage-table td:nth-child(8){
        display:flex;
        align-items:center;
      }

      #arbitrage-table td[colspan]{
        grid-column:1 / -1;
        text-align:center;
        padding:8px 0;
      }

      .token-cell{
        grid-template-columns:40px minmax(0, 1fr);
        column-gap:6px;
        align-items:center;
      }

      .token-cell .group-toggle{
        min-width:40px;
        padding:3px 7px;
        background:rgba(255,255,255,0.03);
        border-color:var(--border);
      }

      .token-cell .group-child-arrow{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-width:40px;
        color:var(--muted);
      }

      .token-cell a,
      .token-label{
        font-size:15px;
        font-weight:700;
        line-height:1.1;
      }

      .exchange-cell{
        gap:8px;
      }

      .exchange-row{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:8px;
        border:1px solid var(--border);
        border-radius:10px;
        padding:7px 8px;
        background:rgba(255,255,255,0.02);
        white-space:nowrap;
      }

      body.light .exchange-row{
        background:#f8fafc;
      }

      .exchange-name{
        width:auto;
        min-width:0;
        flex:1 1 auto;
      }

      .exchange-name span{
        font-size:11px;
        font-weight:600;
      }

      .exchange-price{
        font-size:12px;
        min-width:74px;
        color:var(--muted);
        font-weight:600;
      }

      .fund-wrap{
        display:flex;
        width:100%;
        border-radius:10px;
        padding:6px 8px;
      }

      .fund-row{
        width:100%;
        grid-template-columns:minmax(74px, 1fr) 36px 68px;
        column-gap:6px;
      }

      .fund-rate{
        font-size:12px;
        font-weight:700;
      }

      .timer{
        font-size:11px;
        border:1px solid var(--border);
        border-radius:999px;
        padding:2px 6px;
        background:rgba(255,255,255,0.02);
      }

      .funding-history-cell .fh24-link{
        line-height:1.4;
        font-size:12px;
      }

      .volume-col .vol-line{
        line-height:1.4;
        font-size:12px;
      }

      .badge-cell{
        min-width:76px;
        padding:3px 8px;
        border-radius:999px;
        font-size:11px;
        line-height:1.2;
        font-weight:700;
      }

      #arbitrage-table td:nth-child(9) .badge-cell{
        border-radius:8px;
        min-width:92px;
      }
    }

    @media (max-width: 560px){
      .table-wrapper{
        padding:2px 0 8px;
      }

      #arbitrage-table tbody{
        gap:8px;
      }

      #arbitrage-table tr{
        padding:9px;
        border-radius:13px;
        gap:6px 7px;
      }

      .token-cell{
        grid-template-columns:34px minmax(0, 1fr);
      }

      .token-cell .group-toggle{
        min-width:34px;
        padding:2px 5px;
      }

      .token-cell .group-child-arrow{
        min-width:34px;
      }

      .token-cell a,
      .token-label{
        font-size:14px;
      }

      .exchange-row{
        padding:6px 7px;
      }

      .exchange-price{
        min-width:66px;
        font-size:11px;
      }

      .fund-row{
        grid-template-columns:minmax(66px, 1fr) 32px 62px;
      }

      .badge-cell{
        min-width:68px;
        font-size:10px;
      }

      #arbitrage-table td:nth-child(9) .badge-cell{
        min-width:84px;
      }
    }

    
    .token-header{
      position:relative;
      display:inline-flex;
      align-items:center;
      gap:6px;
    }

    .token-search-btn{
      background:transparent;
      border:0;
      padding:0;
      cursor:pointer;
      line-height:1;
      opacity:.85;
    }

    .token-search-btn:hover{
      opacity:1;
    }

    .token-popover{
      display:none;
      position:absolute;
      top:100%;
      left:0;
      margin-top:6px;
      width:220px;
      background:#fff;
      border:1px solid #ccc;
      border-radius:8px;
      padding:8px;
      z-index:50;
      box-shadow:0 8px 24px rgba(0,0,0,.12);
    }

    .token-popover.show{
      display:block;
    }

    .token-popover input{
      width:100%;
      padding:6px 8px;
      font-size:12px;
      border:1px solid #ccc;
      border-radius:6px;
      outline:none;
    }

    .token-popover .token-clear{
      position:absolute;
      right:14px;
      top:12px;
      background:transparent;
      border:0;
      color:#999;
      cursor:pointer;
    }

    
    body.dark{
      background: var(--bg);
      color:#e0e0e0;
    }

    body.dark h2{
      color:#f5f5f5;
    }

    body.dark th{
      color:#bbb;
    }

    body.dark #arbitrage-table{
      border:1px solid #333;
      border-radius:12px;
      overflow:hidden;
    }

    body.dark .exchange-price{
      color:#999;
    }

    body.dark .exchange-row{
      background:#1a1a1a;
    }

    body.dark .update-timer{
      color:#e7e7e7;
      border-color:rgba(229, 186, 110, 0.35);
      background:rgba(229, 186, 110, 0.16);
    }

    body.dark .bg-long{
      background:#2a4a36;
      color:#b9f6ca;
    }

    body.dark .bg-short{
      background:#4a2a2a;
      color:#ffbdbd;
    }

    body.dark .fund-wrap{
      background:#151515;
      border-color:#2a2a2a;
    }

    body.dark .fund-interval{
      opacity:.95;
    }

    body.dark .timer{
      color:#f5f5f5;
    }

    body.dark #arbitrage-table td[data-label="Token"] a{
      color:#64b5ff;
    }

    body.dark #arbitrage-table td[data-label="Token"] a:hover{
      color:#9cd3ff;
    }

    body.dark #arbitrage-table td[data-label="Token"] mark{
      background:rgba(255,255,0,.28);
    }

    body.dark #exchange-filter{
      background:#151515;
      border-color:#333;
    }

    body.dark .exch-item{
      background:#141414;
      border-color:#2a2a2a;
    }

    body.dark .exch-item:hover{
      background:#1d1d1d;
    }

    body.dark .exch-item span{
      color:#f5f5f5;
    }

    body.dark .token-popover{
      background:#1a1a1a;
      border-color:#333;
      box-shadow:0 8px 24px rgba(0,0,0,.5);
    }

    body.dark .token-popover input{
      background:#111;
      color:#eee;
      border-color:#333;
    }

    body.dark .view-switch .btn-outline-primary{
      border-color:#888;
      color:#ddd;
    }

    body.dark .view-switch .btn-outline-primary:hover{
      background:#444;
      border-color:#aaa;
      color:#fff;
    }

    body.dark .view-switch .btn.btn-primary.active{
      color:#dbeafe !important;
      background:rgba(59,130,246,.24) !important;
      border-color:rgba(96,165,250,.56) !important;
    }

    body.dark .view-switch .vip-pill{
      color:#1f2937;
      background:#fbbf24;
      border-color:rgba(255,255,255,.14);
    }

    .mobile-table-switch{
      display:none;
    }

    @media (max-width:768px){
      .toolbar{
        display:grid;
        grid-template-columns:minmax(0,1fr) minmax(0,1fr);
        gap:6px;
        align-items:stretch;
        margin-bottom:8px;
      }

      .toolbar .view-switch{
        display:none !important;
      }

      .toolbar .mobile-table-switch{
        grid-column:1 / -1;
        width:100%;
        display:block;
      }

      .toolbar .mobile-table-switch > .btn{
        width:100%;
        min-height:34px;
        border-radius:10px;
        font-size:12px;
        font-weight:700;
        padding:5px 10px;
        text-align:left;
      }

      .toolbar .mobile-table-switch .dropdown-menu{
        width:100%;
        min-width:0;
        border-radius:12px;
        padding:4px;
      }

      .toolbar .mobile-table-switch .dropdown-item{
        border-radius:10px;
        padding:7px 10px;
        font-size:12px;
      }

      .toolbar .mobile-table-switch .dropdown-item.active{
        background:rgba(47,140,255,.16);
        color:var(--text);
      }

      .toolbar > .dropdown:not(.mobile-table-switch){
        grid-column:1 / 2;
        width:100% !important;
        margin-left:0 !important;
      }

      .toolbar > .dropdown:not(.mobile-table-switch) > .btn{
        min-height:36px;
        border-radius:10px;
        font-size:13px;
        padding-top:5px;
        padding-bottom:5px;
      }

      .toolbar > .token-search{
        grid-column:1 / -1;
        width:100% !important;
        min-height:36px;
        border-radius:10px;
        font-size:15px;
        padding-top:5px;
        padding-bottom:5px;
      }

      .toolbar > #calc-btn,
      .toolbar > #url-builder-btn,
      .toolbar > #signup-links-btn{
        grid-column:1 / -1;
        width:100% !important;
        min-height:32px;
        border-radius:10px;
        padding-top:4px;
        padding-bottom:4px;
        font-size:12px;
      }

      .toolbar > #last-update-timer,
      .toolbar > #last-update{
        grid-column:2 / 3;
        width:100% !important;
        margin:0 !important;
        justify-content:center;
        min-height:32px;
        border-radius:10px;
        font-size:10px;
        gap:4px;
        padding:1px 7px;
      }

      .toolbar > #last-update-timer .update-label,
      .toolbar > #last-update .update-label{
        font-size:9px;
      }

      .toolbar > #last-update-timer .update-value,
      .toolbar > #last-update .update-value{
        font-size:10px;
      }

      .container{
        margin-top:12px;
        padding-left:10px;
        padding-right:10px;
      }

      h2{
        margin-bottom:6px;
        font-size:clamp(22px, 7.2vw, 34px);
        line-height:1.04;
      }

      .page-subtitle{
        margin-bottom:8px;
        font-size:clamp(12px, 3.8vw, 14px);
        line-height:1.22;
        display:-webkit-box;
        -webkit-line-clamp:2;
        -webkit-box-orient:vertical;
        overflow:hidden;
      }

      #exchange-filter{
        width:92vw;
      }

      .exch-item{
        padding:8px 10px;
        font-size:15px;
      }
    }

    @media (max-width: 480px){
      .toolbar{
        grid-template-columns:minmax(0,1fr) 106px;
        gap:5px;
      }

      .toolbar .mobile-table-switch > .btn{
        min-height:32px;
        font-size:11px;
        padding:4px 9px;
      }

  .toolbar > .dropdown:not(.mobile-table-switch) > .btn{
    min-height:34px;
    font-size:12px;
  }

  .toolbar > #signup-links-btn{
    flex:0 0 auto;
    min-height:34px;
    min-width:44px;
    border-radius:10px;
    padding:4px 10px;
    font-size:16px;
    line-height:1;
  }

  .toolbar > #last-update-timer,
  .toolbar > #last-update{
        min-height:30px;
        font-size:9.5px;
      }

      .toolbar > .token-search,
      .toolbar > #calc-btn,
      .toolbar > #url-builder-btn,
      .toolbar > #signup-links-btn{
        min-height:32px;
      }

      h2{
        margin-bottom:4px;
        font-size:clamp(20px, 7.6vw, 28px);
      }
    }

    @media (max-width: 420px){
      .page-subtitle{
        display:none;
      }

      .toolbar > #last-update-timer,
      .toolbar > #last-update{
        font-size:9px;
      }
    }

img[src^="/uploads/exchange-logos/"]{
  width:18px;
  height:18px;
  object-fit:contain;
  border-radius:5px;
  background:transparent;
  box-shadow:none;
}
body.light img[src^="/uploads/exchange-logos/"]{
  background:transparent;
  box-shadow:none;
}

/* Mobile compact toolbar: one row (table switch + exchanges + search) */
@media (max-width: 768px){
  .toolbar{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    gap:6px !important;
    overflow-x:auto;
    overflow-y:visible;
    -webkit-overflow-scrolling:touch;
    padding-bottom:2px;
    margin-bottom:8px !important;
    position:relative;
    z-index:1200;
    isolation:isolate;
  }

  .toolbar.dropdown-open,
  .toolbar:has(.dropdown.show){
    overflow:visible !important;
  }

  .toolbar .dropdown,
  .toolbar .mobile-table-switch{
    position:relative;
    z-index:1201;
  }

  .toolbar .dropdown-menu{
    z-index:1400 !important;
  }

  .table-wrapper{
    position:relative;
    z-index:1;
  }

  .toolbar .view-switch{
    display:none !important;
  }

  .toolbar .mobile-table-switch{
    display:block !important;
    width:auto !important;
    min-width:112px;
    flex:0 0 auto;
  }

  .toolbar .mobile-table-switch > .btn{
    width:auto !important;
    min-height:34px;
    border-radius:10px;
    font-size:12px;
    font-weight:700;
    padding:5px 10px;
    text-align:left;
    white-space:nowrap;
  }

  .toolbar .mobile-table-switch .dropdown-menu{
    width:220px !important;
    min-width:220px !important;
    max-width:90vw;
  }

  .toolbar > #calc-btn,
  .toolbar > #url-builder-btn,
  .toolbar > #last-update-timer,
  .toolbar > #last-update{
    display:none !important;
  }

  .toolbar > .dropdown:not(.mobile-table-switch){
    grid-column:auto !important;
    width:auto !important;
    margin-left:0 !important;
    min-width:106px;
    flex:0 0 auto;
  }

  .toolbar > .dropdown:not(.mobile-table-switch) > .btn{
    width:auto !important;
    min-height:34px;
    border-radius:10px;
    font-size:12px;
    padding:5px 10px;
    white-space:nowrap;
  }

  .toolbar > .token-search,
  .toolbar > #tokenFilter{
    grid-column:auto !important;
    width:auto !important;
    min-height:34px;
    border-radius:10px;
    font-size:14px;
    padding-top:5px;
    padding-bottom:5px;
    min-width:140px;
    flex:1 0 140px;
  }
}

@media (max-width: 480px){
  .toolbar .mobile-table-switch{
    min-width:102px;
  }

  .toolbar > .dropdown:not(.mobile-table-switch){
    min-width:98px;
  }

  .toolbar > .token-search,
  .toolbar > #tokenFilter{
    min-width:126px;
    flex-basis:126px;
    font-size:13px;
  }
}

@media (min-width: 901px){
  body.dark .table-wrapper{
    border:1px solid #2a2a2a !important;
    border-radius:14px !important;
  }

  body.dark #arbitrage-table{
    border:1px solid #2a2a2a !important;
    border-collapse:separate !important;
    border-spacing:0 !important;
    border-radius:12px !important;
    overflow:hidden !important;
  }

  body.dark #arbitrage-table thead th:first-child{
    border-top-left-radius:12px;
  }

  body.dark #arbitrage-table thead th:last-child{
    border-top-right-radius:12px;
  }

  body.dark #arbitrage-table tbody tr:last-child td:first-child{
    border-bottom-left-radius:12px;
  }

  body.dark #arbitrage-table tbody tr:last-child td:last-child{
    border-bottom-right-radius:12px;
  }
}

/* Final dark table frame override (all breakpoints) */
body.dark .table-wrapper{
  border:1px solid #2a2a2a !important;
  border-radius:14px !important;
  overflow:hidden;
}

body.dark #arbitrage-table{
  border:1px solid #2a2a2a !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
  border-radius:12px !important;
  overflow:hidden !important;
}

body.dark #arbitrage-table thead th:first-child{
  border-top-left-radius:12px;
}

body.dark #arbitrage-table thead th:last-child{
  border-top-right-radius:12px;
}

body.dark #arbitrage-table tbody tr:last-child td:first-child{
  border-bottom-left-radius:12px;
}

body.dark #arbitrage-table tbody tr:last-child td:last-child{
  border-bottom-right-radius:12px;
}

/* Unified interval chips */
.fund-interval{
  box-sizing:border-box !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:28px !important;
  padding:1px 5px !important;
  border-radius:5px !important;
  border:1px solid var(--interval-border, rgba(148,163,184,.28)) !important;
  background:var(--interval-bg, rgba(148,163,184,.14)) !important;
  color:var(--interval-fg, #cbd5e1) !important;
  font-size:12px !important;
  font-weight:700 !important;
  line-height:1.15 !important;
  text-align:center !important;
}

.fund-interval.is-empty{
  background:transparent !important;
  color:var(--muted) !important;
  border:0 !important;
  padding:0 !important;
  min-width:0 !important;
}

.interval-1h{ --interval-bg:rgba(134,239,172,.18); --interval-border:rgba(134,239,172,.34); --interval-fg:#bbf7d0; }
.interval-2h{ --interval-bg:rgba(59,130,246,.14); --interval-border:rgba(59,130,246,.26); --interval-fg:#93c5fd; }
.interval-3h{ --interval-bg:rgba(132,204,22,.14); --interval-border:rgba(132,204,22,.26); --interval-fg:#bef264; }
.interval-4h{ --interval-bg:rgba(4,120,87,.22); --interval-border:rgba(4,120,87,.38); --interval-fg:#34d399; }
.interval-6h{ --interval-bg:rgba(234,179,8,.14); --interval-border:rgba(234,179,8,.28); --interval-fg:#fde68a; }
.interval-8h{ --interval-bg:rgba(249,115,22,.14); --interval-border:rgba(249,115,22,.28); --interval-fg:#fdba74; }
.interval-default{ --interval-bg:rgba(148,163,184,.14); --interval-border:rgba(148,163,184,.26); --interval-fg:#cbd5e1; }

body.light .interval-1h,
body[data-theme="light"] .interval-1h,
html[data-theme="light"] body .interval-1h{ --interval-bg:rgba(187,247,208,.55); --interval-border:rgba(74,222,128,.34); --interval-fg:#16a34a; }
body.light .interval-2h,
body[data-theme="light"] .interval-2h,
html[data-theme="light"] body .interval-2h{ --interval-bg:rgba(37,99,235,.10); --interval-border:rgba(37,99,235,.20); --interval-fg:#2563eb; }
body.light .interval-3h,
body[data-theme="light"] .interval-3h,
html[data-theme="light"] body .interval-3h{ --interval-bg:rgba(101,163,13,.10); --interval-border:rgba(101,163,13,.22); --interval-fg:#4d7c0f; }
body.light .interval-4h,
body[data-theme="light"] .interval-4h,
html[data-theme="light"] body .interval-4h{ --interval-bg:rgba(4,120,87,.16); --interval-border:rgba(4,120,87,.28); --interval-fg:#065f46; }
body.light .interval-6h,
body[data-theme="light"] .interval-6h,
html[data-theme="light"] body .interval-6h{ --interval-bg:rgba(202,138,4,.12); --interval-border:rgba(202,138,4,.22); --interval-fg:#a16207; }
body.light .interval-8h,
body[data-theme="light"] .interval-8h,
html[data-theme="light"] body .interval-8h{ --interval-bg:rgba(234,88,12,.10); --interval-border:rgba(234,88,12,.22); --interval-fg:#c2410c; }
body.light .interval-default,
body[data-theme="light"] .interval-default,
html[data-theme="light"] body .interval-default{ --interval-bg:rgba(100,116,139,.10); --interval-border:rgba(100,116,139,.20); --interval-fg:#475569; }

/* WUAH table tone refresh */
body.table-mobile-ref.dark{
  --wuah-table-bg:#151a22;
  --wuah-table-head:#111720;
  --wuah-table-row:#181e27;
  --wuah-table-row-alt:#181e27;
  --wuah-table-border:rgba(88,101,120,.34);
  --wuah-table-border-strong:rgba(112,128,150,.46);
  --wuah-table-link:#64b5ff;
  --wuah-table-link-hover:#9cd3ff;
}

body.table-mobile-ref.dark > .container .table-wrapper{
  border:1px solid var(--wuah-table-border);
  border-radius:14px;
  background:linear-gradient(180deg, rgba(96,115,138,.045), rgba(15,19,26,.18));
  box-shadow:0 18px 40px rgba(0,0,0,.34);
}

body.table-mobile-ref.dark #arbitrage-table{
  border-color:var(--wuah-table-border) !important;
  background:var(--wuah-table-bg) !important;
}

body.table-mobile-ref.dark #arbitrage-table thead,
body.table-mobile-ref.dark #arbitrage-table thead th{
  background:linear-gradient(180deg, #171d26, var(--wuah-table-head)) !important;
}

body.table-mobile-ref.dark #arbitrage-table thead th{
  color:#e6edf6 !important;
  border-bottom:1px solid var(--wuah-table-border-strong) !important;
}

body.table-mobile-ref.dark #arbitrage-table td{
  border-bottom-color:rgba(88,101,120,.24) !important;
  color:#dfe4ec;
}

body.table-mobile-ref.dark #arbitrage-table tbody tr:nth-child(odd){
  background:var(--wuah-table-row) !important;
}

body.table-mobile-ref.dark #arbitrage-table tbody tr:nth-child(even),
body.table-mobile-ref.dark .token-group-row{
  background:var(--wuah-table-row) !important;
}

body.table-mobile-ref.dark #arbitrage-table tbody tr:hover{
  background:#1d2631 !important;
}

body.table-mobile-ref.dark #arbitrage-table td[data-label="Token"] a,
body.table-mobile-ref.dark .matched-new-token-link{
  color:var(--wuah-table-link) !important;
}

body.table-mobile-ref.dark #arbitrage-table td[data-label="Token"] a:hover,
body.table-mobile-ref.dark .matched-new-token-link:hover{
  color:var(--wuah-table-link-hover) !important;
}

body.table-mobile-ref.dark .group-toggle,
body.table-mobile-ref.dark .exchange-row,
body.table-mobile-ref.dark .fund-wrap,
body.table-mobile-ref.dark .timer{
  border-color:rgba(88,101,120,.30) !important;
  background:rgba(255,255,255,.035) !important;
}

body.table-mobile-ref.dark .bg-long{
  background:rgba(34,197,94,.18) !important;
  color:#d8f8e4 !important;
}

body.table-mobile-ref.dark .bg-short{
  background:rgba(244,63,94,.18) !important;
  color:#ffd6dd !important;
}

body.table-mobile-ref.dark .exchange-price,
body.table-mobile-ref.dark .volume-col .vol-line{
  color:#c7cfdb !important;
}

body.table-mobile-ref.dark .volume-col .vol-line.is-low-volume{
  color:#d6a84a !important;
}

body.table-mobile-ref.dark .volume-col .vol-line.is-very-low-volume{
  color:#df6f6f !important;
}

body.table-mobile-ref.dark .badge-cell{
  border:1px solid rgba(255,255,255,.055);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04), 0 8px 18px rgba(0,0,0,.18);
}

body.table-mobile-ref.dark .route-lifetime{
  background:rgba(232,238,247,.075) !important;
  color:#eef2f7 !important;
}

body.table-mobile-ref.dark > .container .view-switch .btn.btn-primary.active,
body.table-mobile-ref.dark .toolbar .mobile-table-switch .dropdown-item.active{
  color:#eaf2fb !important;
  background:linear-gradient(180deg, rgba(72,88,108,.58), rgba(45,57,72,.42)) !important;
  border-color:rgba(112,128,150,.56) !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.035) !important;
}

@media (max-width:900px){
  body.table-mobile-ref.dark > .container .table-wrapper{
    border:0;
    background:transparent;
    box-shadow:none;
  }
}
