/* site-app.css — APP LOOK, lane 2, Step 1: the public website on phones (statements-reports\APP-LOOK.md, Part C of
   APP-COVERAGE-MAP.md, artboards 12–15 and 34–39 in approved-mockups\app-look\).

   ONE switch point: lane 1's. app-look.js puts class "app-look" on <html> for a phone (< 768px wide, any browser) or the
   installed app below 1024px; every phone rule here starts html.app-look. At 768px and wider in a browser NOTHING here
   applies, so the desktop site is exactly as it was. site-app.js asks the same switch (IMApp.active()).

   Colours are brand tokens only (verify-brand-colors). The artboards' filled pill (#B4523A) is not a token: the nearest,
   --brand-terracotta-deep (the deep terracotta) carries it, white text on it.

   Classes added by site-app.js are sa- prefixed (sa-cta, sa-jump, sa-row, sa-acc, sa-more, sa-swipe, sa-dots, sa-tabs).
   Every rule is scoped to an element only the public pages have (body.ih-page / body.ip-page, .im-hdr, footer.site-footer,
   footer.ih-foot), and this file is linked on the public pages only. */

/* phone / installed app (html.app-look, set by app-look.js) */

  /* =====================================================================================================================
     0. Page ground, tokens for this layer
     ===================================================================================================================== */
  html.app-look {
    --sa-card: #FFFFFF;
    --sa-shadow: 0 0 0 1px rgba(var(--brand-plum-deepest-rgb), .055), 0 6px 16px -10px rgba(var(--brand-plum-deepest-rgb), .18);
    --sa-line: rgba(var(--brand-navy-rgb), .1);
    --sa-soft: rgba(var(--brand-navy-rgb), .07);
    --sa-fill: var(--brand-terracotta-deep);
    --sa-cta-h: 74px;          /* the sticky bar: 50px pills + 12px top padding + 12px */
  }
  html.app-look:has(.im-hdr) { scroll-padding-top: 76px; }
  html.app-look:has(.sa-jump) { scroll-padding-top: 136px; }

  /* =====================================================================================================================
     1. Header (C-frame-1, 5, 7, 10): 60px row — logo left, Get Access pill, 44px menu circle. Scrolled: sand glass, the
        Get Access pill gives way to the sticky bar (artboard 13).
     ===================================================================================================================== */
  html.app-look body .im-hdr { height: 60px; }
  html.app-look body .im-hdr .im-hdr-bar { height: 60px; padding: 0 12px 0 20px; gap: 8px; grid-template-columns: 1fr auto; }
  html.app-look body .im-hdr .im-logo { font-size: 18px; gap: 8px; }
  html.app-look body .im-hdr .im-hdr-actions { gap: 8px; }
  html.app-look body .im-hdr .im-hdr-actions .im-btn.im-hdr-access { height: 44px; padding: 0 18px; font-size: 14.5px; border-radius: 999px; }
  html.app-look body .im-hdr .im-hdr-toggle { width: 44px; height: 44px; border-radius: 50%; }
  html.app-look body.sa-has-cta .im-hdr.is-stuck .im-hdr-access { display: none; }

  /* =====================================================================================================================
     2. Menu sheet (C-frame-2, 3, 4, 8, 9; artboard 15): #main-nav — the same ONE link list — becomes a bottom sheet.
        The open/close, the lock and Back are site-nav.js + im-overlay.js as before (drawerWidth covers this width).
     ===================================================================================================================== */
  html.app-look body .im-hdr .im-nav {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 2;
    padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px)); border-radius: 28px 28px 0 0; border: 0;
    background: var(--sa-card); color: var(--brand-plum-deepest);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: 0 -20px 40px -24px rgba(var(--brand-plum-deepest-rgb), .5);
    max-height: calc(100dvh - 60px); overflow-y: auto; overscroll-behavior: contain;
  }
  html.app-look body .im-hdr .im-nav::before { content: ""; display: block; width: 40px; height: 5px; margin: 4px auto 8px; border-radius: 999px; background: rgba(var(--brand-navy-rgb), .22); }
  html.app-look body .im-hdr .im-nav > a {
    display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 0; border-radius: 0;
    border-bottom: 1px solid var(--sa-line); font-size: 16px; font-weight: 500; color: var(--brand-plum-deepest);
  }
  html.app-look body .im-hdr .im-nav > a:last-of-type { border-bottom: 0; }
  html.app-look body .im-hdr .im-nav a.active, html.app-look body .im-hdr .im-nav a[aria-current="page"], html.app-look body.im-hdr-on-dark .im-hdr:not(.is-stuck) .im-nav:not(.has-pill) a.active { background: transparent; font-weight: 700; }
  html.app-look body .im-hdr .im-nav a.active .sa-ic, html.app-look body .im-hdr .im-nav a[aria-current="page"] .sa-ic { background: linear-gradient(160deg, var(--brand-terracotta-wash), rgba(var(--brand-terracotta-tint-rgb), .45)); color: var(--brand-terracotta-deep); }
  html.app-look body .im-hdr .im-nav > a:hover { background: transparent; }
  html.app-look body .im-hdr .im-nav .sa-ic { width: 36px; height: 36px; border-radius: 12px; }
  html.app-look body .im-hdr .im-nav .sa-ic svg { width: 20px; height: 20px; }
  html.app-look body .im-hdr .im-nav .sa-nav-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
  html.app-look body .im-hdr .im-nav .sa-nav-foot .sa-pill { padding: 0 18px; border-radius: 999px; min-height: 50px; font-size: 15.5px; }
  html.app-look .sa-backdrop { position: fixed; inset: 0; z-index: 1; background: rgba(var(--brand-plum-deepest-rgb), .45); }
  html.app-look body:has(#main-nav.is-open) .im-hdr .sa-backdrop { display: block; }

  /* =====================================================================================================================
     3. Sticky bottom action bar (C-frame-31; C1): after the hero, Contact · Get Access or the page's own main action.
     ===================================================================================================================== */
  html.app-look .sa-cta {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(var(--brand-cream-rgb), .97); border-top: 1px solid var(--sa-line);
    transform: translateY(110%); transition: transform .28s cubic-bezier(.2, .7, .2, 1);
  }
  html.app-look body.sa-cta-on .sa-cta { transform: none; }
  html.app-look body:has(#main-nav.is-open) .sa-cta, html.app-look body:has(.access-modal.is-open) .sa-cta, html.app-look body:has(#chat-widget-panel.is-open) .sa-cta { transform: translateY(110%); }
  html.app-look .sa-pill {
    height: 50px; border: 0; border-radius: 999px; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-size: 15.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
    background: var(--sa-soft); color: var(--brand-plum-deepest);
  }
  html.app-look .sa-pill--fill { background: var(--sa-fill); color: #FFFFFF; }
  html.app-look .sa-pill--ink { background: var(--brand-plum-deepest); color: var(--brand-cream); }
  html.app-look body.sa-has-cta { padding-bottom: 0; }
  html.app-look body.sa-has-cta footer.site-footer, html.app-look body.sa-has-cta footer.ih-foot { padding-bottom: calc(96px + var(--sa-cta-h) + env(safe-area-inset-bottom, 0px)); }
  html.app-look body.sa-has-cta.sa-cta-on #chat-widget-root { bottom: calc(var(--sa-cta-h) + 12px + env(safe-area-inset-bottom, 0px)); }

  /* =====================================================================================================================
     4. Footer (C-frame-14–19; C2; artboard 38): link columns become accordion rows; the disclosures a card with
        "Show all 3 points"; legal row links 44px.
     ===================================================================================================================== */
  html.app-look footer.ih-foot .ih-fgrid, html.app-look footer.site-footer .footer-grid { grid-template-columns: 1fr; gap: 0; }
  html.app-look .sa-acc-btn {
    width: 100%; min-height: 56px; border: 0; padding: 0; background: transparent; font: inherit; color: inherit; text-align: left;
    display: flex; align-items: center; gap: 12px; cursor: pointer; border-top: 1px solid var(--im-line-dk);
  }
  html.app-look .sa-acc-btn b { flex: 1; font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; }
  html.app-look .sa-acc-btn .sa-chev { width: 20px; height: 20px; transition: transform .2s; flex: none; }
  html.app-look .sa-acc-btn[aria-expanded="true"] .sa-chev { transform: rotate(180deg); }
  html.app-look footer .sa-acc > h4 { display: none; }
  html.app-look footer .sa-acc > ul { display: none; margin: 0; padding: 0 0 8px; }
  html.app-look footer .sa-acc.is-open > ul { display: block; }
  html.app-look footer .sa-acc > ul a { display: flex; align-items: center; min-height: 44px; font-size: 15px; }
  html.app-look footer .sa-acc:last-child { border-bottom: 1px solid var(--im-line-dk); }
  html.app-look footer .footer-disclosures { margin-top: 18px; padding: 14px 16px; border-radius: 18px; background: rgba(var(--brand-cream-rgb), .06); }
  html.app-look footer .footer-disclosures .sa-more { color: var(--brand-cream); }
  html.app-look footer .ih-flinks a, html.app-look footer .footer-bottom a, html.app-look footer .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }

  /* =====================================================================================================================
     5. Shared phone patterns: card, "Show all N points", accordion row, swipe cards with dots, jump bar, segmented tabs
     ===================================================================================================================== */
  html.app-look .sa-more { display: inline-flex; align-items: center; height: 44px; padding: 0; border: 0; background: transparent; font: inherit;
    font-size: 14.5px; font-weight: 600; color: var(--brand-terracotta-deep); cursor: pointer; }
  html.app-look .im-panel--dark .sa-more, html.app-look .im-panel--plum .sa-more { color: var(--brand-terracotta-tint); }
  html.app-look .sa-hide { display: none !important; }

  html.app-look .sa-swipe { display: flex !important; grid-template-columns: none !important; gap: 12px !important; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-left: calc(-1 * var(--im-pad)); margin-right: calc(-1 * var(--im-pad)); padding: 2px var(--im-pad) 6px; scroll-padding: 0 var(--im-pad);
    scrollbar-width: none; overscroll-behavior-x: contain; }
  html.app-look .sa-swipe::-webkit-scrollbar { display: none; }
  html.app-look .sa-swipe > * { flex: 0 0 84%; scroll-snap-align: start; min-width: 0; }
  html.app-look .sa-swipe > .im-reveal, html.app-look .sa-swipe .im-reveal { opacity: 1 !important; transform: none !important; }
  html.app-look .sa-swipe-card { background: var(--sa-card); border-radius: 22px; padding: 18px !important; box-shadow: var(--sa-shadow); }
  html.app-look .im-panel--dark .sa-swipe-card, html.app-look .im-panel--plum .sa-swipe-card, html.app-look .ih-hero .sa-swipe-card { background: rgba(var(--brand-cream-rgb), .08); box-shadow: inset 0 0 0 1px var(--im-line-dk); }
  html.app-look .sa-dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
  html.app-look .sa-dots i { width: 6px; height: 6px; border-radius: 999px; background: rgba(var(--brand-navy-rgb), .25); transition: width .2s; }
  html.app-look .sa-dots i.is-on { width: 18px; background: var(--brand-plum-deepest); }
  html.app-look .im-panel--dark .sa-dots i, html.app-look .im-panel--plum .sa-dots i { background: rgba(var(--brand-cream-rgb), .3); }
  html.app-look .im-panel--dark .sa-dots i.is-on, html.app-look .im-panel--plum .sa-dots i.is-on { background: var(--brand-cream); }

  html.app-look .sa-jump { position: sticky; top: 60px; z-index: 50; display: flex; gap: 8px; overflow-x: auto; padding: 8px 20px 12px;
    background: rgba(var(--brand-cream-rgb), .96); border-bottom: 1px solid var(--sa-line); scrollbar-width: none; }
  html.app-look .sa-jump::-webkit-scrollbar { display: none; }
  html.app-look .sa-jump a { flex: none; height: 40px; padding: 0 16px; border-radius: 999px; display: flex; align-items: center; gap: 6px;
    background: var(--sa-soft); color: var(--brand-plum-deepest); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  html.app-look .sa-jump a[aria-current="true"] { background: var(--brand-plum-deepest); color: var(--brand-cream); }
  html.app-look .sa-jump a .im-tile { display: none; }

  html.app-look .sa-acc-row { width: 100%; min-height: 58px; border: 0; padding: 0; background: transparent; font: inherit; color: inherit; text-align: left;
    display: flex; align-items: center; gap: 12px; cursor: pointer; }
  html.app-look .sa-acc-row > b, html.app-look .sa-acc-row > span.sa-acc-t { flex: 1; font-size: 16px; font-weight: 600; }
  html.app-look .sa-acc-row .sa-chev { width: 20px; height: 20px; flex: none; transition: transform .2s; }
  html.app-look .sa-acc-row[aria-expanded="true"] .sa-chev { transform: rotate(180deg); }
  html.app-look .sa-pc, html.app-look .sa-h3 { display: none !important; }

  html.app-look .sa-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--brand-sand-panel); }
  html.app-look .sa-tabs button { flex: 1; height: 44px; min-height: 44px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 14px;
    font-weight: 600; color: var(--brand-muted); cursor: pointer; }
  html.app-look .sa-tabs button[aria-selected="true"] { background: var(--sa-card); color: var(--brand-plum-deepest); box-shadow: 0 1px 2px rgba(var(--brand-plum-deepest-rgb), .12); }

  /* =====================================================================================================================
     6. The rows inside the two sheets (contact picker, help "All topics"). The sheet itself is lane 1's IMApp.sheet()
        (grabber, title, 44px close circle, the shared lock, Back/Esc/swipe close); only the 56px rows are drawn here.
     ===================================================================================================================== */
  html.app-look .sa-row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; border: 0; border-bottom: 1px solid var(--sa-line);
    background: transparent; font: inherit; color: var(--brand-plum-deepest); text-align: left; text-decoration: none; padding: 0; cursor: pointer; }
  html.app-look .sa-row:last-child { border-bottom: 0; }
  html.app-look .sa-row b { flex: 1; font-size: 15.5px; font-weight: 500; }
  html.app-look .sa-row b small { display: block; font-size: 12.5px; font-weight: 400; color: var(--brand-muted); margin-top: 2px; }
  html.app-look .sa-sheet-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 .sa-row[aria-selected="true"] b, html.app-look .sa-row[aria-current="page"] b { font-weight: 700; }
  html.app-look .sa-radio { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.75px rgba(var(--brand-navy-rgb), .3); flex: none; display: flex; align-items: center; justify-content: center; }
  html.app-look .sa-row[aria-selected="true"] .sa-radio { background: var(--brand-plum-deepest); box-shadow: none; color: #FFFFFF; }
  html.app-look .sa-radio svg { width: 14px; height: 14px; }

  /* =====================================================================================================================
     7. Homepage (artboards 12–13)
     ===================================================================================================================== */
  /* C-index-1/2: the plum hero band, rounded at its foot; two stacked 54px pills (the badge is gone, as approved) */
  html.app-look body.ih-page .ih-hero { border-radius: 0 0 32px 32px; min-height: 0; }
  html.app-look body.ih-page .ih-hero-in { padding: 82px 20px 0; }
  html.app-look body.ih-page .ih-hero h1 { font-size: 42px; line-height: 1.02; letter-spacing: -.04em; }
  html.app-look body.ih-page .ih-hero .im-lead { margin: 14px 0 22px; font-size: 16px; }
  html.app-look body.ih-page .ih-btns { display: flex; flex-direction: column; gap: 10px; }
  html.app-look body.ih-page .ih-btns .im-btn { width: 100%; height: 54px; font-size: 16px; }
  html.app-look body.ih-page .ih-btns .im-btn--fill { background: var(--sa-fill); color: #FFFFFF; box-shadow: 0 12px 24px -12px rgba(var(--brand-terracotta-deep-rgb), .9); }
  /* C-index-3/4: the ticker, "Delayed" shown again beside "Markets" (Restore) */
  html.app-look body.ih-page .ih-tape { margin-top: 22px; padding-bottom: 26px; }
  html.app-look body.ih-page .ih-tape-lab em { display: inline; }
  /* C-index-6, 8, 10, 13, 18, 24: swipe cards (site-app.js adds .sa-swipe + dots) */
  html.app-look body.ih-page .ih-steps4.sa-swipe > li, html.app-look body.ih-page .ih-values .sa-swipe > .ih-vrow { border: 0; }
  html.app-look body.ih-page .ih-tiles.sa-swipe > .ih-tile { flex-basis: 88%; }
  html.app-look body.ih-page .ih-rail.sa-swipe { margin-top: 0; }
  /* C-index-14: the rail arrows back on phones, two 44px pills in the section head (Restore) */
  html.app-look body.ih-page .ih-rbtns { display: flex; gap: 8px; }
  html.app-look body.ih-page .ih-rbtn { width: 44px; height: 44px; }
  /* C-index-11: the numbers as a 2x2 plum panel */
  html.app-look body.ih-page .ih-numbers.im-panel--dark { margin: 18px 20px 0; padding: 0; border-radius: 24px; }
  html.app-look body.ih-page .ih-ncard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  html.app-look body.ih-page .ih-nrow { padding: 18px; border: 0; border-right: 1px solid var(--im-line-dk); border-bottom: 1px solid var(--im-line-dk); gap: 4px; flex-direction: column-reverse; align-items: flex-start; }
  html.app-look body.ih-page .ih-nrow:nth-child(2n) { border-right: 0; }
  html.app-look body.ih-page .ih-nrow:nth-child(n+3) { border-bottom: 0; }
  html.app-look body.ih-page .ih-nrow .ih-v { font-size: 28px; }
  html.app-look body.ih-page .ih-nrow .ih-v small { font-size: 19px; }
  /* C-index-21: account types as a segmented switch (artboard 13); one card at a time */
  html.app-look body.ih-page .ih-agrid.sa-tabbed .ih-acard.sa-tab-off { display: none; }
  html.app-look body.ih-page .sa-acct-tabs { margin-bottom: 12px; }

  /* =====================================================================================================================
     8. Inner pages: hero, cards, services / legal / resources / about / contact / blog / help
     ===================================================================================================================== */
  html.app-look body.ip-page .ip-hero { padding: 28px 20px 30px; }
  /* Services (artboard 14): each service a card; the first open, the others a row that opens (C-services-3–8, 11) */
  html.app-look body.ip-services .ip-svc { margin: 12px 20px 0; padding: 20px !important; border-radius: 22px; box-shadow: var(--sa-shadow); }
  html.app-look body.ip-services .ip-svc:not(.im-panel--dark) { background: var(--sa-card); }
  html.app-look body.ip-services .ip-svc.sa-closed > :not(.sa-svc-row) { display: none !important; }
  html.app-look body.ip-services .ip-svc:not(.sa-closed) > .sa-svc-row { display: none; }
  html.app-look body.ip-services .sa-svc-row small { display: block; font-size: 12.5px; color: var(--brand-muted); font-weight: 400; margin-top: 2px; }
  html.app-look body.ip-services .im-panel--dark .sa-svc-row small { color: rgba(var(--brand-cream-rgb), .72); }
  /* Legal (artboard 34): parts as accordion rows; long lists "Show all N points"; an anchor opens its card */
  html.app-look body.ip-legal .ip-toc { display: none; }
  html.app-look body.ip-legal .ip-doc > section { background: var(--sa-card); border-radius: 22px; padding: 4px 20px 16px; margin: 12px 0 0; box-shadow: var(--sa-shadow); }
  html.app-look body.ip-legal .ip-doc .sa-acc-row { border-top: 1px solid var(--sa-line); }
  /* Resources (C-resources-2, 4, 6, 9): jump bar, strategies as accordion rows, steps as swipe cards */
  html.app-look body.ip-resources .res-item.sa-closed > :not(.res-ttl) { display: none !important; }
  html.app-look body.ip-resources .res-ttl { cursor: pointer; }
  html.app-look body.ip-resources .sa-res-tog { width: 44px; min-height: 44px; margin-left: auto; justify-content: center; }
  html.app-look body.ip-resources .workflow-table tr.sa-closed > td:not(:first-child) { display: none !important; }
  html.app-look body.ip-resources .workflow-table td:first-child[role="button"] { cursor: pointer; min-height: 44px; }
  /* About (C5): leaders a simple stacked list; Connect's "#" links hidden until real addresses exist */
  html.app-look body.ip-about .ip-team { grid-template-columns: 1fr !important; }
  /* Contact (artboard 35): the three dropdowns open the picker sheet (site-app.js); the form card first */
  html.app-look body.ip-contact .custom-select.is-open .custom-select-options { display: none !important; }
  /* Help (artboard 37): the "All topics" pill under the article's tag row */
  html.app-look body.ip-help .sa-topics-btn { margin-top: 14px; height: 44px; font-size: 14.5px; }
  html.app-look body.ip-help .hc-side { display: none; }


/* Outside the phone block: the pieces site-app.js adds must not show on a desktop, and the about "#" links stay hidden
   everywhere until real addresses exist (APP-LOOK.md, faults: "hide them until real addresses exist"). */
.sa-cta, .sa-jump, .sa-backdrop, .sa-dots, .sa-acc-btn, .sa-acc-row, .sa-more, .sa-svc-row, .sa-tabs, .sa-topics-btn, .im-nav .sa-ic, .im-nav .sa-nav-foot { display: none; }
/* phone / installed app (html.app-look, set by app-look.js) */
  html.app-look .sa-cta, html.app-look .sa-dots, html.app-look .sa-acc-btn, html.app-look .sa-tabs { display: grid; }
  html.app-look .sa-dots { display: flex; }
  html.app-look .sa-acc-btn, html.app-look .sa-svc-row, html.app-look .sa-acc-row, html.app-look .sa-topics-btn { display: flex; }
  html.app-look .sa-tabs { display: flex; }
  html.app-look .sa-jump { display: flex; }
  html.app-look .sa-more { display: inline-flex; }
  html.app-look .im-nav .sa-ic { display: inline-flex; }

body.ip-about .ip-clink[href="#"] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .sa-cta, .sa-acc-btn .sa-chev, .sa-acc-row .sa-chev, .sa-dots i { transition: none; }
}

/* APP LOOK FIX F4 (installed app only): every line of the pitch pages is Bricolage Grotesque, including the one
   .mw-editorial line (Newsreader by design in a browser). */
html.app-look .mw-editorial { font-family: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-style: normal; }
