/* Markets on phones, card lists (2026-11-01, every phone): fits the My stocks card list (css/aiq-phone-mscards.css,
   drawn by js/markets-phone-cards.js) into the Markets sections — no list-end padding, group headings between cards,
   icon / code / flag tiles in the logo square. Loaded with media="(max-width: 767px)", so every rule stays inside. */
@media (max-width: 767px) {
  /* no chart at the top of each dashboard on phones (user, 2026-11-01: it "does not feel on theme"; picked removing it over
     a charcoal hero card): the page opens on its cards, every row's chart is one tap away in its own card */
  html.aiq-phone .mkad-aq:not(#_), html.aiq-phone .mkad-vrow.mkad-r3:not(.mkad-ntop):not(#_) { display: none !important; }   /* the chart + its legend chips row (not the News switch, .mkad-ntop) */
  html.aiq-phone .mpc { padding: 2px 16px 6px; }
  html.aiq-phone .mpc .pc-list { padding: 0; }
  /* charcoal named under the light theme, so aiq-attio-classic.js leaves it alone */
  /* rows a notch darker than My stocks': this page is #FAFAFA, not My stocks' white, and #F4F5F7 all but vanished on it */
  html.aiq-phone[data-theme="light"] .mpc { --pc-dk: #2B2D33; --pc-row: #EFF0F3; }

  /* a group heading between cards (United States / International, Energy / Metals …): quiet, like the record look's */
  html.aiq-phone .mpc-g { display: flex; align-items: baseline; gap: 6px; padding: 10px 4px 8px; font-size: 13px; font-weight: 600; color: var(--pc-mut); }
  html.aiq-phone .mpc-g .cnt { display: none; }   /* no counts on phones (user, 2026-11-01: "simple for mobile") */
  html.aiq-phone .mpc-g:first-child { padding-top: 2px; }
  /* "Show all N" under a group's first five cards: quiet words, like the phone tables' */
  html.aiq-phone .mpc-all { display: flex; align-items: center; height: 36px; margin: -2px 0 6px; padding: 0 4px; border: 0; background: none;
    color: var(--pc-mut); font: 500 13px/1 Inter, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
  html.aiq-phone .mpc-none { padding: 24px 4px; font-size: 13px; color: var(--pc-mut); }

  /* the logo square holding a Markets tile (index code, sector icon, flag): the tile's tint fills the square, which
     stays My stocks' white so the tile reads on the charcoal card too (a bare tint vanished there) */
  html.aiq-phone .mpc .pc-lw.mpc-tile { overflow: hidden; }
  html.aiq-phone .mpc .pc-lw.mpc-tile > .ic { width: 46px !important; height: 46px !important; min-width: 0; margin: 0 !important; border-radius: 13px !important;
    display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
  html.aiq-phone .mpc .pc-lw.mpc-tile > .ic i { font-size: 21px; }
  html.aiq-phone .mpc .pc-lw.mpc-tile > .ic.code { font-size: 11px; font-weight: 700; letter-spacing: .02em; }
  html.aiq-phone .mpc .pc-lw.mpc-tile > .ic.fl { font-size: 26px; background: none; }
  html.aiq-phone .mpc .pc-open { text-decoration: none; }
  /* an index's provider / exchange logo (static/img/indices/: square tiles, some full-bleed like TMX, HKEX, MSCI) fills the square */
  html.aiq-phone .mpc .pc-lw .pc-lg.mpc-ixl { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; }
  html.aiq-phone .mpc .pc-lw:has(.mpc-ixl) { overflow: hidden; box-shadow: inset 0 0 0 1px rgba(15,17,21,.06); }
  /* a measure's history (P/E, breadth …): one neutral blue, rising isn't good or bad here */
  html.aiq-phone .mpc .pc-ln.nt { color: #6F8CFF; }
  /* the Indices section has no head on phones: its group headings open the page */
  html.aiq-phone .mkad-s.mkad-nohd { padding-top: 6px; }
  /* no logo (the /logo route answers 204): the ticker's letter, as the tables' letter tiles */
  html.aiq-phone .mpc .pc-lw[data-l]::before { content: attr(data-l); font: 600 18px/1 Inter, system-ui, sans-serif; color: #80868F; }
  /* a row with only its name: centred like the others */
  html.aiq-phone .mpc .pc-nm b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* the change period as an iOS segmented control at the top of the view (user, 2026-11-01: people "won't know what the
     time frame is"): 1 month · Year to date · 1 year; the pills under it show that period */
  /* time frames as Wealthsimple shows them (user, 2026-11-01: "Time frames should be shown like this in most scenarios"):
     short words on the page, no track, the chosen one in a white pill */
  html.aiq-phone .mk-per { display: flex; gap: 4px; margin: 2px 12px 14px; }
  html.aiq-phone .mk-per button { flex: none; height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: #80868F;
    font: 600 14px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; }
  html.aiq-phone .mk-per button.on { background: #FFFFFF; color: #101112; box-shadow: 0 1px 2px rgba(15,17,21,.06); }
  /* the Dashboards menu (☰, the way between the 14 dashboards) sat under the round search button pinned top right
     (2026-11-10): it moves in beside it */
  html.aiq-phone.ph-v2:has(body > #ph-v2-search) #ph-th > #ph-navmenu:not(#_):not(#_) { margin-right: 46px !important; translate: 0 -6px; }   /* centred on the search circle */
  /* under the Bloom bar /markets is an inner screen of the Markets tab (aiq-phone-tablehead.js gives it Back), but the pinned
     header kept only the ☰, so no ‹ showed and the tab bar was the only way out (2026-11-11): the ‹ at the left of that row,
     the large title under it as on every other inner screen */
  html.aiq-phone.ph-v2.pin-mk:not(.ph-th-root) #ph-th:not(#_):not(#_):not(#_):not(#_) { left: 0; }
  html.aiq-phone.ph-v2.pin-mk:not(.ph-th-root) #ph-th > .ph-th-b:first-child:not(#ph-navmenu):not(#_):not(#_):not(#_) { display: grid !important; place-items: center; margin-right: auto; translate: 0 -6px; }
  html.aiq-phone.ph-v2.pin-mk:not(.ph-th-root) .mk-pin-t:not(#_):not(#_):not(#_) { padding-top: calc(52px + env(safe-area-inset-top)); }
  /* News in the finance look like every other Markets list (2026-11-10): white cards on the grey page, no band behind the
     day headings, and no stray card-edge borders inside a headline row (the table rules' left/right edges outranked the
     News row's `border: 0` and drew a bar before each headline and after its time) */
  html.aiq-phone.ms-pin[data-theme] #mkad table.mkad-t:has(a.mkad-hl) > tbody > tr:not(.mkad-g):not(.ph-gap):not(.ph-all):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { background: #FFFFFF !important; border: 0 !important;
    box-shadow: inset 0 -1px 0 rgba(15,17,21,.07) !important; }   /* aiq-phone-markets.css makes every row see-through */
  html.aiq-phone.ms-pin[data-theme] #mkad table.mkad-t:has(a.mkad-hl) > tbody > tr.ph-ce:not(.ph-all):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { box-shadow: none !important; }
  html.aiq-phone.ms-pin[data-theme] #mkad table.mkad-t:has(a.mkad-hl) > tbody > tr:not(.mkad-g):not(.ph-gap) > td:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { border: 0 !important; background: none !important; overflow: visible !important; }   /* hidden clipped the last letter ("13m agc") */
  html.aiq-phone.ms-pin[data-theme] #mkad table.mkad-t:has(a.mkad-hl) > tbody > tr.mkad-g > td:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { background: transparent !important; }
}
