Round 2 mobile pass: CTA pinned above bottom sheet, swipe hint in chart header, anchor scroll-margin
- Issue 1: --sheet-h CSS var (live sheet height via syncSheetH: load/toggle/resize/
panel-content), .scr clearance and sticky #btn-next/.step-nav above the sheet;
income short step pixel-identical to round 1 (CTA top 485).
- Issue 2: chart() helper renders .chart-h (h3+p + .swipe span) into #g1-#g4;
.chartbox::before overlay removed; hint is flex sibling in header, sticky left.
- Issue 3: [id]{scroll-margin-top:70px} so #whatif anchor lands below sticky hdr.
- G2 tick clip and Four-futures scroll documented as non-issues in report.
- verify2.py: 90/90 PASS live; before/after evidence in audit/mobile-{before,after}2/.
Spec: MOBILE-FIX-2.md. Report: MOBILE-FIX-2-REPORT.md.
This commit is contained in:
1 parent
53315e03e8
commit
1b194b6f92
37 files changed
+1007
-21
No files matched your search
+25
-2
@@ -3,9 +3,13 @@
|
||||
--ink:#16233b; --ink2:#4c5b74; --line:#e3e8f0; --bg:#f7f9fc; --card:#ffffff;
|
||||
--blue:#2563eb; --red:#dc2626; --amber:#d97706; --green:#059669; --violet:#7c3aed;
|
||||
--r:14px;
|
||||
--muted:#4c5b74; --chip:#eef2f8;
|
||||
--sheet-h:218px; /* round 2 Fix 1: live bottom-sheet height; app.js keeps it current */
|
||||
}
|
||||
*{box-sizing:border-box}
|
||||
html{scroll-behavior:smooth}
|
||||
/* Round 2 Fix 3: in-page anchors must land below the sticky header (global; header is sticky on desktop too) */
|
||||
[id]{scroll-margin-top:70px}
|
||||
body{margin:0;font:16px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:var(--bg)}
|
||||
main{max-width:1060px;margin:0 auto;padding:12px}
|
||||
h1{font-size:clamp(26px,6vw,40px);line-height:1.15;margin:.4em 0 .3em}
|
||||
@@ -25,6 +29,7 @@ button,input{touch-action:manipulation}
|
||||
|
||||
/* screens */
|
||||
.scr{padding:8px 4px 80px}
|
||||
.swipe{display:none} /* round 2 Fix 2: hint hidden on desktop; shown ≤860px (rule in the mobile block below — keep it after this line) */
|
||||
.lede{font-size:18px}
|
||||
.ticks{list-style:none;padding:0;margin:14px 0}
|
||||
.ticks li{padding:7px 0 7px 30px;position:relative;color:var(--ink2)}
|
||||
@@ -48,8 +53,11 @@ button,input{touch-action:manipulation}
|
||||
.hdr #btn-print{display:none}
|
||||
/* Fix 2: charts keep desktop scale; scroll sideways on phones */
|
||||
.chartbox{overflow-x:auto;overflow-y:hidden}
|
||||
.chartbox::before{content:"swipe →";position:sticky;right:0;display:block;width:max-content;margin-bottom:-17px;padding:1px 8px;font-size:10px;color:var(--ink2);background:#ffffffcc;border:1px solid var(--line);border-radius:99px;pointer-events:none}
|
||||
.chartbox svg{min-width:560px}
|
||||
/* Round 2 Fix 2: "swipe →" lives in the chart card header (can never overlap SVG ticks);
|
||||
sticky left:0 keeps it pinned while the card scrolls horizontally */
|
||||
.chart-h{position:sticky;left:0}
|
||||
.swipe{display:inline-block;font-size:11.5px;color:var(--muted);background:var(--chip);border-radius:99px;padding:3px 9px;white-space:nowrap;flex:none}
|
||||
/* Fix 3: sheet height = its content; chips always visible; no transform peek */
|
||||
.panel{position:fixed;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));z-index:40;max-height:44vh;overflow:auto;box-shadow:0 -6px 24px #16233b22}
|
||||
.panel .insight{display:none}
|
||||
@@ -59,7 +67,18 @@ button,input{touch-action:manipulation}
|
||||
.panel.open .panel-h::after{content:" ▼"}
|
||||
#scrim{position:fixed;inset:0;background:#16233b33;z-index:35}
|
||||
#scrim.on{display:block}
|
||||
.scr{padding-bottom:calc(185px + env(safe-area-inset-bottom))}
|
||||
/* Round 2 Fix 1: clearance = live sheet height (app.js sets --sheet-h) + gap + safe area */
|
||||
.scr{padding-bottom:calc(var(--sheet-h) + 14px + env(safe-area-inset-bottom))}
|
||||
/* Round 2 Fix 1: Back/Next rows stick above the sheet on tall steps; solid bg, below scrim(35)/sheet(40).
|
||||
#btn-next (the primary CTA, last element of the flow) carries the pin at sheet+12px so it is on
|
||||
screen at every scroll position of every step; .step-nav is pinned per spec and stays in flow
|
||||
above it. margin-bottom:-6px nets out the base margin so the spec's 6px padding box does not
|
||||
shift short steps at all (income step stays pixel-identical to round 1: CTA top 485).
|
||||
At max scroll the doc's own padding + the CTA's 18px margin + 50px height keep the
|
||||
last option's bottom ≈507 — clear of the CTA top (≈544) and the sheet (≥616). */
|
||||
.step-nav{position:sticky;bottom:calc(var(--sheet-h) + 14px + env(safe-area-inset-bottom));background:var(--bg);z-index:20;padding:6px 0}
|
||||
.quiz-main .step-nav{margin-bottom:-6px} /* specificity: base `.step-nav{margin-bottom:6px}` is later in file; net the padding box so round-1 flow is pixel-identical */
|
||||
#btn-next{position:sticky;bottom:calc(var(--sheet-h) + 12px + env(safe-area-inset-bottom));z-index:21}
|
||||
}
|
||||
@media(max-width:700px){
|
||||
.hdr .pill{display:none} /* privacy pill is repeated on the intro screen and the footer */
|
||||
@@ -106,6 +125,10 @@ input[type=range]{width:100%;accent-color:var(--blue)}
|
||||
.cap{font-size:13.5px;margin:.2em 0 .6em}
|
||||
.chartbox{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:10px;overflow:hidden}
|
||||
.chartbox svg{display:block;width:100%;height:auto}
|
||||
/* Round 2 Fix 2: chart card header = title+caption block with the swipe hint on its right.
|
||||
.swipe is display:none on desktop (base rule above), so the flex row renders exactly like the old stacked block. */
|
||||
.chart-h{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
|
||||
.chart-h>div{min-width:0}
|
||||
.legend{display:flex;flex-wrap:wrap;gap:12px;font-size:13px;color:var(--ink2);padding:4px 6px 0}
|
||||
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}
|
||||
|
||||
|
||||
Reference in new issue
Block a user