/* TradingHub v419 — mobile-only derivatives density pass.
   Loaded only by liquidation tracker, funding, open interest and liquidation map.
   Desktop/tablet layouts above 760px are intentionally untouched. */
@media (max-width:760px){
  /* Shared page shell: use the phone viewport instead of nesting the live tool in cards/gutters. */
  .deriv-page,
  .liqmap-seo-page{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    padding:10px 0 18px!important;
    box-sizing:border-box;
    overflow-x:hidden;
  }
  .deriv-page>.seo-hero,
  .liqmap-seo-page>.seo-hero{
    display:block;
    margin:0;
    padding:8px 12px 12px;
    border-bottom:0;
  }
  .deriv-page>.seo-hero .seo-summary,
  .liqmap-seo-page>.seo-hero .seo-summary{display:none}
  .deriv-page>.seo-hero .seo-eyebrow,
  .liqmap-seo-page>.seo-hero .seo-eyebrow{
    margin:0 0 5px;
    font-size:9px;
    letter-spacing:.055em;
  }
  .deriv-page>.seo-hero h1,
  .liqmap-seo-page>.seo-hero h1{
    max-width:none;
    margin:0;
    font-size:clamp(26px,8vw,34px);
    line-height:1.04;
    letter-spacing:-.032em;
  }
  .deriv-page>.seo-hero .lede,
  .liqmap-seo-page>.seo-hero .lede{
    display:-webkit-box;
    max-width:none;
    margin:8px 0 0;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    font-size:13px;
    line-height:1.45;
  }

  /* Flatten non-live content and tighten vertical rhythm without removing information. */
  .deriv-page>.seo-section,
  .liqmap-seo-page>.seo-section{
    padding:16px 12px;
    border-bottom:0;
  }
  .deriv-page>.deriv-live-section,
  .liqmap-seo-page>.liqmap-live-section{
    width:100%;
    max-width:100%;
    margin:0;
    padding:4px 0 12px!important;
  }
  .deriv-page>.seo-section>h2,
  .liqmap-seo-page>.seo-section>h2{
    margin-bottom:8px;
    font-size:20px;
    line-height:1.15;
  }
  .deriv-page>.seo-section>p,
  .deriv-page>.seo-copy p,
  .liqmap-seo-page>.seo-section>p,
  .liqmap-seo-page>.seo-copy p{
    margin-top:7px;
    font-size:12.5px;
    line-height:1.55;
  }
  .deriv-page .seo-grid,
  .liqmap-seo-page .seo-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin-top:10px;
  }
  .deriv-page .seo-card,
  .liqmap-seo-page .seo-card{
    min-height:0;
    padding:10px 8px;
    border:0;
    border-radius:0;
    background:transparent;
  }
  .deriv-page .seo-card h3,
  .liqmap-seo-page .seo-card h3{margin-bottom:5px;font-size:14px;line-height:1.2}
  .deriv-page .seo-card p,
  .liqmap-seo-page .seo-card p{font-size:11.5px;line-height:1.4}
  .deriv-page .seo-card .meta,
  .liqmap-seo-page .seo-card .meta{margin-top:7px;font-size:8.5px}
  .deriv-page .seo-risk,
  .liqmap-seo-page .seo-risk{
    margin:8px 12px 0;
    padding:8px 0;
    border:0;
    border-radius:0;
    font-size:10.5px;
  }
  .deriv-page>.legal-compact-note,
  .liqmap-seo-page>.legal-compact-note{
    margin:8px 0 0;
    padding:8px 12px 0;
    font-size:9.5px;
    line-height:1.45;
  }

  /* Funding / OI / live-liquidation workspace. */
  .deriv-live{
    width:100%;
    max-width:100%;
    border:0;
    border-radius:0;
    background:var(--panel);
    box-shadow:none;
  }
  .deriv-live__head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:6px 8px;
    padding:8px 10px 6px;
    border-bottom:0;
  }
  .deriv-live__head>div:first-child{max-width:none}
  .deriv-live__head h2{font-size:14px;line-height:1.2}
  .deriv-live__head p{display:none}
  .deriv-live__actions{
    align-self:center;
    justify-content:flex-end;
    gap:5px;
    margin:0;
    flex-wrap:nowrap;
  }
  .deriv-status{
    min-height:24px;
    max-width:46vw;
    padding:0 6px;
    border-color:var(--line-soft);
    border-radius:4px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:7.5px;
    line-height:1;
  }
  .deriv-status::before{width:5px;height:5px}
  .deriv-refresh{
    min-height:24px;
    padding:0 7px;
    border-radius:4px;
    font-size:7.5px;
  }
  .deriv-toolbar{
    display:block;
    padding:5px 8px 6px;
    border-bottom:0;
  }
  .deriv-control{width:100%;gap:0}
  .deriv-control>span{display:none}
  .deriv-seg{
    width:100%;
    max-width:none;
    border:0;
    border-radius:0;
    background:var(--void);
    overscroll-behavior-x:contain;
  }
  .deriv-seg button{
    min-height:29px;
    padding:0 9px;
    font-size:8px;
  }

  /* The four summary values stay readable but no longer repeat four timestamp rows. */
  .deriv-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
    border:0;
  }
  .deriv-summary>div{
    padding:7px 10px 8px;
    border:0!important;
    min-height:45px;
  }
  .deriv-summary span{font-size:7px;letter-spacing:.04em}
  .deriv-summary strong{margin-top:3px;font-size:14px;line-height:1.15}
  .deriv-summary small{display:none}

  /* Venue bars: two-up rather than one long vertical list. */
  .deriv-bars,
  .deriv-live[data-deriv-view="oi"] .deriv-bars{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px 10px;
    padding:7px 10px 9px;
    border-bottom:0;
  }
  .deriv-bar__row{gap:5px;font-size:7.5px}
  .deriv-bar__track{height:4px;margin-top:4px;border:0}

  /* Dense tables preserve all columns with controlled horizontal scrolling. */
  .deriv-table-wrap{
    max-width:100%;
    border-top:1px solid var(--line-soft);
    overflow:auto;
    scrollbar-width:thin;
    scrollbar-color:var(--line) var(--void);
  }
  .deriv-table{min-width:560px}
  .deriv-live[data-deriv-view="funding"] .deriv-table{min-width:560px}
  .deriv-live[data-deriv-view="oi"] .deriv-table{min-width:600px}
  .deriv-live[data-deriv-view="liquidations"] .deriv-table{min-width:550px}
  .deriv-table th,.deriv-table td{padding:8px 8px}
  .deriv-table th{font-size:7px;letter-spacing:.035em}
  .deriv-table td{font-size:9.5px}
  .deriv-table th:first-child,
  .deriv-table td:first-child{
    position:sticky;
    left:0;
    z-index:1;
    background:var(--panel);
  }
  .deriv-table th:first-child{z-index:3}

  /* Liquidations: keep market scroller and window controls on one compact line. */
  .deriv-live[data-deriv-view="liquidations"] .deriv-live__head{grid-template-columns:minmax(0,1fr)}
  .deriv-live[data-deriv-view="liquidations"] .deriv-live__actions{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
  .deriv-live[data-deriv-view="liquidations"] .deriv-toolbar{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:6px;
  }
  .deriv-live[data-deriv-view="liquidations"] .deriv-toolbar .deriv-control{
    min-width:0;
    width:auto;
  }
  .deriv-live[data-deriv-view="liquidations"] .deriv-toolbar .deriv-control:first-child{overflow:hidden}
  .deriv-live[data-deriv-view="liquidations"] .deriv-toolbar .deriv-control:first-child .deriv-seg{min-width:0}
  .deriv-live[data-deriv-view="liquidations"] .deriv-toolbar .deriv-control:last-child .deriv-seg{width:auto}
  .deriv-live[data-deriv-view="liquidations"] .deriv-toolbar .deriv-control:last-child .deriv-seg button{padding:0 7px}
  .deriv-live[data-deriv-view="liquidations"] .deriv-table-wrap{max-height:52dvh}
  .deriv-feed-health{
    flex-wrap:nowrap;
    justify-content:flex-start;
    gap:4px;
    width:100%;
    max-width:100%;
    padding:1px 0 2px;
    overflow-x:auto;
    scrollbar-width:none;
  }
  .deriv-feed-health::-webkit-scrollbar{display:none}
  .deriv-feed-pill{min-height:19px;padding:0 5px;font-size:7px}
  .deriv-feed-pill>i{width:5px;height:5px}

  /* Funding history: flat, single-row venue selector and shorter plot. */
  .deriv-history{
    margin-top:6px;
    padding:9px 0 0;
    border:0;
    border-radius:0;
    background:transparent;
  }
  .deriv-history__head{display:block;margin-bottom:7px;padding:0 10px}
  .deriv-history__head h3{margin-bottom:0;font-size:14px}
  .deriv-history__head p{display:none}
  .deriv-history__legend{
    flex-wrap:nowrap;
    justify-content:flex-start;
    gap:4px;
    margin-top:7px;
    padding-bottom:2px;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
  }
  .deriv-history__legend::-webkit-scrollbar{display:none}
  .deriv-history-toggle{
    flex:0 0 auto;
    min-height:23px;
    padding:3px 6px;
    border-radius:4px;
    font-size:7.5px;
  }
  .deriv-history-toggle i{width:6px;height:6px}
  .deriv-history canvas{
    height:210px;
    border:0;
    border-radius:0;
  }

  /* Liquidation heatmap: flatten card, compress metrics to three rows, preserve chart area. */
  .liqmap-seo-page .liqmap-card{
    width:100%;
    max-width:100%;
    margin:0;
    border:0;
    border-radius:0;
    box-shadow:none;
    overflow:hidden;
  }
  .liqmap-seo-page .liqmap-head{
    min-height:34px;
    padding:5px 8px;
    border-bottom:0;
    align-items:center;
    flex-wrap:nowrap;
  }
  .liqmap-seo-page .liqmap-title strong{font-size:12px}
  .liqmap-seo-page .liqmap-health{
    width:auto;
    min-width:0;
    margin-left:auto;
    flex:0 1 auto;
    font-size:9px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .liqmap-seo-page .liqmap-toolbar{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:4px;
    padding:4px 6px 5px;
    overflow:visible;
  }
  .liqmap-mobile-controls{gap:3px}
  .liqmap-mobile-select select{
    height:27px;
    border-color:rgba(154,169,190,.14);
    border-radius:3px;
    font-size:9px;
  }
  .liqmap-actions{gap:3px}
  .liqmap-actions .liqmap-icon-btn,
  .liqmap-actions .liqmap-action-btn{min-height:26px;font-size:8.5px}
  .liqmap-seo-page .liqmap-summary{
    grid-template-areas:"mark balance" "short-trigger long-trigger" "short-pool long-pool";
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:40px 48px 42px;
    min-width:0;
    overflow:hidden;
    border:0;
  }
  .liqmap-seo-page .liqmap-summary>div{
    min-width:0;
    padding:5px 7px;
    border:0!important;
    box-shadow:none!important;
  }
  .liqmap-seo-page .liqmap-summary span{font-size:7px;line-height:1.15}
  .liqmap-seo-page .liqmap-summary strong{font-size:11px;line-height:1.12}
  .liqmap-seo-page .liqmap-summary small{
    max-width:100%;
    font-size:7.5px;
    line-height:1.15;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .liqmap-seo-page .liqmap-summary-zone--pool{
    grid-template-columns:minmax(0,1fr) max-content;
    grid-template-rows:auto auto;
    gap:2px 6px;
    padding:5px 7px;
    border-top:0;
  }
  .liqmap-seo-page .liqmap-summary-zone--pool span{grid-column:1;grid-row:1}
  .liqmap-seo-page .liqmap-summary-zone--pool strong{grid-column:2;grid-row:1;font-size:10.5px}
  .liqmap-seo-page .liqmap-summary-zone--pool small{grid-column:1/-1;grid-row:2}
  .liqmap-seo-page .liqmap-validation{display:none}
  .liqmap-seo-page .liqmap-stage{
    height:clamp(310px,52dvh,430px);
    min-height:310px;
  }
  .liqmap-seo-page .liqmap-chart-meta{
    min-height:0;
    padding:4px 8px;
    border-top:0;
  }
  .liqmap-seo-page .liqmap-chart-meta>span{display:none}
  .liqmap-seo-page .liqmap-disclaimer{
    margin:0;
    padding:5px 8px 7px;
    border-top:0;
    font-size:9px;
    line-height:1.35;
  }
}

@media (max-width:430px){
  .deriv-page>.seo-hero,
  .liqmap-seo-page>.seo-hero{padding-left:10px;padding-right:10px}
  .deriv-page>.seo-section,
  .liqmap-seo-page>.seo-section{padding-left:10px;padding-right:10px}
  .deriv-live__head{padding-left:8px;padding-right:8px}
  .deriv-status{max-width:42vw}
  .deriv-summary>div{padding-left:8px;padding-right:8px}
  .deriv-bars,.deriv-live[data-deriv-view="oi"] .deriv-bars{padding-left:8px;padding-right:8px}
  .deriv-history canvas{height:195px}
  .liqmap-seo-page .liqmap-stage{height:clamp(300px,50dvh,400px);min-height:300px}
}
