/* CF responsive calibration — mobile and tablet only. Desktop is untouched. */

/* mobile nav chrome is inert until the breakpoint */
[data-nav-mobile] { display: none; }
[data-nav-drawer] { display: none; }

@media (max-width: 900px) {
  :root {
    --section-y: 60px;
    --section-y-compact: 44px;
  }

  /* desktop nav rows off, compact bar on */
  [data-nav-util], [data-nav-mark], [data-nav-main], [data-nav-sub] { display: none !important; }
  [data-nav-panel] { display: none !important; }
  [data-nav-mobile] { display: block; }
  [data-nav-drawer][data-open="1"] { display: block; }

  .cf-container { padding-left: 20px !important; padding-right: 20px !important; }

  /* hero: shorter, tighter, copy still low */
  main > section:first-of-type { min-height: min(74vh, 620px) !important; }
  main > section:first-of-type .cf-container {
    padding-top: 40px !important;
    padding-bottom: 36px !important;
  }

  /* logo walls */
  [data-logo-wall] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

  /* wide fixed columns collapse */
  main [style*="flex:0 1 340px"], main [style*="flex:0 1 380px"], main [style*="flex:0 1 280px"] { flex-basis: 100% !important; }
}

@media (max-width: 640px) {
  :root { --section-y: 48px; }

  [data-logo-wall] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }

  /* tables become stacked records — min-width would otherwise keep them scrolling */
  main table { min-width: 0 !important; }
  main table thead { display: none; }
  main table, main table tbody, main table tr, main table td { display: block; width: 100%; }
  main table tr {
    border-bottom: 1px solid var(--border-hairline);
    padding: 14px 0;
  }
  main table td {
    border: 0 !important;
    padding: 2px 0 !important;
    text-align: left !important;
    white-space: normal !important;
  }
  main table td:first-child {
    font-weight: 600;
    color: var(--text-heading);
    padding-bottom: 4px !important;
  }

  /* type floors — nothing below comfortable reading size */
  main p, main li { font-size: 15px !important; line-height: 1.6 !important; }
  main .cf-body-lg { font-size: 17px !important; }
  main .cf-eyebrow { letter-spacing: .14em !important; }

  /* grids that still try to sit two-up */
  main [style*="minmax(230px"], main [style*="minmax(250px"], main [style*="minmax(256px"],
  main [style*="minmax(280px"], main [style*="minmax(300px"] { grid-template-columns: 1fr !important; }

  /* accordion header rows: title + chevron on one line, meta stacked beneath */
  main [data-role-row] {
    grid-template-columns: 1fr 28px !important;
    gap: var(--space-3) var(--space-5) !important;
  }
  main [data-role-row] > *:nth-child(1) { grid-column: 1; grid-row: 1; }
  main [data-role-row] > *:nth-child(4) { grid-column: 2; grid-row: 1; }
  main [data-role-row] > *:nth-child(2),
  main [data-role-row] > *:nth-child(3) { grid-column: 1 / -1; }

  /* caption and form-hint floor — the 11px eyebrow stays, it is the brand signature */
  main .cf-caption, main .cf-field__hint { font-size: 13px !important; }

  /* touch targets */
  main a[href], main button, [data-nav-drawer] a { min-height: 44px; }
  main a[style*="text-transform:uppercase"], main a[style*="text-transform: uppercase"] {
    display: inline-flex !important;
    align-items: center;
    min-height: 44px;
  }

  /* long unbreakable strings (emails, urls, handles) */
  main a, main td, main p { overflow-wrap: anywhere; }
}

@media (max-width: 420px) {
  .cf-container { padding-left: 16px !important; padding-right: 16px !important; }
  [data-logo-wall] { gap: 10px !important; }
}
