/* The paid views on a phone: the tab bar, the sheets, and the desktop's Dashboard, Benchmark and Improve laid out for a
   phone (app-paid-dashboard.js, app-paid-benchmark.js, app-paid-improve.js, app-paid-blocks.js; styled for every
   screen in app-paid-simple.css). Everything here hangs off .pd.is-phone (app-paid.js sets it while app-phone.js
   PHONE_VIEW_QUERY matches), so a phone turned on its side keeps the phone's frame; the sheets live outside .pd (on
   <body>) and carry their own tokens. Loaded after app-phone.css.

   7 Nov 2026 (user ask: the phone to match the simpler desktop views, still made for a phone): the phone's own
   Overview, Compare and Improve gave way to the desktop's views, in the same --sv-* tokens (Joseph's styling memo:
   Inter, flat navy cards, yellow fills with navy text), one column wide, with controls a thumb can hit. The tab bar
   lights the open view as the desktop row does, with a yellow pill. No style attributes: bars and marks are placed by
   custom properties set through CSSOM. */

.ph-tabs,.im-dock{display:none}

/* ---------------------------------------------------------------- the frame */
.pd.is-phone{--ph-tabs-h:60px;--ph-r:18px;padding-bottom:calc(var(--ph-tabs-h) + env(safe-area-inset-bottom,0px) + 28px)}
/* The tab bar takes over from the nav, More holds the ways out and the chat, and the tab bar says which view this is
   (the kicker over the views drawn the older way). */
.pd.is-phone :is(.pd-nav,.pd-actions,.pd-chat-launch){display:none}
.pd.is-phone .pd-view>.pd-kicker{display:none}
/* The scope line over the views drawn the older way (four lines on a phone): "How we picked your competitors", in
   More, says it in full. */
.pd.is-phone .pd-view>.pd-meta{display:none}
.pd.is-phone .pd-view>.pd-h1{font-size:1.85rem;margin-top:4px}
/* The forecast's lede says to drag what's under "What if…": on a phone that is the bar along the foot. */
.pd.is-phone .fc-lede{display:none}

.pd.is-phone .ph-tabs{display:block;position:fixed;left:0;right:0;bottom:0;z-index:180;padding:4px 6px env(safe-area-inset-bottom,0px);
  border-top:1px solid var(--sv-line);background:var(--sv-bg);background:color-mix(in srgb,var(--sv-bg) 92%,transparent);
  -webkit-backdrop-filter:saturate(1.6) blur(18px);backdrop-filter:saturate(1.6) blur(18px)}
.ph-tabs-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));max-width:560px;margin:0 auto;padding:0;list-style:none}
.ph-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;min-height:var(--ph-tabs-h);padding:4px 0;
  border:0;border-radius:14px;background:none;color:var(--sv-dim);font:inherit;font-size:.7rem;font-weight:600;letter-spacing:0;
  text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.ph-tab:hover{text-decoration:none}
.ph-tab .ph-i{width:22px;height:22px;padding:4px 14px;box-sizing:content-box;border-radius:999px;transition:background-color .18s}
.ph-tab[aria-current="page"],.ph-tab.is-current{color:var(--sv-fg)}
.ph-tab[aria-current="page"] .ph-i,.ph-tab.is-current .ph-i{color:#0B1424;background:#FFF55B}
.ph-tab:focus-visible{outline:2px solid var(--sv-fg);outline-offset:-2px}
.ph-i{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* benchmarcus.com's last tab (app-phone-shell.js powdrTab, in More's place): Powdr's yellow mark on its logo's blue. */
.ph-tab--powdr{color:var(--sv-fg)}
.ph-tab .ph-i--powdr{background:#316DA8;stroke:none}
.ph-tab--powdr:hover .ph-i--powdr{background:#2A5E93}
.ph-chev{flex:none;width:8px;height:8px;border-right:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg)}

/* The unlock's dock sits on the tab bar, as the unlock strip at the top looks; the chat opens as a sheet over it. */
.pd.is-phone .pd-lockdock{bottom:calc(var(--ph-tabs-h) + env(safe-area-inset-bottom,0px) + 8px);left:8px;right:8px;padding:10px 10px 10px 16px;
  border:1px solid rgba(255,245,91,.38);border-radius:18px;background:var(--sv-card);color:var(--sv-fg);box-shadow:0 10px 30px rgba(0,0,0,.35)}
.pd.is-phone .pd-lockdock-wallet{color:var(--sv-dim)}
.pd.is-phone .pd-lockdock-btn{min-height:44px;padding:0 20px;border:0;border-radius:999px;background:#FFF55B;color:#0B1424;font-weight:700}
.pd.is-phone .pd-chat{left:0;right:0;bottom:0;z-index:210}
.pd.is-phone .pd-chat-panel{width:100%;height:min(88vh,calc(100vh - 40px));height:min(88dvh,calc(100dvh - 40px));border-radius:22px 22px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom,0px)}

/* The site's footer clears the tab bar too (it sits after the views, outside them). */
body:has(#s-paid:not([hidden]) .pd.is-phone) .bm-foot{padding-bottom:calc(var(--ph-tabs-h,60px) + env(safe-area-inset-bottom,0px) + 24px)}

/* ---------------------------------------------------------------- the pieces every view shares (app-paid-blocks.js) */
.pd.is-phone .sv-h1{margin:2px 0 14px;font-size:1.7rem}
.pd.is-phone .sv-lede{margin:-8px 0 16px;font-size:.95rem}
.pd.is-phone .sv-lede.im-lede{margin-top:0}
.pd.is-phone .sv-card{margin:0 0 12px;border-radius:var(--ph-r)}
.pd.is-phone .sv-card-head{padding:16px 16px 12px}
.pd.is-phone .sv-strip{gap:12px;margin:0 0 16px;padding:10px 10px 10px 12px;border-radius:var(--ph-r)}
.pd.is-phone .sv-strip-mk svg{width:32px;height:32px}
.pd.is-phone .sv-strip-acts :is(.sv-btn-o,.sv-btn){min-height:40px;padding:0 16px}
.pd.is-phone .sv-strip-wide{display:none}
/* The way on to Powdr: its words, then the button across the card. */
.pd.is-phone .sv-next{flex-direction:column;align-items:stretch;gap:14px;padding:18px 16px 16px;border-radius:var(--ph-r)}
.pd.is-phone .sv-next-t{font-size:1.12rem}
.pd.is-phone .sv-next .sv-btn{width:100%}
.pd.is-phone :is(.sv-tile,.sv-btn,.sv-btn-o,.sv-seg-b,.im-seg-b,.im-nudge,.sv-more-a){-webkit-tap-highlight-color:transparent}
.pd.is-phone .sv-tile:active{transform:scale(.985)}

/* ---------------------------------------------------------------- Dashboard: the tiles one to a row */
.pd.is-phone .sv-tiles{grid-template-columns:minmax(0,1fr);gap:10px;margin:0 0 12px}
.pd.is-phone .sv-tile{min-height:0;padding:16px 16px 14px;border-radius:var(--ph-r);transition:transform .12s}
.pd.is-phone .sv-tile-big b{font-size:2rem}
.pd.is-phone .sv-mini-svg{height:48px}
.pd.is-phone .sv-list .sv-card-head{padding-bottom:10px}
.pd.is-phone .sv-rows{padding:0 4px}
.pd.is-phone .sv-row{grid-template-columns:24px minmax(0,1fr) auto;gap:10px;min-height:52px;padding:6px 12px}
.pd.is-phone .sv-row.is-you{margin:4px 0}
/* A long registered name takes two lines rather than losing its end. */
.pd.is-phone .sv-row-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.pd.is-phone .sv-more{padding:0 16px}
.pd.is-phone .sv-more-a{display:inline-flex;align-items:center;min-height:44px}

/* ---------------------------------------------------------------- Benchmark */
/* Where you rank: each measure's name and place on one line, its bar under them across the card. */
.pd.is-phone .sv-rank{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"l v" "b b";gap:6px 12px;min-height:0;padding:10px 16px 12px}
.pd.is-phone .sv-rank-l{grid-area:l}
.pd.is-phone .sv-rank-v{grid-area:v}
.pd.is-phone .sv-bar{grid-area:b}
/* The table: one figure beside the names, picked from the switch over it (app-paid-benchmark.js columnSwitch). */
.pd.is-phone .sv-all .sv-card-head{padding-bottom:10px}
.sv-all-pick{display:flex;margin:0 16px 6px}
.sv-all-pick .sv-seg-b{flex:1 1 0;min-width:0;min-height:40px;padding:0 6px;font-size:.84rem}
.pd.is-phone .sv-table :is(th,td){padding:0 16px}
.pd.is-phone .sv-table thead th{height:38px}
.pd.is-phone .sv-table tbody :is(td,th){height:58px}
.pd.is-phone .sv-table .num{width:1%;white-space:nowrap}
/* Your row's two cells meet on a fraction of a pixel on some screens: the first one covers the seam. */
.pd.is-phone .sv-table tr.is-you > :first-child{box-shadow:1px 0 0 #FFF55B}
.pd.is-phone .sv-table tr.is-you > *{height:52px}
.pd.is-phone .sv-co-name{overflow-wrap:anywhere}

/* ---------------------------------------------------------------- Improve */
.pd.is-phone .im-missing{flex-direction:column;align-items:stretch;padding:14px 16px;border-radius:var(--ph-r)}
.pd.is-phone .im-missing .sv-btn{width:100%}
/* "Compare with" across the card, Match all and Reset side by side, the four figures two to a row. */
.pd.is-phone .im-top{padding:14px}
.pd.is-phone .im-top-row{flex-direction:column;align-items:stretch;gap:10px}
.pd.is-phone .im-seg-wrap{flex-direction:column;align-items:stretch;gap:6px}
.pd.is-phone .im-seg{display:flex}
.pd.is-phone .im-seg-b{flex:1 1 0;min-width:0;min-height:40px;padding:0 8px}
.pd.is-phone .im-top-acts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pd.is-phone .im-what{margin:10px 0 12px;font-size:.82rem}
.pd.is-phone .im-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pd.is-phone .im-tile{padding:12px}
.pd.is-phone .im-tile-k{margin-bottom:6px;font-size:.64rem}
.pd.is-phone .im-tile-v{font-size:1.45rem}
.pd.is-phone .im-legend{gap:6px 14px;margin:4px 0 10px}
/* The cards one to a row, the labels under the track wrapping rather than squeezing, and a slider a thumb can hold. */
.pd.is-phone .im-grid{grid-template-columns:minmax(0,1fr);gap:10px}
.pd.is-phone .im-row{margin-bottom:18px}
.pd.is-phone .im-row-t{margin-bottom:8px;font-size:1rem}
.pd.is-phone .im-card{padding:16px 16px 14px;border-radius:var(--ph-r)}
.pd.is-phone .im-marks{flex-wrap:wrap;justify-content:flex-start;gap:4px 14px;font-size:.75rem}
.pd.is-phone .im-range{height:36px;margin:4px 0 10px}
.pd.is-phone .im-range::-webkit-slider-thumb{width:28px;height:28px;margin-top:-11px}
.pd.is-phone .im-range::-moz-range-thumb{width:26px;height:26px}
.pd.is-phone .im-nudge{width:44px;height:44px}
.pd.is-phone :is(.im-match,.im-use-b){min-height:44px}
/* More profit and cash freed up over the tab bar while the four figures are scrolled away (app-paid-improve.js
   totalsDock), so the total moves with the finger on a slider. */
.pd.is-phone .im-dock{position:fixed;left:8px;right:8px;bottom:calc(var(--ph-tabs-h) + env(safe-area-inset-bottom,0px) + 8px);z-index:175;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:560px;margin:0 auto;padding:10px 16px;
  border:1px solid var(--sv-line-strong);border-radius:16px;background:var(--sv-card);color:var(--sv-fg);box-shadow:0 10px 30px rgba(0,0,0,.35);
  opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .18s,transform .18s}
.pd.is-phone .im-dock.is-shown{opacity:1;transform:none;pointer-events:auto}
.im-dock-c{display:flex;flex-direction:column;gap:2px;min-width:0}
.im-dock-k{overflow:hidden;color:var(--sv-dim);font-size:.64rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;text-overflow:ellipsis;white-space:nowrap}
.im-dock-v{font-size:1.2rem;font-weight:800;letter-spacing:-.01em;line-height:1.2;color:var(--sv-accent-text)}
.pd.is-phone .pd-view:has(> .im-dock){padding-bottom:72px}

/* ---------------------------------------------------------------- Forecast: "What if…" docked over the tab bar */
.ph-fc-toggle{display:none}
.pd.is-phone .fc-page{padding-bottom:76px}
.pd.is-phone .fc-side.ph-fcsheet{position:fixed;top:auto;left:0;right:0;bottom:calc(var(--ph-tabs-h) + env(safe-area-inset-bottom,0px));z-index:170;display:flex;flex-direction:column;
  max-width:600px;max-height:min(58vh,calc(100vh - 230px));max-height:min(58dvh,calc(100dvh - 230px));margin:0 auto;padding:0 16px 14px;
  border:1px solid var(--line2);border-bottom:0;border-radius:22px 22px 0 0;background:var(--card);box-shadow:0 -14px 34px rgba(0,0,0,.3);overflow-y:auto;overscroll-behavior:contain}
.pd.is-phone .ph-fcsheet:not(.is-open)>:not(.ph-fc-toggle){display:none}
.pd.is-phone .ph-fcsheet:not(.is-open){padding-bottom:0}
.pd.is-phone .ph-fcsheet:not(.is-open)>.ph-fc-toggle{margin-bottom:0}
.pd.is-phone .ph-fcsheet>.pd-h2,.pd.is-phone .ph-fcsheet>.fc-side-changes{display:none}
.pd.is-phone .ph-fc-toggle{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 12px;width:auto;margin:0 -16px 6px;
  padding:14px 18px 12px;border:0;border-radius:22px 22px 0 0;background:var(--card);color:var(--fg);font:inherit;text-align:left;cursor:pointer}
.ph-fc-toggle::before{content:"";position:absolute;left:50%;top:6px;width:36px;height:4px;margin-left:-18px;border-radius:2px;background:var(--line2)}
.ph-fc-toggle-t{font-family:'Bricolage Grotesque',Inter,sans-serif;font-size:1.15rem;font-weight:600;letter-spacing:-.02em}
.ph-fc-toggle-s{grid-column:1;color:var(--dim);font-size:.84rem;line-height:1.35}
.ph-fc-toggle-s.is-on{color:var(--fg);font-weight:600}
.ph-fc-toggle>.ph-chev{grid-column:2;grid-row:1 / span 2;transform:rotate(-45deg);color:var(--dim);transition:transform .2s}
.ph-fcsheet.is-open .ph-fc-toggle>.ph-chev{transform:rotate(135deg)}
.pd.is-phone .ph-fcsheet .fc-lever-help,.pd.is-phone .ph-fcsheet .fc-lever-note{display:none}

/* ---------------------------------------------------------------- sheets (on <body>, outside .pd) */
html.ph-sheet-open,html.ph-sheet-open body{overflow:hidden}
.ph-sheet{--ph-dy:0px;position:fixed;inset:auto 0 0 0;width:100%;max-width:600px;max-height:none;margin:0 auto;padding:0;border:0;
  border-radius:24px 24px 0 0;background:var(--card);color:var(--fg);box-shadow:0 -20px 50px rgba(0,0,0,.35);overflow:visible;
  transform:translateY(calc(100% + 40px));transition:transform .24s cubic-bezier(.2,.8,.2,1)}
.ph-sheet.is-in{transform:translateY(var(--ph-dy))}
.ph-sheet.is-dragging{transition:none}
.ph-sheet::backdrop{background:rgba(3,10,20,.55)}
.ph-sheet-panel{display:flex;flex-direction:column;max-height:min(90vh,calc(100vh - 32px));max-height:min(90dvh,calc(100dvh - 32px))}
.ph-sheet-top{flex:none;padding:0 0 4px;touch-action:none;cursor:grab}
.ph-sheet-grab{display:block;width:40px;height:5px;margin:8px auto 6px;border-radius:3px;background:var(--line2)}
.ph-sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:2px 12px 8px 20px}
.ph-sheet-titles{min-width:0;padding-top:4px}
.ph-sheet-t{margin:0;font-size:1.35rem;letter-spacing:-.025em;line-height:1.15}
.ph-sheet-t:focus{outline:none}
.ph-sheet-sub{margin:4px 0 0;color:var(--dim);font-size:.88rem}
.ph-sheet-x{position:relative;flex:none;width:40px;height:40px;border:0;border-radius:50%;background:var(--card2);color:var(--fg);cursor:pointer}
.ph-x-i::before,.ph-x-i::after{content:"";position:absolute;left:50%;top:50%;width:15px;height:2px;border-radius:1px;background:currentColor}
.ph-x-i::before{transform:translate(-50%,-50%) rotate(45deg)}
.ph-x-i::after{transform:translate(-50%,-50%) rotate(-45deg)}
.ph-sheet-x:focus-visible{outline:2px solid var(--yellow);outline-offset:2px}
.ph-sheet-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:6px 16px calc(24px + env(safe-area-inset-bottom,0px))}
.ph-sheet-acts{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 4px}
/* More (the paid views' only sheet): in the views' own tokens. */
.ph-sheet--more{background:var(--sv-card);color:var(--sv-fg)}
.ph-sheet--more .ph-sheet-t{font-family:Inter,system-ui,sans-serif;font-weight:800;letter-spacing:-.02em}
.ph-sheet--more .ph-sheet-grab{background:var(--sv-line-strong)}
.ph-sheet--more .ph-sheet-x{background:var(--sv-chip);color:var(--sv-fg)}
.ph-sheet--more .ph-sheet-x:focus-visible{outline-color:var(--sv-fg)}
.ph-more-list{margin:0 0 14px;padding:0;list-style:none;border:1px solid var(--sv-line);border-radius:16px;background:var(--sv-inset);overflow:hidden}
.ph-more-list li + li{border-top:1px solid var(--sv-line)}
.ph-more-row{display:flex;align-items:center;gap:14px;width:100%;min-height:58px;padding:10px 16px;border:0;background:none;color:var(--sv-fg);font:inherit;text-align:left;cursor:pointer}
.ph-more-row:focus-visible{outline:2px solid var(--sv-fg);outline-offset:-2px}
.ph-more-i{width:24px;height:24px;flex:none;color:var(--sv-dim)}
.ph-more-text{display:flex;flex-direction:column;flex:1;min-width:0}
.ph-more-l{font-weight:600}
.ph-more-sub{color:var(--sv-dim);font-size:.84rem;line-height:1.35}
.ph-more-row>.ph-chev{color:var(--sv-dim)}
.ph-more-row.is-current{background:rgba(255,245,91,.08)}
.ph-more-row.is-current .ph-more-i{color:var(--sv-accent-text)}

/* A phone on its side: the bar a row of icons and labels side by side, so it takes less of the short screen, and the
   views a readable column rather than the full width. */
@media (pointer:coarse) and (max-height:500px){
  .pd.is-phone{--ph-tabs-h:46px}
  .ph-tabs-list{max-width:760px}
  .ph-tab{flex-direction:row;gap:6px;font-size:.78rem;white-space:nowrap}
  .ph-tab .ph-i{padding:3px 8px}
  .pd.is-phone .pd-view{max-width:680px;margin:0 auto}
  .ph-sheet-panel{max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
}
@media (prefers-reduced-motion:reduce){
  .ph-sheet,.ph-tab .ph-i,.ph-fc-toggle>.ph-chev,.pd.is-phone .sv-tile,.pd.is-phone .im-dock{transition:none}
  .pd.is-phone .sv-tile:active{transform:none}
}
@media print{.ph-tabs,.ph-sheet,.ph-fc-toggle,.im-dock{display:none!important}}
@media (forced-colors:active){
  .ph-tab[aria-current="page"] .ph-i,.ph-tab.is-current .ph-i{border:2px solid CanvasText}
  .ph-tab .ph-i--powdr{border:2px solid LinkText}
}

/* ---------------------------------------------------------------- light theme */
html[data-pf-theme="light"] .ph-sheet{box-shadow:0 -20px 50px rgba(11,32,57,.18)}
html[data-pf-theme="light"] .ph-sheet::backdrop{background:rgba(11,32,57,.38)}
html[data-pf-theme="light"] .ph-more-row.is-current{background:rgba(47,88,140,.08)}
/* The dock wears the unlock box's swapped colours (app-paid-simple.css): white in dark mode, night in light. */
.pd.is-phone .pd-lockdock{border-color:#D4C24A}
html[data-pf-theme="light"] .pd.is-phone .pd-lockdock{border-color:rgba(255,245,91,.55);box-shadow:0 10px 30px rgba(11,32,57,.24)}
html[data-pf-theme="light"] .pd.is-phone .im-dock{box-shadow:0 10px 30px rgba(11,32,57,.16)}
html[data-pf-theme="light"] .pd.is-phone .fc-side.ph-fcsheet{box-shadow:0 -14px 34px rgba(11,32,57,.14)}
