/* Phone look for the stock page's Valuation + Capital pages, aligned with My stocks / Markets (2026-11-01): filled
   borderless 18px cards (--rc-card), iOS segmented controls instead of underline / capsule tabs, stock rows as My stocks'
   .pc-r cards, no white boxes on grey. Statistics' Multiples page, Comparables and Modeling (Simple layout). JS half: js/aiq-phone-fin-valuation.js. docs/features/financials.md "Phones: Valuation + Capital".
   Loaded on every phone page with media="(max-width: 767px)" (_phone.html): every rule stays inside, scoped to
   html.aiq-phone. The ×9 :not(#_) outranks aiq-phone-fin.css / -record.css / -toggle.css (×6–×9 + an id). */
@media (max-width: 767px) {
  /* solid twin of --rc-card for pinned table columns (rgba would let the scrolled cells show through) */
  html.aiq-phone { --pfv-solid: #FFFFFF; --pfv-track: rgba(118,118,128,.12); --pfv-pill: #FFFFFF; }
  html.aiq-phone[data-theme="dark"] { --pfv-solid: #2F333C; --pfv-track: rgba(118,118,128,.24); --pfv-pill: #636366; }

  /* ── the shared bits: section heading, grouped-list card, iOS segmented control ── */
  html.aiq-phone .pfv-h { margin: 24px 4px 10px; color: var(--rc-head); font: 450 17px/1.2 Inter, system-ui, sans-serif; }
  html.aiq-phone .pfv-list { background: var(--rc-card); border-radius: 18px; overflow: hidden; }
  html.aiq-phone .pfv-r { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 8px 16px; position: relative;
    color: var(--rc-ink); font: 400 16px/1.3 Inter, system-ui, sans-serif; }
  html.aiq-phone .pfv-r + .pfv-r::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--rc-sep); }
  html.aiq-phone .pfv-r .k { min-width: 0; }
  html.aiq-phone .pfv-r .v { flex: none; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
  html.aiq-phone .pfv-r .v.pos, html.aiq-phone .pfv-r .v .pos { color: var(--tb-pos, #0d8a66); }
  html.aiq-phone .pfv-r .v.neg, html.aiq-phone .pfv-r .v .neg { color: var(--tb-neg, #c8203f); }
  html.aiq-phone .pfv-seg { display: flex; gap: 2px; margin: 4px 0 2px; padding: 2px; border-radius: 10px; background: var(--pfv-track); overflow-x: auto; scrollbar-width: none; }
  html.aiq-phone .pfv-seg::-webkit-scrollbar { display: none; }
  html.aiq-phone .pfv-seg button { flex: 1 0 auto; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ph-ink);
    font: 500 14px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; }
  html.aiq-phone .pfv-seg button.on { background: var(--pfv-pill); font-weight: 600; box-shadow: 0 1px 3px rgba(15,17,21,.12), 0 0 0 .5px rgba(15,17,21,.04); }
  html.aiq-phone[data-theme="dark"] .pfv-seg button.on { color: #FFFFFF; }
  html.aiq-phone .pfv-fr { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
  html.aiq-phone .pfv-fl { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px); mask-image: linear-gradient(90deg, transparent, #000 32px); }
  html.aiq-phone .pfv-fl.pfv-fr { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
  html.aiq-phone .pfv-seg .pfv-lock { flex: none; color: var(--rc-mut); }
  html.aiq-phone .pfv-seg .pfv-lock i { font-size: 15px; }

  /* ── Statistics: the card view replaces the period table (kept hidden as its source) ── */
  html.aiq-phone[data-theme] main #tab-statistics .stx-tview.pfv-off:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { display: none !important; }
  html.aiq-phone #tab-statistics .pfv-stx { padding: 8px 4px 28px; }
  html.aiq-phone #tab-statistics .pfv-stx .pfv-h:first-of-type { margin-top: 18px; }

  /* ── Comparables ── */
  /* Companies: My stocks' .pc-r cards — white 46px logo square, ticker over name, market cap over a tinted day pill */
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .ph-rlist:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { background: none !important; border-radius: 0; overflow: visible; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .ph-rrow:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_)::before { content: none !important; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) {
    min-height: 70px; margin-bottom: 8px; padding: 12px 14px 12px 12px; border-radius: 18px; background: var(--rc-card); gap: 12px; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .cmp-logo:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) {
    width: 46px; height: 46px; border-radius: 13px; background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(16,17,18,.06); display: inline-flex; align-items: center; justify-content: center; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .cmp-logo img:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { width: 58%; height: 58%; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .cmp-logo .mono:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { color: #80868F; font-size: 17px; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .k b:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { font-size: 16px !important; font-weight: 600 !important; line-height: 20px; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .val:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { gap: 4px; font-weight: 600; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .val small:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) {
    display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 16px; color: var(--rc-mut); background: var(--rc-cap); }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .val small.pos:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { color: #0d8a66; background: rgba(67,209,167,.14); }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .val small.neg:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { color: #c8203f; background: rgba(247,52,99,.12); }
  html.aiq-phone[data-theme="dark"] main #comp-root .cmp-ph .cmp-ph-co .val small.pos:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { color: #43D1A7; }
  html.aiq-phone[data-theme="dark"] main #comp-root .cmp-ph .cmp-ph-co .val small.neg:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { color: #F73463; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .cv:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { display: none; }
  /* Add / Change peers: the dashed .pc-add card at the end of the list */
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-edit:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) {
    justify-content: center; gap: 8px; min-height: 56px; margin: 2px 0 0; padding: 0 16px; border: 1.5px dashed var(--rc-capline); border-radius: 18px; background: none; color: var(--rc-mut); }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-edit > *:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) {
    flex: none; width: auto; color: var(--rc-mut); font-size: 15px; font-weight: 500; text-align: left; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-edit > i:first-child:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { font-size: 16px; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-edit > .val:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_)::before { content: "· "; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-edit > .cv:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { display: none; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-edit:active:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { background: var(--rc-card); }

  /* every card body: filled, borderless */
  html.aiq-phone[data-theme] main #comp-root .cmp-card > :not(.cmp-card-hd):not(.cmp-tbl-ft):not(.pfv-sc):not(.cmp-tbl-body):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) {
    border: 0 !important; background: var(--rc-card) !important; }
  /* Comparison: views as an iOS segmented control above the card, the table on the card's own colour */
  html.aiq-phone[data-theme] main #comp-root .cmp-tbl-body:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; overflow: visible !important; }
  html.aiq-phone[data-theme] main #comp-root .cmp-side:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { padding: 0 0 10px !important; }
  html.aiq-phone[data-theme] main #comp-root #cmp-views:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) {
    display: flex !important; gap: 8px !important; padding: 2px 16px 2px 2px !important; margin: 0 -16px 0 0 !important; border-radius: 0 !important; background: none !important; overflow-x: auto; scrollbar-width: none; }
  html.aiq-phone[data-theme] main #comp-root #cmp-views > button:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) {
    flex: 0 0 auto !important; height: 36px !important; padding: 0 16px !important; border: 0 !important; border-radius: 999px !important; background: #FFFFFF !important;
    color: var(--ph-ink) !important; font: 500 14px/1 Inter, system-ui, sans-serif !important; box-shadow: inset 0 0 0 1px rgba(15,17,21,.08) !important; }
  html.aiq-phone[data-theme] main #comp-root #cmp-views > button.on:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) {
    background: #2B2D33 !important; color: #FFFFFF !important; font-weight: 600 !important; box-shadow: none !important; }
  html.aiq-phone[data-theme] main #comp-root .cmp-tbl-body > .cmp-scroll:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { background: var(--rc-card) !important; border-radius: 18px !important; overflow-x: auto !important; }
  html.aiq-phone[data-theme] main #comp-root .cmp-table.aiq-tbl:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) > * > tr > :is(th, td) {
    background: var(--pfv-solid) !important; border-color: var(--rc-sep) !important; }
  html.aiq-phone[data-theme] main #comp-root .cmp-table.aiq-tbl:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) > tbody > tr:last-child > td { border-bottom-color: var(--rc-sep) !important; }
  html.aiq-phone[data-theme] main #comp-root .cmp-table.aiq-tbl:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) .cmp-logo {
    background: #FFFFFF; border-radius: 6px; }

  /* Scorecard: one card per company (js builds .pfv-sc; the grade table stays hidden) */
  html.aiq-phone[data-theme] main #comp-root #cmp-score.pfv-off:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { display: none !important; }
  html.aiq-phone[data-theme] main #comp-root .cmp-card > .pfv-sc:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { display: block; background: none !important; border: 0 !important; overflow: visible; }
  html.aiq-phone .pfv-co { display: block; margin-bottom: 8px; padding: 12px 14px 14px 12px; border-radius: 18px; background: var(--rc-card); color: var(--rc-ink); text-decoration: none;
    -webkit-tap-highlight-color: transparent; }
  html.aiq-phone .pfv-hd { display: flex; align-items: center; gap: 12px; min-height: 46px; }
  html.aiq-phone .pfv-lw { flex: none; width: 46px; height: 46px; border-radius: 13px; background: #FFFFFF; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(16,17,18,.06); }
  html.aiq-phone .pfv-lw img { width: 27px; height: 27px; object-fit: contain; }
  html.aiq-phone .pfv-lw .mono { color: #80868F; font-size: 17px; font-weight: 600; }
  html.aiq-phone .pfv-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  html.aiq-phone .pfv-nm b { font-size: 16px; font-weight: 600; line-height: 20px; }
  html.aiq-phone .pfv-nm small { font-size: 13px; color: var(--rc-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.aiq-phone .pfv-ov { flex: none; display: flex; align-items: center; gap: 8px; }
  html.aiq-phone .pfv-ov small, html.aiq-phone .pfv-g small { color: var(--rc-mut); font-size: 12px; }
  html.aiq-phone .pfv-gs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rc-sep); }
  html.aiq-phone .pfv-g { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
  html.aiq-phone .pfv-g small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.aiq-phone .pfv-g .mut { color: var(--rc-mut); font-weight: 500; }
  html.aiq-phone :is(.pfv-g, .pfv-ov) .cmp-g { flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 700; }
  html.aiq-phone .pfv-ov .cmp-g { min-width: 30px; height: 26px; font-size: 14px; }

  /* Modeling: css/aiq-phone-models.css (the workbook draws its own phone markup, 2026-11-03) */
  /* Capital structure + Credit and Dividends (the .fxd kit) are drawn by the Company session's js/aiq-phone-fin-company.js
     (phone copies in the record kit); nothing here touches .fxd-*. */

  /* ── the finance look (2026-11-01, Revolut / Wealthsimple; css/aiq-phone-pin.css): Companies grouped in ONE white card —
     round logos, market cap over a small signed change in its colour (no pills), the dashed Add peers card inside at the end ── */
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .ph-rlist:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { padding: 6px 0 !important; background: #FFFFFF !important; border-radius: 22px !important; overflow: hidden !important; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { min-height: 64px; margin: 0; padding: 10px 16px; border-radius: 0; background: none; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .cmp-logo:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(15,17,21,.07); }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-co .val small:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { padding: 0; background: none !important; font-size: 13px; }
  html.aiq-phone[data-theme] main #comp-root .cmp-ph .cmp-ph-edit:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { margin: 6px 12px 6px; min-height: 52px; border-radius: 16px; }
  /* the desktop toolbar row above the card has nothing in it on phones: no empty white band */
  html.aiq-phone[data-theme] main #comp-root > .cmp-row3:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { display: none !important; }

  /* ── Comparables on phones (user, 2026-11-08: "this table doesn't work well on mobile … multiple cards scrolling down
     with different colors"; no view tabs): the matrix as sections of tinted metric cards, built by _comparables.html
     renderPhoneCards(). ── */
  html.aiq-phone .cmp-phc { display: block; margin-top: 8px; }
  html.aiq-phone #comp-root:has(.cmp-phc > *) :is(.cmp-mx-card, .cmp-views) { display: none !important; }
  html.aiq-phone .cmp-phc .c0 { --t-bg: #E6ECFD; --t-fg: #455DDC; --t-ink: #3049B8; } html.aiq-phone .cmp-phc .c1 { --t-bg: #E2F5EE; --t-fg: #1FAE86; --t-ink: #0F7A62; }
  html.aiq-phone .cmp-phc .c2 { --t-bg: #F0E8FD; --t-fg: #9646EF; --t-ink: #6C3FD1; } html.aiq-phone .cmp-phc .c3 { --t-bg: #FFF0E3; --t-fg: #F07A1F; --t-ink: #B8620E; }
  html.aiq-phone .cmp-phc .c4 { --t-bg: #FCE8EF; --t-fg: #E5426E; --t-ink: #B42357; } html.aiq-phone .cmp-phc .c5 { --t-bg: #E1F2F7; --t-fg: #1C8FB0; --t-ink: #1C6E8A; }
  html.aiq-phone .cmp-pg { margin-top: 26px; }
  html.aiq-phone .cmp-pg-h { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; }
  html.aiq-phone .cmp-pg-h h3:not(#_):not(#_):not(#_):not(#_) { margin: 0 !important; font: 700 21px/1.2 Inter, system-ui, sans-serif !important; letter-spacing: -.02em !important; color: #101112 !important; text-transform: none !important; }
  html.aiq-phone .cmp-pg-h em { margin-left: auto; min-width: 30px; height: 24px; padding: 0 9px; border-radius: 999px; display: inline-grid; place-items: center;
    background: var(--t-bg); color: var(--t-ink); font: 700 12.5px/1 Inter, sans-serif; font-style: normal; }
  html.aiq-phone .cmp-pc { margin-bottom: 10px; padding: 14px 14px 10px; border-radius: 22px; background: var(--t-bg); }
  html.aiq-phone .cmp-pc-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
  html.aiq-phone .cmp-pc-h b { font: 700 15.5px/1.25 Inter, system-ui, sans-serif; color: #101112; }
  html.aiq-phone .cmp-pc-h small { flex: none; font: 600 12.5px/1 Inter, sans-serif; color: #6B7280; font-variant-numeric: tabular-nums; }
  html.aiq-phone .cmp-pr { display: grid; grid-template-columns: 26px 52px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 30px; }
  html.aiq-phone .cmp-pr .cmp-logo { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: #FFFFFF; }
  html.aiq-phone :is(.cmp-pr, .cmp-pt) .tk { font: 650 13px/1 Inter, sans-serif; color: #3A3F48; }
  html.aiq-phone .cmp-pr .bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.75); overflow: hidden; }
  html.aiq-phone .cmp-pr .bar i { display: block; height: 100%; border-radius: 999px; background: var(--t-fg); opacity: .45; }
  html.aiq-phone .cmp-pr.me .bar i { opacity: 1; }
  html.aiq-phone .cmp-pr.me .tk, html.aiq-phone .cmp-pr.me .v { color: #101112; font-weight: 750; }
  html.aiq-phone .cmp-pr .v { font: 600 13.5px/1 Inter, sans-serif; color: #3A3F48; font-variant-numeric: tabular-nums; text-align: right; min-width: 58px; }
  html.aiq-phone .cmp-pr .v.pos { color: #0d8a66; } html.aiq-phone .cmp-pr .v.neg { color: #c8203f; }
  html.aiq-phone .cmp-pt { display: grid; grid-template-columns: 26px 52px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 40px; }
  html.aiq-phone .cmp-pt + .cmp-pt { border-top: 1px solid rgba(16,24,40,.06); }
  html.aiq-phone .cmp-pt .tx { min-width: 0; display: flex; flex-direction: column; gap: 1px; font: 600 13px/1.25 Inter, sans-serif; color: #101112; }
  html.aiq-phone .cmp-pt .tx small { font-weight: 500; color: #6B7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.aiq-phone .cmp-pg .cmp-pc.x { display: none; }
  html.aiq-phone .cmp-pg.open .cmp-pc.x { display: block; }
  html.aiq-phone .cmp-pg-all { display: block; width: 100%; height: 44px; margin-top: 2px; border: 0; border-radius: 999px; background: var(--t-bg); color: var(--t-ink);
    font: 650 14.5px/1 Inter, sans-serif; cursor: pointer; }
}
