/* BankStatementDesk — mobile override layer for the exported design pages
   (home, blog index, tools, workflows, documentation).
   The design export ships desktop-only layout: inline styles, fixed
   multi-column grids and no media queries. Every rule below lives inside a
   max-width media query, so desktop rendering is completely untouched.
   Linked after each page's own styles; !important is used only where the
   export's inline styles must yield at phone widths. */

@media (max-width: 860px) {

  /* ---------- page frame ---------- */
  .p { min-height: 0 !important; }
  main { padding: 40px 20px 0 !important; }
  header > div,
  .ft > div { padding-left: 20px !important; padding-right: 20px !important; }
  img, video { max-width: 100% !important; height: auto !important; }
  svg { max-width: 100%; }
  pre { overflow-x: auto !important; }

  /* ---------- header: logo + CTA on row one, nav scrolls on its own row ---------- */
  header > div {
    flex-wrap: wrap !important;
    height: auto !important;
    min-height: 64px;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    row-gap: 8px !important;
    column-gap: 16px !important;
  }
  header > div > :first-child { font-size: 17px !important; min-width: 0; }
  header nav.nav {
    order: 3;
    flex: 1 1 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 22px !important;
    padding-bottom: 2px;
  }
  header nav.nav::-webkit-scrollbar { display: none; }
  header nav.nav a { white-space: nowrap; padding: 10px 2px; }
  header .btn {
    height: auto !important;
    min-height: 42px;
    padding: 8px 14px !important;
    white-space: nowrap;
  }

  /* ---------- type scale: full words, nothing clipped ---------- */
  h1 { font-size: clamp(36px, 10.5vw, 46px) !important; line-height: 1.06 !important; letter-spacing: -0.01em !important; }
  .h2 { font-size: clamp(28px, 8.4vw, 36px) !important; line-height: 1.12 !important; }
  h1, h2, h3, p, li { overflow-wrap: break-word; }

  /* ---------- every multi-column layout stacks to one column ---------- */
  [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }
  .g3, .g2 { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
  [style*="display:flex"], [style*="display: flex"] { flex-wrap: wrap !important; }

  /* ---------- buttons: text wraps inside the button, never over it ---------- */
  .btn {
    height: auto !important;
    min-height: 48px;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    white-space: normal !important;
    text-align: center;
    justify-content: center;
  }

  /* ---------- cards and list rows ---------- */
  .c, .step { padding: 20px !important; }
  .ls li { flex-wrap: wrap; row-gap: 2px; }

  /* ---------- sample-job card mini tables (home) ---------- */
  .tx {
    grid-template-columns: 44px minmax(0, 1fr) 64px 56px !important;
    gap: 6px !important;
    font-size: 12px;
  }
  .row {
    grid-template-columns: 88px minmax(0, 1fr) 84px !important;
    gap: 8px !important;
    font-size: 12px;
  }

  /* ---------- documentation sidebar becomes a stacked link list ---------- */
  .pg nav a { padding-top: 11px !important; padding-bottom: 11px !important; }

  /* ---------- footer stacks ---------- */
  .ft { margin-top: 48px !important; }
  .ft > div { row-gap: 10px !important; }
  .ft a { display: inline-block; padding: 6px 0; margin-right: 18px; }
}

/* Narrow phones: tighten the header so logo + workspace CTA share row one. */
@media (max-width: 480px) {
  header > div { padding-left: 16px !important; padding-right: 16px !important; column-gap: 10px !important; }
  header > div > :first-child { font-size: 15px !important; }
  header .btn { font-size: 14px; padding: 8px 11px !important; }
  main { padding-left: 16px !important; padding-right: 16px !important; }
  .ft > div { padding-left: 16px !important; padding-right: 16px !important; }
}
