/* Consciousness Factory — phone-only layout.
   Loaded in the <head> of every page so nothing jumps after the page appears.
   "Phone" = narrow screen (iPhone/Android held upright) or a touch screen held sideways.
   Computers and tablets are not affected by anything in this file. */

/* Tap-to-open wrappers (cf-phone.js) are invisible outside phones */
.cfp-fold, .cfp-fold-body { display: contents; }
.cfp-fold-btn, .cfp-phone-only { display: none; }

@media (max-width: 767px), (pointer: coarse) and (max-height: 500px) {

  /* ── No Analytics on phones (the page is built for bigger screens) ── */
  a[href^="thoughtanal.html"],
  li:has(> a[href^="thoughtanal.html"]),
  #openVisualsBtn { display: none !important; }

  /* ── Slim page banner: a title bar instead of half a screen ──
     (the home page hero keeps its full size) */
  html body header:not(#hero-header):not(.r-cover) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 22px 18px 20px !important;
  }
  html body header:not(#hero-header):not(.r-cover) h1 {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
    margin: 0 0 6px !important;
  }
  html body header:not(#hero-header):not(.r-cover) p {
    font-size: 14px !important;
    line-height: 1.45 !important;
    margin: 0 !important;
  }
  html body header:not(#hero-header):not(.r-cover) .hdr-eyebrow,
  html body header:not(#hero-header):not(.r-cover) .hero-eyebrow { display: none !important; }
  html body header:not(#hero-header):not(.r-cover) .hdr-cta,
  html body header:not(#hero-header):not(.r-cover) .hero-btn {
    margin-top: 12px !important;
    padding: 9px 18px !important;
    font-size: 14px !important;
  }

  /* ── Tap-to-open sections (How it works, Communities, Cities, Home) ──
     cf-phone.js turns marked sections into these. */
  .cfp-phone-only { display: block; }
  .cfp-fold, .cfp-fold-body { display: block; }
  .cfp-fold { border: 1px solid rgba(0,0,0,.1); border-radius: 14px; margin: 14px 0; background: rgba(255,255,255,.6); }
  .cfp-fold[data-tone="dark"] { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.04); }
  .cfp-fold-body { padding: 0 16px 16px; }
  .cfp-fold > .cfp-fold-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; background: none; border: 0; padding: 18px 18px; margin: 0;
    font: 600 17px/1.3 'DM Sans', Inter, sans-serif; color: inherit; text-align: left; cursor: pointer;
  }
  .cfp-fold > .cfp-fold-btn::after {
    content: '+'; font-size: 22px; font-weight: 400; line-height: 1; opacity: .6; flex: none;
  }
  .cfp-fold.open > .cfp-fold-btn::after { content: '–'; }
  .cfp-fold:not(.open) > .cfp-fold-body { display: none !important; }
}
