/* Phone (27 Oct 2026): the Easy V2 pages and the stock page re-laid for touch, from the client's Robinhood references.
   One column, flat sections split by space and hairlines (no boxed cards), list rows instead of tables, one hero number
   per screen, sheets inside the phone. Tiles on Markets are flat text too (the indices read as one summary). Everything is scoped to .tm-phone, so desktop and Pro never change.
   Both looks (Instrument, Lumen) and both themes use the same rules; Lumen-only tweaks sit at the end. */

/* ---------- Page frame ---------- */
.tm-phone .sp-wrap { container-type: inline-size; }
.tm-phone .sp-page { gap: 28px; padding: 8px 16px 32px; max-width: none; }
.tm-phone .sp-head { align-items: center; }
.tm-phone .sp-head > div:first-child { flex: 1; min-width: 0; }
.tm-phone .sp-head h1 { font-size: 28px; line-height: 34px; }
.tm-phone .sp-head p { margin-top: 4px; font-size: 14px; line-height: 20px; }
/* Flat sections: a card on the phone is a titled section, not a box (Robinhood's lists). Tiles and the Needs you
   items keep a soft fill, because they are things to notice, not lists. */
.tm-phone .sp-card, :root[data-design] .tm-phone .sp-card, :root[data-look][data-design] .tm-phone :is(.sp-card, .lm-card):not(.sp-pcard):not(.sp-cc):not(.sp-ocard) {
  background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; position: static; padding: 0; }
.tm-phone .sp-card::before, .tm-phone .sp-card::after { display: none; }
.tm-phone .sp2-card__head, .tm-phone .sp2-browse__head { padding: 0 0 6px; }
.tm-phone .sp2-card__head h3, .tm-phone .sp2-browse__head h3 { font-size: 20px; line-height: 26px; }
.tm-phone .sp2-trail { display: none; } /* the phone has its own Back */
.tm-phone .tm-table thead { display: none; } /* rows explain themselves; see the row layouts below */
.tm-phone .tm-table, .tm-phone .tm-table tbody { display: block; width: 100%; }
.tm-phone .tm-table tbody tr { display: grid; align-items: center; column-gap: 12px; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--tm-color-divider); }
.tm-phone .tm-table tbody td { display: block; height: auto; padding: 0 !important; border: 0; background: none; text-align: left; }
.tm-phone .tm-table tbody tr:last-child { border-bottom: 0; }
.tm-phone .sp2-tablewrap, .tm-phone .sp2-scroll { padding: 0; overflow: visible; border: 0; height: auto; }

/* Back on pushed screens (stock page, Your stocks, Account, an order) */
.lab-ph-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: 0 0 0 6px; padding: 0 10px 0 4px; border: 0; background: none; color: var(--tm-color-text-secondary); font: var(--tm-font-weight-medium) 15px/20px var(--tm-font-ui); cursor: pointer; border-radius: 12px; }
.lab-ph-back:hover { color: var(--tm-color-text); }
.lab-ph-back:focus-visible { outline: 2px solid var(--tm-color-focus); outline-offset: -2px; }
.lab-ph-avatar { border: 0; cursor: pointer; font: inherit; }

/* ---------- Home: number, chart, then what needs you, your stocks, what's next, news ---------- */
.tm-phone .sp3-hero { display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: 0; }
.tm-phone .sp3-hero__num { display: contents; }
.tm-phone .sp3-hero__num .tm-price--display { font-size: 44px; line-height: 50px; }
.tm-phone .sp3-k { margin: 0; }
.tm-phone .sp3-today { margin: 0; font-size: 14px; }
.tm-phone .sp3-hero__chart { order: 5; height: 190px; margin: 10px -16px 0; }
.tm-phone .sp3-ranges { order: 6; margin-top: 4px; }
.tm-phone .sp3-ranges .tm-tabs { width: 100%; }
.tm-phone .sp3-ranges .tm-tabs button { flex: 1; }
.tm-phone .sp3-note { order: 7; margin: 6px 0 0; font-size: 12.5px; }
.tm-phone .sp3-cols, .tm-phone .sp3-main, .tm-phone .sp3-side { display: contents; }
.tm-phone .sp3-needs { order: 1; }
.tm-phone .m-ttabs { order: 2; }
.tm-phone :is(.sp3-stocks, .sp3-next, .sp3-news) { order: 3; }
.tm-phone .sp3-hero { order: 0; }
.tm-phone .sp3-cap { margin: 0 0 4px; font-size: 13px; }
.tm-phone .sp3-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 0; border: 0; }
/* Your stocks rows: code and value, then the name and today's change (Home) or the gain (Your stocks page). */
.tm-phone .sp3-table tbody tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto; }
.tm-phone .sp3-table tbody tr > td:nth-child(1) { grid-area: 1 / 1 / 3 / 2; }
.tm-phone .sp3-table tbody tr > td:nth-child(2) { display: none; }
.tm-phone .sp3-table tbody tr > td:nth-child(3) { grid-area: 1 / 2; text-align: right; font: var(--tm-font-weight-medium) 15px/20px var(--tm-font-ui); font-variant-numeric: tabular-nums; }
.tm-phone .sp3-table tbody tr > td:nth-child(3) .sp2-sub { display: none; }
.tm-phone .sp3-table tbody tr > td:nth-child(4) { display: none; }
.tm-phone .sp3-table tbody tr > td:nth-child(5) { grid-area: 2 / 2; text-align: right; width: auto; }
.tm-phone .sp3-table .sp2-today .sp3-spark { display: none; }
.tm-phone .sp3-holdings .sp3-table tbody tr > td:nth-child(4) { display: block; grid-area: 2 / 2; text-align: right; font-size: 13.5px; }
.tm-phone .sp3-holdings .sp3-table tbody tr > td:nth-child(4) .sp2-sub { display: inline; margin-left: 4px; }
.tm-phone .sp3-holdings .sp3-table tbody tr > td:nth-child(5) { display: none; }
.tm-phone .sp3-holdings .sp3-grp { display: flex !important; justify-content: space-between; min-height: 0; padding: 18px 0 6px; }
.tm-phone .sp3-holdings .sp3-grp > :nth-child(n+3) { display: none; }
.tm-phone .sp2-stock { display: grid; gap: 2px; min-width: 0; }
.tm-phone .sp2-stock > b { font: var(--tm-font-weight-semibold) 15px/20px var(--tm-font-ui); }
.tm-phone .sp2-stock > .tm-secondary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.tm-phone .sp3-need__list { gap: 10px; }
.tm-phone .sp3-need__acts { flex-wrap: wrap; }
.tm-phone .sp3-news ul { margin: 0; padding: 0; }
.tm-phone .sp3-news li button { padding-inline: 0; }
.tm-phone .sp3-prog__row { padding-inline: 0; }
.tm-phone .sp3-grp-l { margin: 10px 0 2px; }
.tm-phone .sp3-next ul, .tm-phone .sp3-ev, .tm-phone .sp3-need__list { padding: 0; }
.tm-phone .sp3-ev li { padding-inline: 0; }
.tm-phone .sp3-need__list > li { margin: 0; }

/* Your stocks page */
.tm-phone .sp3-alloc { padding: 0; }
.tm-phone .sp3-bar, .tm-phone .sp2-browse__bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 0 0 8px; }
.tm-phone .sp2-browse__bar > .tm-input, .tm-phone .sp2-browse__q { grid-column: 1 / -1; max-width: none; width: auto; height: 44px; }
.tm-phone .sp2-browse__bar .tm-input, .tm-phone .sp2-browse__bar .tm-select select { height: 44px; min-height: 44px; }
.tm-phone .sp2-browse__count:empty, .tm-phone .sp2-browse__note:empty { display: none; }
.tm-phone .sp3-grp-sw { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; min-height: 44px; order: 5; }
.tm-phone .sp2-browse { height: auto; overflow: visible; }

/* ---------- Markets: a short summary, then one list ---------- */
.tm-phone .sp2-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.tm-phone .sp2-tile { gap: 2px; }
.tm-phone .sp2-tile:nth-child(3) { grid-column: 1 / -1; }
.tm-phone .sp2-tile__v { font-size: 20px; line-height: 26px; }
.tm-phone .sp2-tile__note, .tm-phone .sp2-tile__spark { display: none; }
.tm-phone .sp2-tile .tm-change { font-size: 13px; }
.tm-phone .sp2-mk { display: block; }
.tm-phone .sp2-sectors { display: none; }
.tm-phone .sp2-browse__head { display: flex; align-items: baseline; gap: 10px; }
.tm-phone .sp2-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 12px; scroll-padding-inline: 16px; }
.tm-phone .sp2-cats .tm-filter { min-height: 36px; }
/* Stock rows: code with class and name on the left, price and change on the right, the star last (44px target). */
.tm-phone .sp2-stocks tbody tr { grid-template-columns: minmax(0, 1fr) auto 44px; }
.tm-phone .sp2-stocks tbody tr > td:nth-child(1) { grid-area: 1 / 3 / 3 / 4; justify-self: end; }
.tm-phone .sp2-stocks tbody tr > td:nth-child(2) { grid-area: 1 / 1 / 3 / 2; }
.tm-phone .sp2-stocks tbody tr > td:nth-child(3) { grid-area: 1 / 2; text-align: right; font: var(--tm-font-weight-medium) 15px/20px var(--tm-font-ui); font-variant-numeric: tabular-nums; }
.tm-phone .sp2-stocks tbody tr > td:nth-child(4) { grid-area: 2 / 2; text-align: right; font-size: 13.5px; }
.tm-phone .sp2-stocks tbody tr > td:nth-child(n+5) { display: none; }
.tm-phone .sp2-stocks .sp2-star { width: 44px; height: 44px; }
.tm-phone .sp2-stock .sp2-own { display: none; } /* the You own view and the star carry it; the row stays two lines */
.tm-phone .sp2-empty { padding: 24px 0 !important; text-align: center !important; }

/* ---------- Orders: the list fills the screen; an order opens as its own screen ---------- */
.tm-phone .sp2-otop { flex-wrap: wrap; gap: 6px 16px; }
.tm-phone .sp2-otop__sum { flex-basis: 100%; margin: 0; }
.tm-phone .sp2-ord { display: block; height: auto; }
.tm-phone .sp2-olist, .tm-phone .sp2-oscroll { overflow: visible; padding: 0; border: 0; }
.tm-phone .sp2-obar { padding: 0 0 4px; }
.tm-phone .sp2-ogroup h4 { padding-inline: 0; }
.tm-phone .sp2-ogroup h4, :root[data-design] .tm-phone .sp2-ogroup h4, :root[data-look][data-design] .tm-phone .sp2-ogroup h4 { background: var(--tm-color-bg); }
/* Order rows: side and code with the status on the first line; terms, the reason and progress below, full width. */
.tm-phone .sp2-orow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; min-height: 64px; padding: 10px 4px; border-radius: 14px; }
.tm-phone .sp2-orow__main { display: contents; }
.tm-phone .sp2-orow__main > b { grid-area: 1 / 1; font-size: 15px; }
.tm-phone .sp2-orow > .tm-status { grid-area: 1 / 2; }
.tm-phone .sp2-orow__main > .tm-secondary { grid-column: 1 / -1; font-size: 13.5px; }
.tm-phone .sp2-orow__why { grid-column: 1 / -1; margin-top: 2px; }
.tm-phone .sp2-orow > .sp2-oprog { grid-column: 1 / -1; margin-top: 6px; }
.tm-phone .sp2-ord:not(.is-detail) .sp2-orow.is-sel { background: none; box-shadow: none; }
.tm-phone .sp2-odetail { display: none; padding: 0; overflow: visible; }
.tm-phone .sp2-ord.is-detail .sp2-olist { display: none; }
.tm-phone .sp2-ord.is-detail .sp2-odetail { display: block; }
.tm-phone .sp2-orders2.is-detail > .sp-head, .tm-phone .sp2-orders2.is-detail > .sp2-otop { display: none; }
.tm-phone .sp2-od__back { margin: -4px 0 6px -10px; }
.tm-phone .sp2-od__head { gap: 12px; }
.tm-phone .sp2-od__head h2 { font-size: 22px; line-height: 28px; }
.tm-phone .sp2-odetail .sp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tm-phone .sp2-odetail .sp-actions .tm-btn { min-height: 48px; }
.tm-phone .sp2-od__terms { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.tm-phone .sp2-od__terms > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tm-phone .sp2-od__terms dd { text-align: right; }

/* ---------- Funds: cash first, two buttons, the facts as rows; Add funds and Withdraw as sheets ---------- */
.tm-phone .sp2-cashcard { gap: 16px; }
.tm-phone .sp2-cashcard__top { display: grid; gap: 16px; }
.tm-phone .sp2-cashcard .tm-price--display { font-size: 40px; line-height: 46px; }
.tm-phone .sp2-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tm-phone .sp2-actions .tm-btn { min-height: 48px; justify-content: center; }
.tm-phone .sp2-cashfacts { grid-template-columns: minmax(0, 1fr); border-top: 0; }
.tm-phone .sp2-cashfacts > div, .tm-phone .sp2-cashfacts > div:first-child, .tm-phone .sp2-cashfacts > div:last-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 12px 0; border: 0; border-top: 1px solid var(--tm-color-divider); }
.tm-phone .sp2-cashfacts dt { margin: 0; font-size: 15px; color: var(--tm-color-text); }
.tm-phone .sp2-cashfacts dd { grid-column: 2; grid-row: 1; text-align: right; font-size: 15px; }
.tm-phone .sp2-cashfacts dd.tm-secondary { grid-column: 1 / -1; grid-row: 2; text-align: left; margin-top: 2px; }
.tm-phone .sp-stmt .sp-card-head { flex-wrap: wrap; padding: 0; }
.tm-phone .sp-stmt .sp-card-head .tm-btn { margin-left: 0; }
.tm-phone .sp-stmt__wrap { overflow: visible; }
.tm-phone .sp-stmt tbody tr { grid-template-columns: minmax(0, 1fr) auto; }
.tm-phone .sp-stmt tbody tr > td:nth-child(1) { grid-area: 2 / 1; font-size: 13px; color: var(--tm-color-text-secondary); }
.tm-phone .sp-stmt tbody tr > td:nth-child(2) { grid-area: 1 / 1; font-size: 15px; }
.tm-phone .sp-stmt tbody tr > td:nth-child(3) { display: none; }
.tm-phone .sp-stmt tbody tr > td:nth-child(4) { grid-area: 1 / 2 / 3 / 3; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.tm-phone .sp2-help { font-size: 13px; }
/* The sheets stay inside the phone: the page and its sections are static, so the phone frame is their box. */
.tm-phone .sp2-funds, .tm-phone .sp-wrap, .tm-phone .sp-page { position: static; }
.tm-phone .sp4-dlg[open]:not(:modal) { position: absolute; inset: auto 0 0 0; z-index: 40; width: auto; max-width: none; max-height: 88%; margin: 0; padding: 20px 16px 28px; border-radius: 28px 28px 0 0; border-width: 1px 0 0; overflow-y: auto; box-shadow: 0 -12px 40px rgb(0 0 0 / 0.35); animation: lab-ph-up 220ms var(--tm-motion-easing-standard, ease-out); }
@keyframes lab-ph-up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tm-phone .sp4-dlg[open] { animation: none; } }
.tm-phone .sp4-add__head { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; }
.tm-phone .sp4-add__head > div { flex: 1; min-width: 0; }
.tm-phone .sp4-add__end { display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 8px; margin: -6px -6px 0 0; }
.tm-phone .sp4-dlg[open]::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--tm-color-divider-strong, var(--tm-color-divider)); } /* grab handle */
.tm-phone :is(.sp4-c__or, .sp4-c__qr) { display: none; } /* scanning needs a second screen; on the phone the copy buttons do the job */
.tm-phone .sp4-dlg .sp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tm-phone .sp4-dlg .sp-actions .tm-btn { min-height: 48px; }
.tm-phone .sp2-scrim { display: none; }
.tm-phone .has-sheet .sp2-scrim { display: block; position: absolute; inset: 0; z-index: 39; background: rgb(5 7 10 / 0.55); }

/* ---------- Stock page ---------- */
.lab-ph--stock .lab-ph-head { padding-top: 0; }
.lab-ph--stock .tm-phone__section + .tm-phone__section { border-top: 0; }
.lab-ph--stock .tm-phone__section { padding-block: 12px; }
.lab-ph--stock .tm-shead__name > :not(.tm-shead__company) { display: none; } /* sector lives in Statistics */
.lab-ph--stock .tm-shead__actions { gap: 4px; }
.lab-ph--stock .tm-shead__actions .tm-icon-btn { width: 44px; height: 44px; }
.lab-ph--stock .tm-shead:not(.tm-shead--pro) .tm-shead__stats { margin-top: 6px; padding-top: 0; border-top: 0; }
.lab-ph-chart { padding-inline: 0 !important; }
.tm-phone :is(.lab-ph-chart, .sp3-hero__chart) .tm-lchart line.grid, .tm-phone .sp3-hero__chart line.grid { display: none; }
.lab-ph-chart .tm-lchart > .tm-tabs { margin: 8px 16px 0; }
.lab-ph-chart .tm-lchart > .tm-tabs button { flex: 1; }
.lab-ph-chart .tm-lchart__readout { padding-inline: 16px; }
.lab-ph-block { display: grid; gap: 10px; padding: 0 0 18px; }
.lab-ph-block + .lab-ph-block { padding-top: 18px; border-top: 1px solid var(--tm-color-divider); }
.lab-ph-block .tm-subtitle { margin: 0; font-size: 20px; line-height: 26px; }
.lab-ph-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; margin: 0; }
.lab-ph-grid > div { display: grid; gap: 2px; align-content: start; min-width: 0; }
.lab-ph-grid dt { font-size: 13px; line-height: 18px; color: var(--tm-color-text-secondary); }
.lab-ph-grid dd { margin: 0; font: var(--tm-font-weight-medium) 15px/20px var(--tm-font-ui); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lab-ph--stock .lab-qread { margin-top: 4px; }
/* One Trade button on a solid bar (no gradient over the content), above the tab bar. */
.lab-ph-trade { position: sticky; bottom: 0; z-index: 5; padding: 18px 16px 12px; background: linear-gradient(to top, var(--tm-color-bg) 55%, transparent); border-top: 0; }
.lab-ph-trade .tm-btn { min-height: 52px; box-shadow: none; }

/* Ticket sheet: review, then the order's first steps */
.lab-ph-edit { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-bottom: 4px; }
.lab-ph-sent { display: grid; gap: 14px; padding-top: 4px; }
.lab-ph-sent__lead { margin: 0; font: var(--tm-font-weight-semibold) 22px/28px var(--tm-font-ui); }
.lab-ph-sent > .tm-secondary { margin: 0; font-size: 15px; line-height: 22px; }
.lab-ph-sent__acts { display: grid; gap: 10px; margin-top: 8px; }

/* ---------- Lists with a subtitle (Account, open orders on the stock page) ---------- */
.lab-ph-list { margin: 0; padding: 0; list-style: none; }
.lab-ph-list li + li { border-top: 1px solid var(--tm-color-divider); }
.lab-ph-list button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lab-ph-list button > span:not(.lab-ph-list__ic):not(.tm-status) { display: grid; gap: 2px; min-width: 0; }
.lab-ph-list b { font: var(--tm-font-weight-medium) 15px/20px var(--tm-font-ui); }
.lab-ph-list .tm-secondary { font-size: 13.5px; line-height: 18px; }
.lab-ph-list > li > button > .tm-icon:last-child { color: var(--tm-color-text-secondary); }
.lab-ph-list button:focus-visible { outline: 2px solid var(--tm-color-focus); outline-offset: -2px; border-radius: 12px; }
.lab-ph-list__ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tm-color-raised); color: var(--tm-color-text-secondary); }
.lab-ph-list--tight button { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 56px; }
.lab-ph-acct { display: grid; gap: 20px; padding: 4px 16px 32px; }
.lab-ph-acct__who { display: flex; align-items: center; gap: 14px; }
.lab-ph-acct__who h1 { margin: 0; font: var(--tm-font-weight-semibold) 24px/30px var(--tm-font-ui); }
.lab-ph-acct__who p { margin: 2px 0 0; font-size: 14px; }
.lab-ph-acct .tm-btn { justify-content: center; gap: 8px; }

/* ---------- Native mobile language (27 Oct 2026, the user: "make the mobile UIs more mobile UI approach") ----------
   The phone stops looking like the web components it is built from: a docked tab bar (no floating pill), iOS-style
   segmented controls, text range chips under charts, filled search bars, filter chips instead of dropdown fields,
   grouped inset lists for facts and settings, full-width pill buttons, a big quantity in the ticket, and press feedback
   instead of hover. The doubled :root outranks both looks' rules without !important. */
.tm-phone { --m-fill: color-mix(in srgb, var(--tm-color-text) 7%, transparent); --m-group: color-mix(in srgb, var(--tm-color-text) 5%, var(--tm-color-bg)); --m-press: color-mix(in srgb, var(--tm-color-text) 9%, transparent); }

/* Tab bar: docked to the bottom edge, icons and labels, the current tab in the selection colour. */
:root:root[data-design][data-theme] .tm-phone .tm-tabbar { position: relative; inset: auto; z-index: 6; margin: 0; padding: 6px 0 22px; border: 0; border-top: 1px solid var(--tm-color-divider); border-radius: 0;
  background: color-mix(in srgb, var(--tm-color-panel) 90%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); box-shadow: none; }
:root:root[data-design][data-theme] .tm-phone .tm-tabbar > .tm-nav-pill { display: none; }
:root:root[data-design][data-theme] .tm-phone .tm-tabbar button { gap: 3px; padding: 4px 2px; border-radius: 0; background: none; box-shadow: none; color: var(--tm-color-text-secondary); font: var(--tm-font-weight-medium) 11px/14px var(--tm-font-ui); -webkit-tap-highlight-color: transparent; }
:root:root[data-design][data-theme] .tm-phone .tm-tabbar button[aria-current="page"], :root:root[data-design][data-theme] .tm-phone .tm-tabbar button[aria-current="page"] .tm-icon { color: var(--tm-color-primary-text); background: none; filter: none; }
:root:root[data-design][data-theme] .tm-phone .tm-tabbar button:active { opacity: 0.55; }
:root:root[data-design][data-theme] .tm-phone .tm-phone__trade { padding-bottom: 12px; }

/* Large titles, tinted Back (iOS) */
.tm-phone .sp-head h1 { font-size: 32px; line-height: 38px; letter-spacing: -0.02em; }
.lab-ph-back { color: var(--tm-color-primary-text); font-size: 16px; }
.lab-ph-back:hover { color: var(--tm-color-primary-text); opacity: 0.8; }

/* Segmented controls: a quiet track and a raised thumb, no borders or inner shadows. Buy and Sell keep their colours. */
:root:root[data-design][data-theme] .tm-phone :is(.tm-seg, .tm-tabs--contained, .tm-tabs--underline) { display: flex; padding: 2px; gap: 0; border: 0; border-radius: 10px; background: var(--m-fill); box-shadow: none; }
:root:root[data-design][data-theme] .tm-phone :is(.tm-seg, .tm-tabs--contained, .tm-tabs--underline) button { flex: 1; min-height: 32px; padding: 4px 10px; border: 0; border-radius: 8px; background: none; box-shadow: none; color: var(--tm-color-text-secondary); font: var(--tm-font-weight-medium) 13.5px/18px var(--tm-font-ui); }
:root:root[data-design][data-theme] .tm-phone :is(.tm-seg button[aria-pressed="true"], .tm-tabs--contained button[aria-selected="true"], .tm-tabs--underline button[aria-selected="true"]),
:root:root[data-design][data-theme] .tm-phone :is(.tm-seg, .tm-tabs--contained, .tm-tabs--underline) .lk-bubble { background: var(--tm-color-raised); color: var(--tm-color-text); border: 0; border-radius: 8px; box-shadow: 0 1px 3px rgb(0 0 0 / 0.18), 0 0 0 0.5px rgb(0 0 0 / 0.06); }
:root:root[data-design][data-theme] .tm-phone .tm-tabs--underline button::after { display: none; }
:root:root[data-design][data-theme] .tm-phone .tm-seg--side { padding: 3px; border-radius: 14px; }
:root:root[data-design][data-theme] .tm-phone .tm-seg--side button { min-height: 44px; border-radius: 11px; font-size: 15px; font-weight: var(--tm-font-weight-semibold); }
:root:root[data-design][data-theme] .tm-phone .tm-seg--side button[aria-pressed="true"][data-side="buy"] { background: var(--lk-buy, var(--tm-color-up)); color: #fff; box-shadow: none; }
:root:root[data-design][data-theme] .tm-phone .tm-seg--side button[aria-pressed="true"][data-side="sell"] { background: var(--lk-sell, var(--tm-color-down)); color: #fff; box-shadow: none; }
:root:root[data-design][data-theme] .tm-phone .tm-seg--side .lk-bubble { display: none; }
.tm-phone .sp2-otop > .tm-tabs { flex: 1 1 100%; }

/* Range chips under a chart: plain text, the chosen range in a small filled pill (Robinhood). */
:root:root[data-design][data-theme] .tm-phone :is(.tm-lchart > .tm-tabs, .sp3-ranges .tm-tabs) { padding: 0; background: none; border-radius: 0; justify-content: space-between; }
:root:root[data-design][data-theme] .tm-phone :is(.tm-lchart > .tm-tabs, .sp3-ranges .tm-tabs) button { flex: 0 1 auto; min-width: 44px; min-height: 32px; padding: 4px 10px; border-radius: 999px; font-weight: var(--tm-font-weight-semibold); font-size: 13px; }
:root:root[data-design][data-theme] .tm-phone :is(.tm-lchart > .tm-tabs, .sp3-ranges .tm-tabs) button[aria-selected="true"] { background: var(--m-fill); box-shadow: none; }
:root:root[data-design][data-theme] .tm-phone :is(.tm-lchart > .tm-tabs, .sp3-ranges .tm-tabs) .lk-bubble { display: none; }
:root:root[data-design][data-theme] .tm-phone :is(.tm-lchart > .tm-tabs, .sp3-ranges .tm-tabs) button:disabled { opacity: 0.35; }

/* Search bars: filled, no border (iOS search field). Dropdown fields in a list bar become chips. */
:root:root[data-design][data-theme] .tm-phone .sp2-browse__bar { display: flex; flex-wrap: wrap; gap: 8px; }
:root:root[data-design][data-theme] .tm-phone .sp2-browse__q { flex: 1 1 100%; height: 40px; border: 0; border-radius: 12px; background: var(--m-fill); box-shadow: none; }
:root:root[data-design][data-theme] .tm-phone .sp2-browse__q .tm-input__control { font-size: 16px; } /* 16px stops iOS zooming into the field */
:root:root[data-design][data-theme] .tm-phone .sp2-browse__bar .tm-select { flex: 0 0 auto; }
:root:root[data-design][data-theme] .tm-phone .sp2-browse__bar .tm-select select { height: 34px; min-height: 34px; padding: 0 30px 0 14px; border: 0; border-radius: 999px; background: var(--m-fill); box-shadow: none; font: var(--tm-font-weight-medium) 14px/18px var(--tm-font-ui); color: var(--tm-color-text); }
:root:root[data-design][data-theme] .tm-phone .sp2-browse__bar .tm-select > .tm-icon { right: 10px; }
.tm-phone .sp3-grp-sw { flex: 1 1 100%; }
/* Filter chips: soft fill; the chosen one inverts (dark on light, light on dark). */
:root:root[data-design][data-theme] .tm-phone .tm-filter { min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--m-fill); box-shadow: none; color: var(--tm-color-text); font: var(--tm-font-weight-medium) 14px/18px var(--tm-font-ui); }
:root:root[data-design][data-theme] .tm-phone .tm-filter[aria-pressed="true"] { background: var(--tm-color-text); color: var(--tm-color-bg); }
:root:root[data-design][data-theme] .tm-phone .tm-filter[aria-pressed="true"] .sp2-cnt { color: inherit; opacity: 0.7; }

/* Buttons: pills, flat fills, no glow; small ones still 40px tall for the thumb. */
:root:root[data-design][data-theme] .tm-phone .tm-btn { border-radius: 999px; box-shadow: none; }
:root:root[data-design][data-theme] .tm-phone .tm-btn--sm { min-height: 40px; padding-inline: 16px; font-size: 14px; }
:root:root[data-design][data-theme] .tm-phone .tm-btn--lg { min-height: 52px; font-size: 16px; }
:root:root[data-design][data-theme] .tm-phone .tm-btn--secondary { border: 0; background: var(--m-fill); }
:root:root[data-design][data-theme] .tm-phone .tm-btn--ghost { color: var(--tm-color-primary-text); }
:root:root[data-design][data-theme] .tm-phone .tm-btn:active { transform: scale(0.98); }

/* Press feedback on rows, never a hover tint */
:root:root[data-design][data-theme] .tm-phone :is(.tm-table tbody tr:hover td, .tm-table tbody tr:hover) { background: none; }
.tm-phone :is(.tm-table tbody tr, .lab-ph-list button, .sp2-orow, .sp3-news li button, .sp3-prog__row) { -webkit-tap-highlight-color: transparent; transition: background-color 120ms; }
.tm-phone :is(.tm-table tbody tr, .sp2-orow, .sp3-news li button, .sp3-prog__row):active { background: var(--m-press); }
.tm-phone .tm-table tbody tr { margin-inline: -16px; padding-inline: 16px; }

/* Needs you: a tinted card, icon inline, the two actions side by side at full width. The sample-data tag is a caption. */
:root:root[data-design][data-theme] .tm-phone .sp3-need { padding: 14px; border: 0; border-radius: 16px; }
:root:root[data-design][data-theme] .tm-phone .sp3-need__ic { width: auto; height: auto; background: none; box-shadow: none; }
.tm-phone .sp3-need__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
:root:root[data-design][data-theme] .tm-phone .sp3-tag { padding: 0; border: 0; background: none; color: var(--tm-color-warning); font-size: 12.5px; }
.tm-phone .sp3-tag::after { content: " · "; color: var(--tm-color-text-secondary); }
.tm-phone .sp3-note { display: block; }

/* Grouped inset lists (iOS Settings): facts and settings sit in one rounded group with inset dividers. */
.tm-phone .sp2-cashfacts, .lab-ph-acct .lab-ph-list { padding: 0 16px; border-radius: 16px; background: var(--m-group); }
.tm-phone .sp2-cashfacts > div:first-child, .lab-ph-acct .lab-ph-list li:first-child { border-top: 0 !important; }
.lab-ph-acct .lab-ph-list button { min-height: 60px; }
:root:root[data-design][data-theme] .tm-phone :is(.sp2-od__now, .sp2-od__grp) { padding: 14px 16px; border: 0; border-radius: 16px; background: var(--m-group); box-shadow: none; }

/* Ticket sheet: rounded top, a big quantity to type into, round price steps, roomy rows. */
:root:root[data-design][data-theme] .tm-phone .tm-sheet { border-radius: 28px 28px 0 0; }
:root:root[data-design][data-theme] .tm-phone .tm-ticket .tm-amount .tm-input, :root:root[data-design][data-theme] .tm-phone .tm-ticket [data-role="qty"] { min-height: 64px; }
:root:root[data-design][data-theme] .tm-phone .tm-ticket :is(.tm-amount input, [data-role="qty"]) { font: var(--tm-font-weight-semibold) 30px/36px var(--tm-font-ui); font-variant-numeric: tabular-nums; }
:root:root[data-design][data-theme] .tm-phone .tm-ticket .tm-input { border-radius: 14px; }
:root:root[data-design][data-theme] .tm-phone .tm-stepper .tm-input { min-height: 52px; }
:root:root[data-design][data-theme] .tm-phone .tm-stepper__btn { width: 52px; }
:root:root[data-design][data-theme] .tm-phone .tm-ticket input { font-size: max(16px, 1em); }
:root:root[data-design][data-theme] .tm-phone .tm-dropdown__trigger { min-height: 48px; border-radius: 14px; }

/* ---------- Lumen on the phone ---------- */
/* The phone keeps Lumen's near-black and lit accents, but the sections stay flat (no glass card per section). */
:root[data-look="lumen"] .tm-phone .lab-ph-trade { -webkit-backdrop-filter: none; backdrop-filter: none; }
:root:root[data-design][data-theme] .tm-phone .sp3-need { grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 10px; }
:root:root[data-design][data-theme] .tm-phone .sp3-need__ic { align-self: start; margin-top: 1px; }
:root:root[data-design][data-theme] .tm-phone .tm-phone__main { padding-bottom: 0; } /* the tab bar is docked now, nothing floats over the content */
/* Fields: filled, borderless (mobile form fields); focus shows the selection colour as a ring. */
:root:root[data-design][data-theme] .tm-phone :is(.tm-input, .tm-dropdown__trigger, .tm-select select) { border-color: transparent; background: var(--m-fill); box-shadow: none; }
:root:root[data-design][data-theme] .tm-phone :is(.tm-input:focus-within, .tm-dropdown__trigger:focus-visible, .tm-select select:focus-visible) { outline: 2px solid var(--tm-color-focus); outline-offset: 0; }
:root:root[data-design][data-theme] .tm-phone .tm-stepper__btn { background: none; border: 0; box-shadow: none; }

/* ---------- Mobile v2 (27 Oct 2026, from the user's Revolut, Base and Public picks) ----------
   Round icon buttons and pill groups, round marks on stock rows, quick actions and text tabs on Home, rounded grouped
   cards for facts, stat pills under the price, a floating Trade pill and a keypad order entry. Light and dark both come
   from the colour roles (--m-fill, --m-group are mixes of text on the page colour). */
.tm-phone .tm-phone__header .lab-ph-avatar { order: -1; }
.tm-phone .tm-phone__header .tm-mkt { margin-right: auto; }
.m-circle { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--m-fill); color: var(--tm-color-text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.m-circle--lg { width: 52px; height: 52px; }
.m-circle:active, .m-pill button:active, .m-acts button:active, .m-chip:active { background: var(--m-press); }
.m-circle:focus-visible, .m-pill button:focus-visible, .m-acts button:focus-visible, .m-chip:focus-visible, .m-keys button:focus-visible, .m-ttabs button:focus-visible { outline: 2px solid var(--tm-color-focus); outline-offset: 2px; }
.m-pill { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--m-fill); }
.m-pill button { display: grid; place-items: center; width: 40px; height: 36px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--tm-color-text); cursor: pointer; }
.m-pill [data-m-star][aria-pressed="true"] { color: var(--tm-color-warning); }
.m-pill [data-m-star][aria-pressed="true"] svg * { fill: currentColor; }
.m-mono { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--m-fill); color: var(--tm-color-text); font: var(--tm-font-weight-semibold) 13px/1 var(--tm-font-ui); letter-spacing: 0.01em; }
.tm-phone td.m-hasmono { display: flex !important; align-items: center; gap: 12px; min-width: 0; }
.tm-phone td.m-hasmono > .sp2-stock { flex: 1; }

/* Home: quick actions (Base) and text tabs (Base) */
.m-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; order: 0; }
.m-acts button { display: grid; justify-items: center; gap: 6px; min-height: 72px; padding: 12px 4px 10px; border: 0; border-radius: 18px; background: var(--m-fill); color: var(--tm-color-text); font: var(--tm-font-weight-medium) 12.5px/16px var(--tm-font-ui); cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Home tabs (27 Oct 2026, the user's Public reference): 16px labels, the chosen one dark with a short dark
   underline, a hairline under the row; sticky under the header while the lists scroll. */
.m-ttabs { position: sticky; top: 0; z-index: 4; display: flex; gap: 24px; margin: 0 -16px -14px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; background: var(--m-end, var(--tm-color-bg)); box-shadow: inset 0 -1px 0 var(--tm-color-divider); }
.m-ttabs button { position: relative; flex: none; padding: 12px 0 11px; border: 0; background: none; color: var(--tm-color-text-secondary); font: var(--tm-font-weight-semibold) 16px/22px var(--tm-font-ui); letter-spacing: -0.005em; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.m-ttabs button[aria-selected="true"] { color: var(--tm-color-text); }
.m-ttabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--tm-color-text); }
.m-ttabs button:focus-visible { outline: 2px solid var(--tm-color-focus); outline-offset: -2px; border-radius: 6px; }
.tm-phone .sp-page > [hidden] { display: none !important; }
.tm-phone .sp3-home :is(.sp3-stocks, .sp3-next, .sp3-news) .sp2-card__head h3 { display: none; }
.tm-phone .sp3-home :is(.sp3-next, .sp3-news) > .sp2-card__head { display: none; }
.tm-phone .sp3-home .sp3-stocks > .sp2-card__head { padding-bottom: 2px; }

/* Stock page: top bar with Back and the icon pill; the code and price slide in once the big price scrolls away (Public). */
.m-topbar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 10px; padding: 4px 16px 8px; background: var(--tm-color-bg); }
.m-topbar__t { flex: 1; display: grid; justify-items: center; min-width: 0; opacity: 0; transform: translateY(6px); transition: opacity 160ms, transform 160ms; }
.m-topbar.is-compact .m-topbar__t { opacity: 1; transform: none; }
.m-topbar__t b { font: var(--tm-font-weight-semibold) 15px/20px var(--tm-font-ui); }
.m-topbar__t span { font-size: 12.5px; line-height: 16px; color: var(--tm-color-text-secondary); }
@media (prefers-reduced-motion: reduce) { .m-topbar__t { transition: none; } }
.lab-ph--stock .tm-shead__actions { display: none; } /* star and bell live in the top bar */
.lab-ph--stock .tm-shead__code { font-size: 15px; line-height: 20px; }
.lab-ph--stock .tm-shead__company { font-size: 14px; color: var(--tm-color-text-secondary); }
.lab-ph--stock .tm-shead__price .tm-price--display { font-size: 44px; line-height: 50px; letter-spacing: -0.02em; }
/* Stat pills under the change (Base) */
.lab-ph--stock .tm-shead:not(.tm-shead--pro) .tm-shead__stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lab-ph--stock .tm-shead__stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--m-fill); }
.lab-ph--stock .tm-shead__stat dt, .lab-ph--stock .tm-shead__stat dt button { font-size: 13px; color: var(--tm-color-text-secondary); }
.lab-ph--stock .tm-shead__stat dd { margin: 0; font: var(--tm-font-weight-semibold) 13px/18px var(--tm-font-ui); font-variant-numeric: tabular-nums; }
/* Rounded grouped cards (Revolut) */
.m-card { padding: 2px 16px; border-radius: 18px; background: var(--m-group); }
.m-card > .lab-ph-grid { padding: 14px 0; }
.m-rows { margin: 0; }
.m-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 0; }
.m-rows > div + div { border-top: 1px solid var(--tm-color-divider); }
.m-rows dt { font-size: 15px; color: var(--tm-color-text-secondary); }
.m-rows dd { margin: 0; text-align: right; font: var(--tm-font-weight-medium) 15px/20px var(--tm-font-ui); font-variant-numeric: tabular-nums; }
.lab-ph-block + .lab-ph-block { padding-top: 6px; border-top: 0; }
.lab-ph-list.m-card button { min-height: 60px; }

/* Order entry with its own keypad (Revolut) */
.m-tk { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.m-tk__side { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 14px; background: var(--m-fill); }
.m-tk__side button { min-height: 42px; border: 0; border-radius: 11px; background: none; color: var(--tm-color-text-secondary); font: var(--tm-font-weight-semibold) 15px/20px var(--tm-font-ui); cursor: pointer; }
.m-tk__side [data-tk-side="buy"][aria-pressed="true"] { background: var(--lk-buy, var(--tm-color-up)); color: #fff; }
.m-tk__side [data-tk-side="sell"][aria-pressed="true"] { background: var(--lk-sell, var(--tm-color-down)); color: #fff; }
.m-tk__sec { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-size: 15px; }
.m-tk__sec .m-mono { width: 30px; height: 30px; font-size: 11.5px; }
.m-tk__sec .tm-secondary { margin-left: auto; font-size: 13px; }
.m-tk__amt { display: grid; justify-items: center; gap: 10px; padding: 14px 0 2px; }
.m-tk__num { font: var(--tm-font-weight-semibold) 52px/58px var(--tm-font-ui); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-tk__unit { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--m-fill); color: var(--tm-color-text); font: var(--tm-font-weight-medium) 13.5px/18px var(--tm-font-ui); cursor: pointer; }
.m-tk__sub { display: grid; gap: 2px; margin: 0; text-align: center; font-size: 14px; line-height: 20px; color: var(--tm-color-text-secondary); }
.m-tk__be { font-size: 13px; }
.m-tk__check { min-height: 0; text-align: center; font-size: 14px; line-height: 20px; color: var(--tm-color-down); }
.m-tk__check:empty { display: none; }
.m-link { padding: 0; border: 0; background: none; color: var(--tm-color-primary-text); font: var(--tm-font-weight-semibold) 14px/20px var(--tm-font-ui); cursor: pointer; }
.m-tk__pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.m-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--m-fill); color: var(--tm-color-text); font: var(--tm-font-weight-medium) 14px/18px var(--tm-font-ui); cursor: pointer; }
.m-chip--sel select { appearance: none; -webkit-appearance: none; padding: 0 2px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.m-chip--sel select:focus-visible { outline: none; }
.m-chip--sel:focus-within { outline: 2px solid var(--tm-color-focus); outline-offset: 2px; }
.m-tk__price { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--m-group); text-align: center; }
.m-tk__price[hidden] { display: none; }
.m-tk__price b { display: block; font: var(--tm-font-weight-semibold) 22px/28px var(--tm-font-ui); }
.m-tk__price .tm-secondary { display: block; font-size: 12.5px; line-height: 17px; }
.m-tk__best { grid-column: 1 / -1; justify-self: center; }
.m-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 4px; }
.m-keys button { display: grid; place-items: center; height: 54px; border: 0; border-radius: 14px; background: none; color: var(--tm-color-text); font: var(--tm-font-weight-regular) 26px/1 var(--tm-font-ui); font-variant-numeric: tabular-nums; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.m-keys button:active { background: var(--m-press); }
.m-keys button:disabled { opacity: 0.2; cursor: default; }
.m-tk__go { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
.m-tk__go .tm-btn { min-height: 52px; }
.m-tk.is-halted .m-keys { opacity: 0.4; }
/* Round things stay round in Instrument, which gives controls squircle corners. */
:root:root[data-design][data-theme] .tm-phone :is(.m-circle, .m-pill, .m-pill button, .m-mono, .m-chip, .m-tk__unit, .lab-ph-avatar) { corner-shape: round; }
.lab-ph--stock .tm-shead__line { margin-bottom: 0; }
.lab-ph--stock .tm-shead__explain:not([hidden]) { margin-top: 8px; }
.m-tk__pills { flex-wrap: nowrap; }
.m-chip--sel select { field-sizing: content; width: auto; min-width: 0; height: auto; min-height: 0; }
:root:root[data-design][data-theme] .tm-phone .tm-sheet { background: var(--tm-color-raised); -webkit-backdrop-filter: none; backdrop-filter: none; }
.m-keys [data-key="del"] { font-size: 22px; }
/* Orders: each group is one rounded card of rows (Revolut). */
.tm-phone .sp2-ogroup ul { margin: 0; padding: 0 12px; border-radius: 18px; background: var(--m-group); list-style: none; }
.tm-phone .sp2-ogroup li + li { border-top: 1px solid var(--tm-color-divider); }
.tm-phone .sp2-ogroup .sp2-orow { border-radius: 0; }
.tm-phone .sp2-ogroup h4 { padding-top: 16px; }
:root:root[data-design][data-theme] .tm-phone .sp2-ogroup { border: 0; box-shadow: none; }

/* ---------- Mobile v3 polish (27 Oct 2026, the user: "still looks basic, lots of issues") ----------
   Depth instead of flat grey: white cards with soft layered shadows in light, raised surfaces with a top highlight in
   dark; inset dividers; change values as tinted pills (direction colour only); refined round marks; action icons in
   blue tints (blue is the action colour); floating round buttons; no scrollbars inside the phone. */
.tm-phone {
  --m-card: var(--tm-color-panel);
  --m-shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 8px 24px -12px rgb(16 24 40 / 0.16);
  --m-btn: var(--tm-color-panel);
  --m-btn-shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 4px 12px -6px rgb(16 24 40 / 0.18);
  --m-tint: color-mix(in srgb, var(--tm-color-primary-text) 12%, transparent);
  --m-group: var(--m-card);
}
:root[data-theme="dark"] .tm-phone {
  --m-card: color-mix(in srgb, var(--tm-color-text) 6%, var(--tm-color-bg));
  --m-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04), 0 12px 28px -18px rgb(0 0 0 / 0.85);
  --m-btn: color-mix(in srgb, var(--tm-color-text) 10%, var(--tm-color-bg));
  --m-btn-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
  --m-tint: color-mix(in srgb, var(--tm-color-primary-text) 16%, transparent);
}
/* No scrollbars inside the phone (phones show none until you scroll) */
.tm-phone :is(.tm-phone__main, .tm-sheet__body) { scrollbar-width: none; }
.tm-phone :is(.tm-phone__main, .tm-sheet__body)::-webkit-scrollbar { display: none; }

/* Header avatar: a proper 32px round with small initials */
:root:root[data-design][data-theme] .tm-phone .lab-ph-avatar { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--m-btn); box-shadow: var(--m-btn-shadow); color: var(--tm-color-text); font: var(--tm-font-weight-semibold) 12.5px/1 var(--tm-font-ui); letter-spacing: 0.02em; }

/* Sample-history tag: a small tinted pill, then the note on its own line */
:root:root[data-design][data-theme] .tm-phone .sp3-tag { display: inline-flex; align-items: center; margin: 0 6px 0 0; padding: 2px 8px; border: 0; border-radius: 999px; outline: 0; box-shadow: none; background: var(--tm-color-warning-tint); color: var(--tm-color-warning); font: var(--tm-font-weight-semibold) 11.5px/16px var(--tm-font-ui); }
.tm-phone .sp3-tag::after { content: none; }
.tm-phone .sp3-note { line-height: 20px; color: var(--tm-color-text-secondary); }

/* Cards: every grouped thing is a white (or raised) card with a soft shadow */
:root:root[data-design][data-theme] .tm-phone :is(.m-card, .sp2-cashfacts, .lab-ph-acct .lab-ph-list, .sp2-ogroup ul, .m-tk__price) { background: var(--m-card); box-shadow: var(--m-shadow); }
:root:root[data-design][data-theme] .tm-phone :is(.sp2-od__now, .sp2-od__grp) { background: var(--m-card); box-shadow: var(--m-shadow); }
:root:root[data-design][data-theme] .tm-phone .sp3-home .sp3-stocks .sp2-tablewrap,
:root:root[data-design][data-theme] .tm-phone .sp3-holdings .sp2-scroll,
:root:root[data-design][data-theme] .tm-phone .sp2-markets .sp2-scroll { padding: 0 14px; border-radius: 20px; background: var(--m-card); box-shadow: var(--m-shadow); }
:root:root[data-design][data-theme] .tm-phone .sp3-home :is(.sp3-next, .sp3-news).sp-card,
:root:root[data-design][data-theme] .tm-phone .sp-stmt.sp-card { padding: 4px 14px; border-radius: 20px; background: var(--m-card); box-shadow: var(--m-shadow); }
:root:root[data-design][data-theme] .tm-phone .sp-stmt.sp-card { padding-top: 14px; }
.tm-phone .sp3-home .sp3-next .sp3-grp-l { margin-top: 12px; }
.tm-phone .sp3-home .sp3-stocks .sp3-foot { justify-content: center; padding-top: 14px; }

/* Rows inside cards: full-width press, divider inset to the text (iOS) */
.tm-phone :is(.sp3-table, .sp2-stocks) tbody tr { margin-inline: -14px; padding-inline: 14px; border-bottom: 0; }
.tm-phone :is(.sp3-table, .sp2-stocks) tbody tr + tr { background-image: linear-gradient(var(--tm-color-divider), var(--tm-color-divider)); background-repeat: no-repeat; background-size: calc(100% - 66px) 1px; background-position: 66px 0; }
.tm-phone .sp-stmt tbody tr { margin-inline: -14px; padding-inline: 14px; }

/* Change values as tinted pills: the direction colour with a faint fill of the same colour */
.tm-phone :is(.sp3-table, .sp2-stocks) td .tm-change { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); font: var(--tm-font-weight-semibold) 12.5px/16px var(--tm-font-ui); }
.tm-phone :is(.sp3-table, .sp2-stocks) tbody tr > td:is(:nth-child(4), :nth-child(5)) { padding-top: 3px !important; }

/* Round marks: soft two-tone disc with a hairline ring */
.m-mono { width: 40px; height: 40px; background: linear-gradient(150deg, color-mix(in srgb, var(--tm-color-text) 11%, var(--tm-color-bg)), color-mix(in srgb, var(--tm-color-text) 4%, var(--tm-color-bg))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tm-color-text) 7%, transparent); color: var(--tm-color-text); font-size: 12.5px; }

/* Quick actions: white tiles, each icon in a blue tint */
.m-acts button { background: var(--m-card); box-shadow: var(--m-shadow); gap: 8px; padding-top: 12px; }
.m-acts .tm-icon { box-sizing: content-box; padding: 8px; border-radius: 50%; background: var(--m-tint); color: var(--tm-color-primary-text); }

/* Floating round buttons (Public): white with a soft shadow in light, raised in dark */
.m-circle, .m-pill { background: var(--m-btn); box-shadow: var(--m-btn-shadow); }
.m-tk .m-circle, .m-keys button { box-shadow: none; }
.m-tk .m-circle { background: var(--m-fill); }

/* Chips row fades at the edge, so it reads as scrollable */
.tm-phone .sp2-cats { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
/* Large titles stand alone on the phone; the header chip already says whether the market is open. */
.tm-phone .sp-head p { display: none; }
/* Markets summary: one card, the two indices side by side, today's turnover and breadth under a divider. */
:root:root[data-design][data-theme] .tm-phone .sp2-tiles { gap: 0 16px; padding: 14px 16px 16px; border-radius: 20px; background: var(--m-card); box-shadow: var(--m-shadow); }
:root:root[data-design][data-theme] .tm-phone .sp2-tile:nth-child(3) { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--tm-color-divider); }
.tm-phone .sp2-tile:nth-child(3) .sp2-tile__v { font-size: 17px; line-height: 22px; }
.tm-phone .sp2-breadth { height: 6px; margin: 8px 0 6px; border-radius: 999px; overflow: hidden; }
:root:root[data-design][data-theme] .tm-phone .sp2-tiles > .sp2-tile.sp-card:nth-child(3) { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--tm-color-divider); }
:root:root[data-design][data-theme] .tm-phone .sp2-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
:root:root[data-design][data-theme] .tm-phone .sp2-actions .tm-btn { width: 100%; }
:root:root[data-design][data-theme] .tm-phone .sp-stmt.sp-card.sp-box { padding: 14px 14px 4px; border-radius: 20px; background: var(--m-card); box-shadow: var(--m-shadow); }

/* ---------- Home hero on a blue gradient (27 Oct 2026, the user's pick from Mobbin) ----------
   A soft blue at the top, behind the value and chart, fading to the plain page (white in light) further down; it
   scrolls with the content. A second agreed exception to "no gradients" after the sign-in stage. Text on it stays
   dark in light and light in dark, at 4.5:1 or more. */
.tm-phone.lab-ph--home { --m-hero: color-mix(in srgb, var(--tm-color-primary) 36%, var(--tm-color-panel)); --m-end: var(--tm-color-panel); }
:root[data-theme="dark"] .tm-phone.lab-ph--home { --m-hero: color-mix(in srgb, var(--tm-color-primary) 34%, var(--tm-color-bg)); --m-end: var(--tm-color-bg); }
:root:root[data-design][data-theme] .tm-phone.lab-ph--home { background: var(--m-end); }
:root:root[data-design][data-theme] .tm-phone.lab-ph--home :is(.tm-phone__status, .tm-phone__header) { background: var(--m-hero); }
:root:root[data-design][data-theme] .tm-phone.lab-ph--home #lab-ph-main {
  /* Strong at the top, light by the return line (green on it stays 4.5:1), white by the quick actions. */
  background: radial-gradient(120% 60% at 80% -10%, color-mix(in srgb, var(--tm-color-primary) 30%, transparent), transparent 70%), linear-gradient(180deg, var(--m-hero) 0, color-mix(in srgb, var(--m-hero) 40%, var(--m-end)) 88px, color-mix(in srgb, var(--m-hero) 18%, var(--m-end)) 360px, var(--m-end) 620px) no-repeat;
  background-attachment: local; }
/* Chips, the chart fill and the chips' track sit on the gradient, so they go translucent white instead of grey. */
.tm-phone.lab-ph--home .sp3-hero { --m-fill: color-mix(in srgb, var(--tm-color-panel) 55%, transparent); }
:root[data-theme="dark"] .tm-phone.lab-ph--home .sp3-hero { --m-fill: rgb(255 255 255 / 0.1); }
.tm-phone.lab-ph--home .tm-mkt { background: color-mix(in srgb, var(--tm-color-panel) 60%, transparent); }
/* Clean charts on the phone: no vertical grid (Lumen light draws one as a background), a filled end dot. */
.tm-phone .tm-lchart__plot::after, .tm-phone .tm-lchart__plot::before { display: none; }
.tm-phone .tm-lchart--up circle.dot.end { fill: var(--tm-color-up); }
.tm-phone .tm-lchart--down circle.dot.end { fill: var(--tm-color-down); }
:root:root[data-design][data-theme] .tm-phone.lab-ph--home .tm-phone__header { border-bottom: 0; box-shadow: none; }

/* ---------- Capsule navigation (27 Oct 2026, ported from the Surge POS mobile app, nav E) ----------
   Floats over the content with a fade behind it. Dark capsule in both themes (a lighter graphite in dark so it still
   lifts off the page); the current tab is a white pill with its name; Trade is the blue action pill beside it. */
.m-navfade { position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; height: 120px; pointer-events: none; background: linear-gradient(to top, var(--m-end, var(--tm-color-bg)) 35%, color-mix(in srgb, var(--m-end, var(--tm-color-bg)) 0%, transparent)); }
.m-nav { position: absolute; left: 8px; right: 8px; bottom: 22px; z-index: 10; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.m-nav > * { pointer-events: auto; }
.m-nav__cap { display: flex; flex: none; gap: 2px; height: 54px; padding: 4px; border-radius: 999px; background: rgb(20 20 22 / 0.92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 14px 30px -10px rgb(0 0 0 / 0.45); }
:root[data-theme="dark"] .m-nav__cap { background: rgb(52 56 64 / 0.92); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 14px 30px -10px rgb(0 0 0 / 0.7); }
.m-nav__tab { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 46px; height: 46px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: rgb(255 255 255 / 0.6); font: 620 13px/1 var(--tm-font-ui); letter-spacing: -0.015em; cursor: pointer; -webkit-tap-highlight-color: transparent; corner-shape: round; transition: background-color 200ms, color 200ms, padding 200ms; }
.m-nav__tab.is-on { padding: 0 14px 0 12px; background: #fff; color: #111; }
.m-nav__tab:not(.is-on):active { color: #fff; }
.m-nav__l { white-space: nowrap; } /* no fade-in: the lab pauses animations while loading, which left the label invisible */
@keyframes m-nav-in { from { opacity: 0; transform: translateX(-4px); } }
.m-nav__trade { display: inline-flex; flex: none; align-items: center; gap: 7px; height: 54px; padding: 0 16px 0 14px; border: 0; border-radius: 999px; background: var(--lk-primary, var(--tm-color-primary)); color: #fff; font: 620 15px/1 var(--tm-font-ui); letter-spacing: -0.02em; cursor: pointer; corner-shape: round;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--lk-primary, var(--tm-color-primary)) 70%, #000), 0 14px 28px -10px color-mix(in srgb, var(--lk-primary, var(--tm-color-primary)) 75%, transparent), inset 0 1px 0 rgb(255 255 255 / 0.22); }
.m-nav__trade:active { transform: scale(0.96); }
.m-nav :focus-visible { outline: 2px solid var(--tm-color-focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .m-nav__tab, .m-nav__l { transition: none; animation: none; } }
/* Content clears the floating nav; sticky rows stop above it. */
:root:root[data-design][data-theme] .tm-phone .tm-phone__main { padding-bottom: 92px; }
.tm-phone .sp-page, .lab-ph-acct { padding-bottom: 24px; }
/* The ticket sheet and the Funds sheets sit above the nav. */
.tm-phone .tm-sheet-scrim { z-index: 30; }
.tm-phone .tm-sheet { z-index: 31; }
.tm-phone .has-sheet .sp2-scrim { z-index: 39; }
:root:root[data-design][data-theme] .tm-phone .m-nav__tab.is-on, :root:root[data-design][data-theme] .tm-phone .m-nav__tab.is-on :is(.tm-icon, .m-nav__l) { background-color: #fff; color: #111; opacity: 1; }
:root:root[data-design][data-theme] .tm-phone .m-nav__tab.is-on :is(.tm-icon, .m-nav__l) { background: none; }
:root:root[data-design][data-theme] .tm-phone .m-nav__trade, :root:root[data-design][data-theme] .tm-phone .m-nav__trade * { color: #fff; }
/* Narrow phones (Surge's compact rule): the Trade pill keeps its icon and drops the word; the current tab keeps its name. */
.m-nav { container-type: inline-size; }
@container (max-width: 360px) {
  .m-nav__trade { padding: 0 17px; }
  .m-nav__trade > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .m-nav__tab { min-width: 42px; padding: 0 8px; }
}
.tm-phone .sp2-tile .tm-change { display: inline-flex; flex-wrap: wrap; column-gap: 4px; white-space: normal; } /* "today" wraps under the change on 360px phones */

/* ---------- Glass tab bar (27 Oct 2026, replaces the capsule: the user's Public reference) ----------
   One floating bar holds every item, icon over label; frosted glass over the content; the current item sits on a
   white pill (a light frosted pill in dark). Trade, in the middle, has its icon in the action blue. */
.m-nav--glass { position: absolute; left: 10px; right: 10px; bottom: 20px; z-index: 10; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 5px; border-radius: 30px; pointer-events: auto;
  background: color-mix(in srgb, var(--tm-color-panel) 72%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tm-color-text) 7%, transparent), inset 0 1px 0 rgb(255 255 255 / 0.6), 0 12px 30px -12px rgb(16 24 40 / 0.28); corner-shape: round; }
:root[data-theme="dark"] .m-nav--glass { background: rgb(40 44 52 / 0.62); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), inset 0 1px 0 rgb(255 255 255 / 0.08), 0 14px 32px -12px rgb(0 0 0 / 0.75); }
.m-nav__item { display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; height: 56px; padding: 0 2px; border: 0; border-radius: 24px; background: none; color: var(--tm-color-text); font: var(--tm-font-weight-semibold) 11.5px/14px var(--tm-font-ui); letter-spacing: -0.01em; cursor: pointer; -webkit-tap-highlight-color: transparent; corner-shape: round; transition: background-color 180ms, box-shadow 180ms; }
.m-nav__item > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-nav__item .tm-icon { color: inherit; }
:root:root[data-design][data-theme] .tm-phone .m-nav__item.is-on { background: #fff; color: #111; box-shadow: 0 1px 2px rgb(16 24 40 / 0.08), 0 4px 12px -4px rgb(16 24 40 / 0.16); }
:root:root[data-design][data-theme][data-theme="dark"] .tm-phone .m-nav__item.is-on { background: rgb(255 255 255 / 0.16); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1); }
.m-nav__item--trade .tm-icon { color: var(--tm-color-primary-text); }
.m-nav__item:not(.is-on):active { background: color-mix(in srgb, var(--tm-color-text) 8%, transparent); }
.m-nav__item:focus-visible { outline: 2px solid var(--tm-color-focus); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .m-nav__item { transition: none; } }
:root:not([data-theme="dark"]) .m-nav--glass { background: rgb(232 235 240 / 0.7); }
/* Fully rounded ends on the bar and a matching full pill for the current item. */
:root:root[data-design][data-theme] .tm-phone .m-nav--glass { border-radius: 999px; padding: 5px 6px; corner-shape: round; }
:root:root[data-design][data-theme] .tm-phone .m-nav__item { border-radius: 999px; corner-shape: round; }
