/* client-app.css — APP LOOK, lane 2, Step 2: the client app on phones (the look half of client-app.js).
   ONE switch point: lane 1's. Every rule starts html.app-look (set by app-look.js below 768px, or the installed app below
   1024px), so at 768px and wider in a browser nothing here applies. The frame (header, tab bar, sheets, rows) is lane 1's
   app-look.css; this file only adds what the client pages need on top: the "Restore" rows of APP-COVERAGE-MAP.md Part A,
   the bell list inside its sheet, the Filters pill, the Deploy sheet foot. Brand tokens only. */

/* ---- Restore: things the phone layout hid that the map brings back ---------------------------------------------- */
/* A-dashboard-10: the return sparkline inside its tile */
html.app-look body.ps-overview .po-msp:not([hidden]) { display: block; position: static; margin-top: 6px; width: 70px; height: 26px; }
/* A-dashboard-40: the allocation legend bars */
html.app-look body.ps-overview .ad-bar { display: block; }
/* A-risk-management-2: the saved-level dot on the risk meter */
html.app-look body.ps-rk .rm-dot { display: inline-block; }
/* A-documents-5: the icon tile on each document row */
html.app-look body.ps-doc .rl-di { display: flex; }
html.app-look body.ps-doc .rl-panel .doc-row { grid-template-columns: auto minmax(0, 1fr); }
/* A-login-3 / A-confirm-email-1: the headline in the plum band */
html.app-look body.au-page .au-copy h1 { display: block; font-size: 26px; line-height: 1.12; margin: 0 0 8px; }
/* A-signup-1 / A-thank-you-1: "Back to site" text beside its icon; A-signup-4: the current step name under the track */
html.app-look .au-top .au-back span { display: inline; }
html.app-look body.au-signup .rail-step.is-now .rail-lbl { display: block; }

/* ---- the bell list inside its sheet (screen 24) ------------------------------------------------------------------- */
html.app-look .ca-bell #notif-bell-list { max-height: none; overflow: visible; }
html.app-look .ca-bell #notif-bell-empty { padding: 32px 0; }
html.app-look .ca-bell #notif-bell-list > * { min-height: 56px; }

/* ---- Filters pill (screen 18): the page's own filter form moves into the sheet --------------------------------- */
.ca-filters-pill { display: none; }
html.app-look .ca-filters-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 0 12px; }
html.app-look .ca-filters-pill svg { width: 18px; height: 18px; }
html.app-look .ca-filterform:not(.is-in-sheet) { display: none; }
html.app-look .ca-filterform.is-in-sheet { display: block; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
html.app-look .ca-filterform.is-in-sheet .grid { grid-template-columns: minmax(0, 1fr) !important; }

/* ---- Deploy sheet foot (answer A1): "My funding requests" with its open count -------------------------------- */
html.app-look .ca-funding { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; text-decoration: none; }
html.app-look .ca-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-terracotta-deep); color: #FFFFFF; font-size: 12px; font-weight: 700; }

/* ---- tables as rows (second pass, item 1): the table's Total row, carried under IMApp.rows' list ----------------- */
.ca-rows-total { display: none; }
html.app-look .ca-rows-total { display: block; margin: 8px 0 0; padding: 12px 16px; border-radius: 16px; background: var(--brand-sand-panel);
  font-size: 14px; font-weight: 600; color: var(--brand-plum-deepest); font-variant-numeric: tabular-nums; }
html.app-look .ax-rows-note button, html.app-look .ax-rows-note a[href] { min-height: 44px; }

/* ---- Asset Collection sort (second pass, item 2): the pill replaces the select on phones; the select stays the source */
.ca-sort-pill { display: none; }
html.app-look .ca-sort-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
html.app-look .ca-sort-pill svg { width: 16px; height: 16px; }
html.app-look .ca-sort-host { display: none; }

/* ---- Settings as a root list of sub-pages (second pass, item 3; screen 22) ---------------------------------------- */
.ca-set-root, .ca-set-back { display: none; }
html.app-look body.ps-set .ca-set-root { display: block; background: #FFFFFF; border-radius: 22px; padding: 4px 16px; margin: 0 0 16px;
  box-shadow: 0 0 0 1px rgba(var(--brand-plum-deepest-rgb), .055), 0 6px 16px -10px rgba(var(--brand-plum-deepest-rgb), .18); }
html.app-look body.ps-set .ca-set-root .ax-row { text-decoration: none; color: inherit; }
html.app-look body.ps-set .ca-set-root .ax-row[hidden], html.app-look body.ps-set .ca-set-group[hidden] { display: none; }
html.app-look body.ps-set .ca-set-group { padding: 16px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-terracotta-deep); }
html.app-look body.ps-set .ca-set-chev { width: 18px; height: 18px; flex: none; color: var(--brand-muted); }
/* root: the list only; sub-page: the one section, with "< Settings" above it */
html.app-look body.ps-set:not(.ca-set-sub) [data-ca-set] { display: none !important; }
html.app-look body.ps-set.ca-set-sub [data-ca-set]:not(.ca-set-on) { display: none !important; }
html.app-look body.ps-set.ca-set-sub .ca-set-root { display: none; }
html.app-look body.ps-set.ca-set-sub .ca-set-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: 0 0 8px;
  font-size: 15px; font-weight: 600; color: var(--brand-terracotta-deep); text-decoration: none; }
html.app-look body.ps-set .ca-set-back svg { width: 20px; height: 20px; }
html.app-look body.ps-set #settings-normal-content > .al-hello h2 { display: none; }
html.app-look body.ps-set.ca-set-sub #settings-normal-content > .al-hello { display: none; }

/* ---- signing viewer, full screen on phones (second pass, item 4; screen 20) ------------------------------------- */
.ca-dsg-page { display: none; }
html.app-look body.ps-doc .dsg-modal { padding: 0; align-items: stretch; z-index: 1000; }
html.app-look body.ps-doc .dsg-panel { border-radius: 0; max-width: none; width: 100%; height: 100dvh; max-height: 100dvh; display: flex; flex-direction: column; }
html.app-look body.ps-doc .dsg-head { padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; border-bottom: 1px solid rgba(var(--brand-navy-rgb), .1); }
html.app-look body.ps-doc .dsg-head-tx b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.app-look body.ps-doc .ca-dsg-page:not(:empty) { display: block; margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--brand-plum-deepest); font-variant-numeric: tabular-nums; }
html.app-look body.ps-doc .dsg-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px; }
html.app-look body.ps-doc .dsg-viewer { border-radius: 14px; padding: 10px; }
html.app-look body.ps-doc .dsg-foot { flex: none; display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(var(--brand-navy-rgb), .1); background: #FFFFFF; }
html.app-look body.ps-doc .dsg-foot .mw-btn { min-height: 50px; border-radius: 999px; }
html.app-look body.ps-doc .dsg-foot .dsg-primary { flex: 1 1 auto; }
html.app-look body.ps-doc .dsg-foot .dsg-secondary { flex: 0 0 auto; }
html.app-look body.ps-doc #dsg-close { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; background: rgba(var(--brand-navy-rgb), .07); }

/* ==== APP LOOK FIX (APP-LOOK-FIX.md, 7 Nov) — installed app only (html.app-look = IMApp.active()) ==================== */
/* F1 one title: the page's own heading block repeats the frame's large title; its line is shown under the title instead
   (client-app.js fixFrame). Overview keeps its summary line; only the greeting heading moves up as the subtitle. */
html.app-look body.ps-portal main .ml-hello, html.app-look body.ps-portal main .rl-hello, html.app-look body.ps-portal main .al-hello { display: none; }
html.app-look body.ps-overview #welcome-heading { display: none; }
html.app-look body.ps-fd .fd-hero h1 { display: none; }
/* F2 one gutter: the title, its lines, cards and rows share one left / right edge — 20px plus the safe area. The large
   title sits inside <main>, so its own padding is dropped and <main> carries the gutter. */
html.app-look body.ps-portal { --ca-gutter: calc(20px + env(safe-area-inset-left, 0px)); --ca-gutter-r: calc(20px + env(safe-area-inset-right, 0px)); }
html.app-look body.ps-portal main.flex-1 { padding-left: var(--ca-gutter); padding-right: var(--ca-gutter-r); }
html.app-look body.ps-portal main.flex-1 > .ax-ltitle { padding-left: 0; padding-right: 0; }
html.app-look body.ps-overview .ov-main > .mb-5 { padding-left: 0; padding-right: 0; }
/* F4 one typeface: the Overview summary line is .mw-editorial (Newsreader by design on desktop); in the installed app
   every line of text is Bricolage Grotesque. */
html.app-look body.ps-portal .mw-editorial { font-family: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-style: normal; }
/* F5 the account bubble: a person icon when no name is known (never an empty circle) */
html.app-look .ax-acct-b.ca-acct-icon svg { width: 18px; height: 18px; }
/* F7 (one title): on a Settings sub-page the frame title is the section's name, so the section's own heading is hidden */
html.app-look body.ps-set.ca-set-sub .ca-set-on .al-ch h3, html.app-look body.ps-set.ca-set-sub .ca-set-on .al-chh h3 { display: none; }
