/* generated by scripts/sync_prototype.py from the prototype: portal phone: markets.css. Do not edit. */
/* ============================================================
   KCM Trade — Markets on a phone (≤760px). Appended after the desktop sheet
   and before shell.css by build.py; every rule sits inside the one media
   query below. Only page-scoped selectors live here — the pill strip, the
   change chip and the panel/head base come from shell.css.

   Screen order at 390: masthead (Deposit + Accounts) · page head with the
   h1 and a 44px search · one panel holding the pill strip, a "TOP MOVERS
   OUTSIDE …" kicker and a snap strip of three 150×124 cards on the sunk
   ground (140 wide at ≤390 so the third card peeks) · the list as 64px rows
   (symbol + name left, mono price over a tinted change chip right) · a
   full-width "Show every instrument" · the sample note.

   View transitions: the pill strip and the mover strip are each named as one
   box, and the per-pill / per-card names are dropped, so a tab change
   crossfades each strip inside its own clip and fade instead of flinging a
   pill or a card over the panel padding.
   ============================================================ */
@media (max-width:760px){
  /* ---------- page head: h1 24 beside a 44px search ---------- */
  body[data-page="Markets"] .pagehead{align-items:center;flex-wrap:nowrap}
  .mkt-all{width:44px;height:44px;margin:0 -4px 0 auto;flex:none;background:#fff;border:1px solid var(--line-2);
    color:var(--ink);transition:background var(--t-quick) var(--ease)}
:where(html[data-appearance="dark"]) .mkt-all{background:#10152A}
  .mkt-all:hover{background:#fff;color:var(--ink)}
:where(html[data-appearance="dark"]) .mkt-all:hover{background:rgba(255,255,255,0.05)}
  .mkt-all:active{background:#EEF1F7}
:where(html[data-appearance="dark"]) .mkt-all:active{background:rgba(255,255,255,0.1)}

  /* ---------- the movers panel ---------- */
  /* the pill strip bleeds to the panel edge (pill style from shell). It is
     the travelling object in a tab change: one named clipped box, no named
     pill inside it, so the live pill that centerStrips scrolls into the
     middle never crosses the strip edge unclipped */
  .mtabs{margin:0 -16px 12px;padding:0 16px;scroll-padding:0 16px;view-transition-name:mtabs}
  .mtabs .mtab.is-on{view-transition-name:none}
  /* a tab with fewer than two movers has no strip: the panel ends at the
     pills, so the strip's gap goes too */
  .mtabs:last-child{margin-bottom:0}
  .mkt-kick{font-size:11px;line-height:1.2;font-weight:600;letter-spacing:.06em;text-transform:uppercase;
    color:var(--ink-4);margin:2px 0 8px}
  /* three cards you compare: a snap strip that bleeds to the panel edge,
     named as one box for the same reason as the pills (the cards carry no
     mover-SYM name on the phone; see marketsPage) */
  /* scroll-padding matches .mtabs so the snap aligns the first card to the
     16px inset (not the panel edge) and the strip sits still between tabs */
  .mcards{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x proximity;scroll-padding:0 16px;overscroll-behavior-x:contain;
    scrollbar-width:none;-webkit-overflow-scrolling:touch;margin:0 -16px 0;padding:2px 16px 4px;grid-template-columns:none;
    view-transition-name:movers;
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);
    mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
  .mcards::-webkit-scrollbar{display:none}
  /* a card on the sunk ground, no hairline: white-in-white with the same
     radius read as a box in a box */
  .mcards .mcard{flex:0 0 150px;scroll-snap-align:start;grid-template-columns:1fr;padding:12px 14px;gap:6px;
    min-height:124px;margin:0;background:var(--surface-sunk);border:0;
    transition:background var(--t-quick) var(--ease),transform var(--t-quick) var(--ease)}
  /* the card is identified by its symbol, set like the row beneath it:
     icon + SYM 15/600 ink, discs 26px */
  .mcards .mcard-s{font-size:15px;line-height:1.3;font-weight:600;color:var(--ink);letter-spacing:-.01em;gap:8px}
  .mcards .pair.is-sm{width:40px;height:28px}
  .mcards .pair.is-sm .pair-f,.mcards .pair.is-sm .pair-b{width:26px;height:26px;top:1px}
  .mcards .pair.is-sm .pair-b{left:14px}
  .mcards .pair.is-one.is-sm{width:26px}
  .mcards .spark{display:block;width:100%;height:28px}
  .mcards .mcard-p{font-size:18px;font-family:'IBM Plex Mono',ui-monospace,monospace;letter-spacing:-.02em;margin-top:4px}
  .mcards .mcard-c{margin-top:2px}
  .mcards .mcard[data-chart]:active{transform:scale(.985);background:#E9EDF5}
:where(html[data-appearance="dark"]) .mcards .mcard[data-chart]:active{background:rgba(255,255,255,0.1)}
  /* at 375 two 150px cards fill the column and the third cannot peek; 140
     leaves ~30px of it under the 28px fade, so the strip still says "more" */
  @media (max-width:390px){
    .mcards .mcard{flex-basis:140px}
  }

  /* ---------- the list: one 64px target per row ----------
     [pair][SYM 15 / name 12.2] … [price mono 15 / change chip]
     Buy lives on the chart, so the second price and the Trade button go. */
  .mtable.panel-flush{padding:2px 16px}
  .mhead{display:none}
  .mrow{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:0 12px;padding:12px 0;
    min-height:64px;align-items:center}
  .msym{grid-row:1 / span 2;grid-column:1;gap:10px}
  .msym b{font-size:15px;line-height:1.3}
  .msym b + span{display:block;font-size:12.2px;color:var(--ink-4);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mrow .mprice:nth-of-type(2){grid-column:2;grid-row:1;justify-self:end;font-family:'IBM Plex Mono',ui-monospace,monospace;
    font-size:15px;font-weight:500;letter-spacing:0}
  .mrow .mprice:nth-of-type(2)::before,.mrow .mprice:nth-of-type(3)::before{content:none}
  .mrow .mprice:nth-of-type(3){display:none}
  .mrow .mchg{display:block;grid-column:2;grid-row:2;justify-self:end;margin-top:2px}   /* chip tint from shell */
  .mrow .mtrade{display:none}
  .mrow[data-chart]:active{transform:none;background:#EEF1F7}
:where(html[data-appearance="dark"]) .mrow[data-chart]:active{background:rgba(255,255,255,0.1)}

  /* ---------- the tail ---------- */
  /* a filled blue pill above the quiet one: the two read as primary and
     secondary rather than as two of the same thing */
  .mkt-start{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:50px;
    margin-top:16px;border-radius:99px;font-size:15px;font-weight:700;letter-spacing:-.01em;color:#fff;
    background:linear-gradient(135deg,#0C1526 0%,#16305C 58%,#1E4A8A 100%);
    box-shadow:0 6px 16px rgba(22,48,92,.26);
    transition:transform var(--t-quick) var(--ease),box-shadow var(--t-quick) var(--ease)}
  .mkt-start svg{width:17px;height:17px;flex:none}
  .mkt-start:active{transform:scale(.97);box-shadow:0 3px 10px rgba(22,48,92,.22)}
  .mkt-more{width:100%;justify-content:center;min-height:44px;margin-top:14px}
  .mkt-start + .mkt-more{margin-top:10px}
  .mkt-more:active{transform:scale(.97)}

  /* ---------- touch: nothing lifts ---------- */
  @media (hover:none){
    .mcards .mcard[data-chart]:hover{transform:none;background:var(--surface-sunk);box-shadow:none}
  }

  /* ---------- reduced motion ---------- */
  @media (prefers-reduced-motion:reduce){
    .mkt-all,.mcards .mcard,.mkt-start{transition:none}
    .mcards .mcard[data-chart]:active,.mrow[data-chart]:active,.mkt-more:active,.mkt-start:active{transform:none}
    .mcards{scroll-behavior:auto}
  }
}
