/* generated by scripts/sync_prototype.py from the prototype: portal phone: shell.css. Do not edit. */
/* ============================================================
   KCM Trade — phone shell (≤760px). Appended after the desktop sheet by
   build.py; every rule sits inside the one media query at the bottom of this
   comment, so desktop never sees it.

   SHARED COMPONENTS — markup contracts for the page implementers
   (copy the markup verbatim; the shell owns the CSS and the JS)

   Tokens (declared here, use everywhere):
     --hdr 56  --pad 14  --edge 14  --tab-h 70  --dock-h 76
     --safe = env(safe-area-inset-bottom)

   1. DOCK — the one bottom bar of a pushed flow (replaces the tab bar)
      JS:   K.DOCKS['Page label'] = function(){ return html || ''; }
            paint() calls it on a phone only, fills #dock and toggles
            body.is-docked. #dock clicks are routed by core.js:
              data-say="…"        -> K.toast
              data-order="sell|buy" -> K.order(side)
              data-dock-lots      -> K.ticketSheetOpen()  (chart defines)
              data-open-go="live|demo" -> K.openGo(kind)
              data-open-done="live|demo" -> K.openReset(kind); go('Accounts')
      Content primitives (flex row, gap 10, 76px + safe tall):
        <span class="dock-i [is-on]">SVG</span>         36px disc, grey / gold
        <span class="dock-t"><b>Title</b><span>meta</span></span>  flex:1, ellipsis
        <button class="btn btn-gold" …>Continue</button>  min-width 124, 48 tall
        <button class="btn btn-ghost" …>Open in MT5</button>
        <button class="btn btn-gold" disabled>…</button>  .45 opacity, no pointer
      Never two docks, never a dock and the tab bar: the shell handles that.

   2. SHEET — one glass sheet for every choice
      JS:   K.openSheet(html, label, openerEl)  -> fills #sheet-body with html,
                sets #sheet-body[data-kind="ticket"] (or "more" when label
                is 'More'), aria-label, scrim, page inert, focus in/out.
            K.setSheet(false)                    -> close (Escape/scrim/grip do it)
            K.sheetKind()                        -> label while open, else null
            Hooks a page may define:
              K.sheetClick(btn)  -> return true when handled
              K.sheetInput(el)   -> called on every input event in the sheet
            core.js handles data-tab-go and data-say first.
      Markup inside the sheet:
        <p class="sheet-grp">Group</p>                      kicker, full width
        <button class="sheet-item [is-on]" …>SVG<span>Label</span>
          [<em class="sheet-badge">1</em>]SVG(chev)</button>   48px tile
        <div class="sheet-foot">…</div>                    hairline above
      data-kind="more" lays tiles in two columns; "ticket" is one column.

   3. HORIZONTAL STRIP — things you compare (cards)
        <div class="hscroll [is-fade]"> <child/> <child/> … </div>
      flex, gap 10, snaps, bleeds to the page edge (negative --pad margins),
      hidden scrollbar; .is-fade masks the last 28px on the right.

   4. PILL STRIP — things you pick (tabs, timeframes)
        <div class="mtabs|ctabs|pillstrip"><button class="mtab [is-on]">…</button>…</div>
      off = white pill with --line-2 border, on = ink; 40px tall; the
      live pill is scrolled into the middle by K.centerStrips() in paint().

   5. PHONE CARD — the 150×124 market card (Home snapshot, Markets movers)
        <div class="mcard is-phone" data-chart="SYM" role="button" tabindex="0">
          <div><div class="mcard-s">…</div><div class="mcard-p">1.16132</div>
          <div class="mcard-c"><span class="up">+0.12%</span></div></div>
          <svg class="spark">…</svg></div>
      Put it inside .hscroll; sparkline 28px; price mono 18px.

   6. CHANGE CHIP — a tinted pill round the up/down span
        <span class="mchg|mcard-c|chg"><span class="up|down">+0.12%</span></span>
      Selectors are child-based (.mchg > .up); pct() already emits this.

   7. HEADS
        <div class="pagehead"><div><h1 id="main">Markets</h1>[<p>sub</p>]</div>[aside]</div>
        <div class="flow-top"><button class="backlink" data-go="markets"
             aria-label="Back to Markets">SVG(chev)</button><h1 id="main">Title</h1></div>
        <div class="sec-head"><h2>Section</h2>[<button class="sec-more" …>See all SVG</button>]</div>
      .backlink is a 44px round (its text is hidden: give it an aria-label);
      ol.dsteps loses its list indent.

   8. BUTTONS / ROWS / PANELS
        .btn            44px min, pill radius, 14px
        .panel          padding 16      .panel-flush  padding 2px 16px
        .kv > div       44px rows, 13.8px
        .sec-more, .st-cta, .promo-cta   44px tall

   9. TOAST — K.toast(msg, kind): bottom-anchored, above the bar or the dock.

   10. HOVER KILL / REDUCED MOTION — @media (hover:none) and
       @media (prefers-reduced-motion:reduce) blocks are nested at the end;
       every phone file must carry its own reduced-motion block.
   ============================================================ */
@media (max-width:760px){
  /* --tab-h is the bar's real box: 6 + 56 + 6 padding and the 2px border */
  :root{--hdr:56px;--pad:14px;--edge:14px;--tab-h:70px;--dock-h:76px;
        --safe:env(safe-area-inset-bottom,0px)}

  /* ---------- top bar: 56px, static, scrolls away ---------- */
  .topbar{gap:10px;padding:0 var(--pad);min-height:var(--hdr)}
  /* the full logo: the mark, and KCMTrade with its PRO line at the mark's
     height. The brand takes the free space, which pushes Trading|Partner
     across to sit beside the avatar rather than beside the logo. */
  .brand{padding:6px;margin:0 auto 0 -6px;gap:7px;min-width:44px;min-height:44px}
  .brand-mark{width:30px;height:30px}
  .brand-word{display:block;height:30px}
  .topbar-end{margin-left:0}
  /* below 350 the logo, the switch and the avatar stop fitting on one line;
     the mark alone carries the brand there, as it did before */
  @media (max-width:349px){ .brand-word{display:none} .brand{gap:0} }
  /* Trading | Partner: the pill stays 44 with its 3px inset, but each button
     reaches 44 tall — a transparent 3px top/bottom border carries the hit box
     past the inset while background-clip keeps the fill at 38, exactly as it
     paints today; drop-shadow follows the painted pill, not the border box. */
  .mode{padding:3px}
  .mode-btn{font-size:13px;padding:0 10px;min-height:44px;margin:-3px 0;border:3px solid transparent;border-width:3px 0;
    background-clip:padding-box}
  .mode-btn.is-on{box-shadow:none;filter:drop-shadow(0 1px 3px rgba(16,28,58,.12))}
:where(html[data-appearance="dark"]) .mode-btn.is-on{filter:drop-shadow(0 1px 3px rgba(0,0,0,0.338))}
  .mode-btn:active{background:#EEF1F7}
:where(html[data-appearance="dark"]) .mode-btn:active{background:rgba(255,255,255,0.1)}
  /* on a pushed (docked) page the only way out is Back, so the Trading |
     Partner switch stands down: it fades with the page's exit and returns
     with the cascade; visibility keeps it out of the tab order meanwhile */
  .mode{transition:opacity var(--t-base) var(--ease-out) var(--t-quick),visibility 0s linear 0s}
  body.is-docked .mode{opacity:0;visibility:hidden;
    transition:opacity var(--t-quick) var(--ease-in),visibility 0s linear var(--t-quick)}
  .userbtn{padding:2px;margin-right:-2px}
  .avatar{width:40px;height:40px}
  .round,.who-top{display:none}

  /* ---------- the drawer stands down ----------
     style.css already hides .rail, .railtoggle-m and .scrim under 760px; core.js
     (retireDrawer) also stamps hidden + aria-hidden on a phone so the retired
     nav is out of the accessibility tree and the tab order however the desktop
     rules evolve. The tab bar and the More sheet reach every destination. */
  .rail[hidden],.railtoggle-m[hidden],.scrim[hidden]{display:none!important}

  /* ---------- account bar: the masthead ---------- */
  .hbar{display:grid;grid-template-columns:minmax(0,1fr);gap:0;padding:16px;margin-bottom:14px}
  .hbar-sw{background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;
    padding:0 0 12px;min-height:44px;max-width:none}
  .hbar-sw:hover{background:none;border-color:var(--line)}
  .hbar-sw > svg{margin-left:auto}
  .hbar-swn b{font-size:14px}
  .hbar-swn span{font-size:12px}
  /* Balance | Equity: a text switch, the live word underlined in gold. The
     hit box is 44 tall; the row it sits in stays 18. */
  .metsw{background:none;padding:0;gap:14px;margin:12px 0 0;border-radius:0}
  .met{position:relative;padding:13px 4px;margin:-13px 0;min-height:44px;font-size:13px;line-height:18px;
    border-radius:0;box-shadow:none;background:none;color:var(--ink-4)}
  .met::after{content:'';position:absolute;left:4px;right:4px;bottom:11px;height:2px;border-radius:2px;
    background:var(--gold);opacity:0;transform:scaleX(.5);
    transition:opacity var(--t-quick) var(--ease),transform var(--t-base) var(--ease)}
  .met.is-on{background:none;box-shadow:none;color:var(--ink);font-weight:600}
  .met.is-on::after{opacity:1;transform:none}
  .met:not(.is-on):hover{color:var(--ink-2)}
  /* one numeral face for money: Outfit, like the Accounts total and every
     other .num (mono stays for prices and identifiers); tabular so the
     count-up never shifts sideways */
  .hbar-eq b{font-size:34px;line-height:1;margin-top:6px;font-family:inherit;
    font-variant-numeric:tabular-nums lining-nums;letter-spacing:-.02em}
  .hbar-eq em{font-size:14px}
  .hbar-meta{display:flex;gap:14px;flex-wrap:wrap;font-size:12.5px;color:var(--ink-4);margin-top:6px}
  .hbar-meta b{font-weight:500;color:var(--ink-3)}
  .hbar-stats{display:none}
  .hbar-acts{margin-top:12px;gap:8px}
  .hbar-acts .btn{flex:1;min-height:48px;border-radius:99px;padding:10px 14px}
  /* the masthead is part of the page's choreography: it fades out with the
     page (core.js render) and leads the cascade back in at --i 0, the page's
     blocks following from --i 1 (core.js paint) */
  #acctbar{transition:opacity var(--t-quick) var(--ease-in),transform var(--t-quick) var(--ease-in)}
  #acctbar.is-out{opacity:0;transform:translateY(4px)}
  #acctbar > .rise{animation:rise var(--t-base) var(--ease-out) both;animation-delay:calc(var(--i,0) * 45ms)}

  /* ---------- tab bar: unchanged look, two more states ---------- */
  .tab{min-height:53px}
  /* the hand-off runs both ways: leaving a docked page the dock drops
     0–130 and the bar rises 130–550, so the two never cross */
  .tabbar{transition:transform var(--t-slow) var(--ease-out) var(--t-quick),opacity var(--t-base) var(--ease),
    visibility 0s linear 0s}
  /* dims under the sheet at once (opacity only: the sheet covers the bar,
     and a translating blur would re-sample the page for nothing) */
  body.sheet-open .tabbar{opacity:.55;transition-delay:0s}
  /* drops away when a page docks; hidden keeps it out of the tab order */
  body.is-docked .tabbar{transform:translate(-50%,calc(100% + 24px + var(--safe)));visibility:hidden;
    transition:transform var(--t-base) var(--ease-in),visibility 0s linear var(--t-base)}
  /* the sheen travels by transform (one wide band sliding under the
     bar's overflow clip) instead of a background-position, so the blurred
     glass is not re-rastered every frame; it rests while the bar is away
     or under the sheet. Same journey as the desktop keyframes: the band is
     280% wide and covers 180% of the bar, i.e. 64.3% of its own width. */
  .tabbar::after{inset:0 auto 0 0;width:280%;background-size:100% 100%;background-position:0 0;
    animation:glasssheen 9s cubic-bezier(.45,0,.55,1) infinite alternate;will-change:transform}
  @keyframes glasssheen{from{transform:translateX(0)}to{transform:translateX(-64.3%)}}
  body.is-docked .tabbar::after,body.sheet-open .tabbar::after{animation-play-state:paused}
  .app{padding-bottom:calc(var(--tab-h) + 24px + var(--safe))}
  body.is-docked .app{padding-bottom:calc(var(--dock-h) + 20px + var(--safe))}

  /* ---------- the dock ----------
     Never display:none — hidden by transform and visibility, so the rise is
     a transition rather than a pop. Bar drops (260 in) at 0ms, dock rises
     (420 out) at +130ms: one object leaves, one arrives. */
  /* the same floating capsule as the tab bar, because it takes the bar's
     place: one object leaves, one arrives, and they should be the same shape.
     Centred like the bar, so both hide and show along the same axis. */
  .dock{position:fixed;left:50%;right:auto;bottom:calc(12px + var(--safe));z-index:80;
    display:flex;gap:6px;align-items:center;
    width:min(calc(100% - 20px),430px);padding:6px;border-radius:99px;
    background:
      linear-gradient(180deg,
        rgba(255,255,255,.92) 0%,
        rgba(255,255,255,.58) 34%,
        rgba(255,255,255,.42) 62%,
        rgba(255,255,255,.66) 100%);
    -webkit-backdrop-filter:blur(26px) saturate(210%) brightness(1.08);
    backdrop-filter:blur(26px) saturate(210%) brightness(1.08);
    border:1px solid rgba(255,255,255,.9);
    box-shadow:
      0 22px 46px -14px rgba(12,21,38,.45),
      0 3px 10px -2px rgba(12,21,38,.18),
      inset 0 1.5px 0 rgba(255,255,255,1),
      inset 0 -1.5px 1px rgba(255,255,255,.6),
      inset 1px 0 0 rgba(255,255,255,.55),
      inset -1px 0 0 rgba(255,255,255,.55);
    transform:translate(-50%,calc(100% + 24px + var(--safe)));visibility:hidden;view-transition-name:dock;
    transition:transform var(--t-quick) var(--ease-in),visibility 0s linear var(--t-quick)}
:where(html[data-appearance="dark"]) .dock{background:linear-gradient(180deg,
        rgba(16,21,42,0.92) 0%,
        rgba(16,21,42,0.58) 34%,
        rgba(16,21,42,0.42) 62%,
        rgba(16,21,42,0.66) 100%);border:1px solid rgba(255,255,255,0.108);box-shadow:0 22px 46px -14px rgba(0,0,0,0.75),
      0 3px 10px -2px rgba(0,0,0,0.482),
      inset 0 1.5px 0 rgba(255,255,255,0.35),
      inset 0 -1.5px 1px rgba(255,255,255,0.21),
      inset 1px 0 0 rgba(255,255,255,0.193),
      inset -1px 0 0 rgba(255,255,255,0.193)}
  body.is-docked .dock{transform:translate(-50%,0);visibility:visible;
    transition:transform var(--t-slow) var(--ease-out) 130ms,visibility 0s linear 130ms}
  /* content primitives */
  .dock-i{width:36px;height:36px;border-radius:50%;background:var(--surface-sunk);color:var(--ink-4);
    display:grid;place-items:center;flex:none;transition:background var(--t-base) var(--ease),color var(--t-base) var(--ease)}
  .dock-i.is-on{background:var(--gold);color:var(--gold-ink)}
  .dock-i svg{width:16px;height:16px;stroke-width:2.4}
  .dock-t{flex:1;min-width:0}
  .dock-t b{display:block;font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .dock-t span{display:block;font-size:12px;color:var(--ink-3)}
  /* (0,2,0): out-ranks the later .btn{min-height:44px} below; a page's own
     .dock .btn-ghost + .btn-gold rule (0,3,0) still wins for its flex */
  .dock .btn{min-height:48px;font-weight:600}
  /* no sheen on the dock's button: it would re-raster the plate while the
     dock itself is the thing in motion */
  .dock .btn-gold{flex:0 0 auto;min-width:124px;animation:none;background-position:50% 50%}
  .dock .btn[disabled]{opacity:.45;pointer-events:none}
  .dock .btn:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

  /* ---------- the sheet ---------- */
  /* a sheet, not a page: capped at 72vh so More scrolls inside itself with
     Trade and Account (the most used) in the first view and the grip in
     reach. Near-opaque white so the page never tints it; the frost comes on
     only once the sheet is still (.is-still, set on transitionend), so the
     rise is a plain plate and not a moving blur; it leaves on a short
     accelerating drop (130 ease-in) after a 420 ease-out rise. */
  .sheet{padding:0 14px calc(16px + var(--safe));max-height:72vh;background:rgba(255,255,255,.94);
    -webkit-backdrop-filter:none;backdrop-filter:none}
:where(html[data-appearance="dark"]) .sheet{background:rgba(16,21,42,0.94)}
  .sheet-wrap.is-still .sheet{-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
  .sheet-wrap:not(.is-up) .sheet{transition:transform var(--t-quick) var(--ease-in)}
  /* the scrim's wash alone reads; its blur was a third backdrop filter */
  .sheet-scrim{-webkit-backdrop-filter:none;backdrop-filter:none}
  /* the grip stays put while the list scrolls under it */
  .sheet-grip{width:100%;height:44px;margin:0;padding:0;position:sticky;top:0;z-index:1;border-radius:0;
    background:rgba(255,255,255,.94)}
:where(html[data-appearance="dark"]) .sheet-grip{background:rgba(16,21,42,0.94)}
  .sheet-grip::before{content:'';position:absolute;left:50%;top:10px;width:42px;height:5px;margin-left:-21px;
    border-radius:99px;background:#C6D0E2}
:where(html[data-appearance="dark"]) .sheet-grip::before{background:rgba(255,255,255,0.07)}
  .sheet-body{display:grid;grid-template-columns:1fr 1fr;gap:2px 8px}
  .sheet-body[data-kind="ticket"]{grid-template-columns:1fr;gap:10px}
  .sheet-grp{grid-column:1 / -1;padding:8px 6px 2px}
  .sheet-item{padding:0 10px;min-height:48px;border-radius:14px;font-size:14.5px;
    transition:background var(--t-quick) var(--ease),transform var(--t-quick) var(--ease)}
  .sheet-item:active{transform:scale(.985)}
  /* a group with one destination spans the row instead of leaving a hole */
  .sheet-item.is-wide{grid-column:1 / -1}
  /* the chevron is decoration a two-column tile has no room for */
  .sheet-item > svg:last-child:not(:first-child){display:none}
  .sheet-foot{grid-column:1 / -1;display:flex;align-items:center;gap:10px;margin-top:12px;padding-top:12px;
    border-top:1px solid var(--line)}
  .sheet-foot .rail-mini{width:40px;height:40px;font-size:12.5px;box-shadow:none}
  .sheet-foot .who{flex:1;min-width:0}
  .sheet-foot .who b{display:block;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .sheet-foot .who span{font-size:12px;color:var(--ink-4)}
  .sheet-foot .btn{min-height:44px;flex:none}

  /* ---------- shared primitives ---------- */
  /* a strip of things you compare: snaps, bleeds to the page edge */
  .hscroll{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x proximity;overscroll-behavior-x:contain;
    scrollbar-width:none;margin:0 calc(-1 * var(--pad));padding:2px var(--pad) 6px;-webkit-overflow-scrolling:touch}
  .hscroll::-webkit-scrollbar{display:none}
  .hscroll > *{flex:0 0 auto;scroll-snap-align:start}
  .hscroll.is-fade{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);
    mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}

  /* one pill style for every strip of things you pick */
  .mtabs,.ctabs,.pillstrip{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;
    background:none;border:0;border-radius:0;
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);
    mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
  .mtabs::-webkit-scrollbar,.ctabs::-webkit-scrollbar,.pillstrip::-webkit-scrollbar{display:none}
  .mtab{min-height:40px;padding:0 16px;font-size:13.6px;font-weight:500;background:#fff;border:1px solid var(--line-2);
    color:var(--ink-2);scroll-snap-align:start;display:inline-flex;align-items:center;flex:none}
:where(html[data-appearance="dark"]) .mtab{background:#10152A}
  .mtab:hover{background:#fff;color:var(--ink-2)}
:where(html[data-appearance="dark"]) .mtab:hover{background:rgba(255,255,255,0.05)}
  .mtab:active{transform:none;background:#EEF1F7}
:where(html[data-appearance="dark"]) .mtab:active{background:rgba(255,255,255,0.1)}
  .mtab.is-on{background:var(--ink);border-color:var(--ink);color:#fff;font-weight:600}
:where(html[data-appearance="dark"]) .mtab.is-on{background:var(--ink-fill)}

  /* the phone card: Home snapshot and Markets movers are the same object */
  .mcard.is-phone{flex:0 0 150px;grid-template-columns:1fr;padding:12px 14px;gap:6px;min-height:124px;margin:0}
  .mcard.is-phone .spark{display:block;width:100%;height:28px}
  .mcard.is-phone .mcard-p{font-size:18px;font-family:'IBM Plex Mono',ui-monospace,monospace;letter-spacing:-.02em;margin-top:4px}
  .mcard.is-phone .mcard-c{margin-top:2px}
  .mcard.is-phone:active{transform:scale(.985)}

  /* the change chip: a tint round the signed figure */
  .mcard-c > .up,.mcard-c > .down,.mchg > .up,.mchg > .down,.chg > .up,.chg > .down{
    display:inline-block;font-size:12.4px;font-weight:600;padding:2px 8px;border-radius:99px;line-height:1.3}
  .mcard-c > .up,.mchg > .up,.chg > .up{background:#E4F3EC}
:where(html[data-appearance="dark"]) .mcard-c > .up,:where(html[data-appearance="dark"]) .mchg > .up,:where(html[data-appearance="dark"]) .chg > .up{background:rgba(88,228,163,0.14)}
  .mcard-c > .down,.mchg > .down,.chg > .down{background:#FBEAE7}
:where(html[data-appearance="dark"]) .mcard-c > .down,:where(html[data-appearance="dark"]) .mchg > .down,:where(html[data-appearance="dark"]) .chg > .down{background:rgba(228,109,88,0.14)}

  /* heads, links, buttons */
  .pagehead{margin:8px 0 14px;gap:10px}
  .pagehead h1{font-size:24px}
  .pagehead p{font-size:13.4px;margin-top:4px}
  .flow-top{display:flex;align-items:center;gap:12px;min-height:56px}
  .flow-top h1{font-size:22px;letter-spacing:-.03em;line-height:1.15}
  .backlink{width:44px;height:44px;border-radius:50%;background:#fff;border:1px solid var(--line-2);
    justify-content:center;gap:0;margin:0;font-size:0;flex:none;color:var(--ink);
    transition:background var(--t-quick) var(--ease)}
:where(html[data-appearance="dark"]) .backlink{background:#10152A}
  .backlink svg{width:18px;height:18px;transform:rotate(90deg)}
  .backlink:hover{gap:0;color:var(--ink)}
  .backlink:active{background:#EEF1F7}
:where(html[data-appearance="dark"]) .backlink:active{background:rgba(255,255,255,0.1)}
  ol.dsteps{margin:0;padding:0;list-style:none;flex-basis:100%}
  .dstep{min-height:28px;padding:4px 10px 4px 4px;font-size:12px}
  .btn{min-height:44px;padding:10px 18px;font-size:14px;border-radius:99px}
  .sec-head{margin:22px 0 10px}
  .sec-head h2{font-size:18px}
  :where(.sec-more,.st-cta,.promo-cta){min-height:44px;padding:0 0 0 12px}   /* pages refine these */
  .panel{padding:16px}
  .panel-flush{padding:2px 16px}
  .kv > div{min-height:44px;padding:10px 0;font-size:13.8px}

  /* press states ease every property they change. These settle the lists
     the page sheets declare (shell.css is appended last, so it wins at
     equal specificity): a scale that snaps while its fill eases reads as
     a glitch, not a press. */
  .plan{transition:border-color var(--t-quick) var(--ease),transform var(--t-quick) var(--ease)}
  .cx-tools .round{transition:background var(--t-quick) var(--ease),color var(--t-quick) var(--ease),
    transform var(--t-quick) var(--ease)}
  .qrow,.qtile{transition:transform .16s var(--ease),background-color var(--t-quick) var(--ease),
    box-shadow .16s var(--ease),border-color .16s var(--ease)}

  /* the toast: at the bottom, above whatever chrome is there */
  .toast{top:auto;left:14px;right:14px;max-width:none;white-space:normal;text-align:left;line-height:1.35;
    bottom:calc(var(--tab-h) + 24px + var(--safe));transform:translateY(12px) scale(.98)}
  .toast.is-up{transform:none}
  body.is-docked .toast{bottom:calc(var(--dock-h) + 16px + var(--safe))}

  /* ---------- touch: nothing lifts ---------- */
  @media (hover:none){
    .btn:hover,.qrow:hover,.qtile:hover,.mcard:hover,.mcard[data-chart]:hover,.plan:hover,.mkt-more:hover,
    .tk:hover,.promo:hover,.dep:hover,.acct:hover,.linkcard:hover{transform:none;filter:none;box-shadow:var(--lift-card)}
    .btn-gold:hover{background-image:var(--gold-grad)}
    .mrow[data-chart]:hover{background:none}
    /* a touch browser keeps :hover on the last tapped control until the
       next touch, so only the resting state is pinned; the live one
       (.is-on) keeps its own look, and the press fill still shows */
    .mtab:not(.is-on):hover{background:#fff;color:var(--ink-2)}
:where(html[data-appearance="dark"]) .mtab:not(.is-on):hover{background:rgba(255,255,255,0.05)}
    .mtab:not(.is-on):active{background:#EEF1F7}
:where(html[data-appearance="dark"]) .mtab:not(.is-on):active{background:rgba(255,255,255,0.1)}
    .met:not(.is-on):hover{color:var(--ink-4)}
    .mode-btn:not(.is-on):hover{background:transparent;color:var(--ink-3)}
    .mode-btn:not(.is-on):active{background:#EEF1F7}
:where(html[data-appearance="dark"]) .mode-btn:not(.is-on):active{background:rgba(255,255,255,0.1)}
    .backlink:hover{color:var(--ink)}
    .sec-more:hover,.st-cta:hover,.promo-cta:hover{gap:5px}
  }

  /* ---------- reduced motion ---------- */
  @media (prefers-reduced-motion:reduce){
    .tabbar,body.is-docked .tabbar,.dock,body.is-docked .dock,.toast,.toast.is-up,.met::after,.dock-i,
    .sheet-item,.backlink,.mode-btn,.mode,body.is-docked .mode,#acctbar,
    .sheet-wrap:not(.is-up) .sheet,.plan,.cx-tools .round,.qrow,.qtile{transition:none}
    body.sheet-open .tabbar{transform:translateX(-50%);opacity:1}
    .tabbar::after{animation:none}
    #acctbar.is-out{opacity:1;transform:none}
    #acctbar > .rise{animation:none}
    .sheet-item:active,.mcard.is-phone:active{transform:none}
  }
}

/* late fixes: room past the last pill so it is never under the end fade;
   a toast action is a full-height target */
@media (max-width:760px){
  .mtabs::after,.ctabs::after,.pillstrip::after{content:'';flex:0 0 28px}
  .toast button,.toast a{min-height:44px;padding:0 12px;margin:-8px -4px -8px 0;display:inline-flex;align-items:center}
}

/* the language row in the More sheet, and the list it opens */
@media (max-width:760px){
  .sheet-val{font-style:normal;font-size:12.6px;color:var(--ink-4);margin-left:auto;white-space:nowrap}
  .sheet-item .sheet-val + svg{margin-left:6px}
  .sheet-back{display:flex;align-items:center;gap:9px;min-height:48px;width:100%;padding:0 6px;
    font-size:15px;font-weight:600;color:var(--ink);grid-column:1/-1}
  .sheet-back svg{width:16px;height:16px;transform:rotate(90deg);color:var(--ink-4)}
  #sheet-body .ulist{grid-column:1/-1;max-height:none;overflow:visible}
  #sheet-body .uopt{min-height:48px;padding:0 8px;font-size:15px}
  #sheet-body .umenu-note{grid-column:1/-1;padding:12px 8px 4px}
  #sheet-body.is-in-r{animation:upane-r var(--t-base) var(--ease-out) both}
  #sheet-body.is-in-l{animation:upane-l var(--t-base) var(--ease-out) both}
  @media (prefers-reduced-motion:reduce){
    #sheet-body.is-in-r,#sheet-body.is-in-l{animation:none}
  }
}

/* the header's discs are desktop chrome: on a phone the same two rows live
   in the More sheet, and the bar keeps the brand, the mode and the avatar */
@media (max-width:760px){
  .topbar-util,.topbar-bell{display:none}
}

/* ============================================================
   Shorter on a phone — the masthead gives back the height it was
   spending on chrome, and the metric switch goes back to being a
   text switch (the travelling pill belongs to the desktop bar).
   ============================================================ */
@media (max-width:760px){
  /* the pill is a desktop object: on a phone the metric is a text switch
     with a gold underline, and the pill was landing across both words */
  .metsw .segind,.metsw .segtrail{display:none}
  .metsw{background:none;box-shadow:none;padding:0;gap:10px}

  /* the switch sits beside the figure rather than above it */
  .hbar{padding:13px 15px 14px}
  .hbar-eq{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
  .hbar-eq .metsw{order:2;margin:0 0 0 auto;align-self:center}
  .hbar-eq b{margin-top:0;font-size:33px}
  .hbar-meta{margin-top:4px}
  .hbar .hbar-sw{padding:0 0 7px;min-height:42px}

  /* section heads stop taking a line of their own */
  .sec-head{margin:18px 0 8px}
  .sec-head h2{font-size:17px}
}

/* the sheet foot's identity is the way into Profile on a phone: there is no
   account menu here, so your own name is the entry point */
@media (max-width:760px){
  .sheet-me{display:flex;align-items:center;gap:11px;flex:1;min-width:0;text-align:left;
    margin:-8px -10px;padding:8px 10px;border-radius:12px;
    transition:background var(--t-quick) var(--ease)}
  .sheet-me:active{background:#EEF1F7}
:where(html[data-appearance="dark"]) .sheet-me:active{background:rgba(255,255,255,0.1)}
  @media (prefers-reduced-motion:reduce){ .sheet-me{transition:none} }
}
