/* ─────────────────────────────────────────────────────────────
   Gridline — mobile optimisations
   Loaded last on each page; preserves the carrier-portal look,
   just makes the layout actually usable below ~760px.
───────────────────────────────────────────────────────────── */

@media (max-width:760px){

  html{ -webkit-text-size-adjust:100%; }

  /* ===== Wrap ===== */
  .wrap{ width:100%; border:0; overflow-x:hidden; }

  /* ===== Utility strip ===== */
  .util{ font-size:11.5px; }
  .util-inner{
    width:100%;
    flex-direction:column; align-items:stretch;
    gap:5px; padding:6px 10px;
  }
  .util .l, .util .r{ display:flex; flex-wrap:wrap; gap:4px 12px; }
  .util .l span, .util .r span{ margin-right:0; }
  .util .pipe{ display:none; }

  /* ===== Masthead ===== */
  .mast{
    flex-direction:column; align-items:flex-start;
    gap:10px; padding:12px 14px 10px;
  }
  .mast-r{
    width:100%; justify-content:space-between;
    align-items:flex-start; gap:12px; flex-wrap:wrap;
  }
  .mast-search{ display:none; }
  .mast-phone{ text-align:left; }
  .mast-phone .num{ font-size:18px; }
  .logo .name{ font-size:26px; }
  .logo .tag{ font-size:10.5px; }

  /* ===== Primary nav — stacked, tap-friendly ===== */
  .nav ul{ width:100%; flex-direction:column; flex-wrap:nowrap; }
  .nav li{ width:100%; }
  .nav li.cta{ margin-left:0; }
  .nav a{
    padding:12px 16px; font-size:13px;
    border-right:0;
    border-bottom:1px solid #0F1F36;
  }
  .nav li:last-child a{ border-bottom:0; }
  .nav a.on{ border-bottom:3px solid #C68B3A; margin-bottom:0; }

  /* ===== Breadcrumb ===== */
  .crumb{
    flex-direction:column; gap:2px;
    padding:6px 12px; font-size:11.5px;
  }

  /* ===== Bulletin ===== */
  .bulletin{
    flex-direction:column; align-items:flex-start;
    gap:4px; padding:8px 12px; font-size:12px; line-height:1.45;
  }

  /* ===== Sidebar collapse ===== */
  .page{ grid-template-columns:1fr; }
  .side{ display:none; }

  /* ===== Hero ===== */
  .hero{ grid-template-columns:1fr; }
  .hero-l{ padding:14px 14px 14px; }
  .hero-l h1{ font-size:22px; line-height:1.25; }
  .hero-l p{ font-size:13px; max-width:none; }
  .hero-l .ctas{ display:flex; flex-wrap:wrap; gap:6px; }
  .hero-l .ctas .btn{
    flex:1 1 calc(50% - 4px);
    text-align:center; padding:10px 10px; font-size:12.5px;
  }
  .track{ padding:12px 14px; border-left:0; border-top:1px solid #0F1F36; }
  .track input, .track select, .track textarea{
    font-size:13px; padding:6px 8px;
  }
  .track .row .btn{ padding:8px 14px; font-size:12.5px; }

  /* ===== Section headers / bodies ===== */
  .secbar{
    padding:8px 14px;
    flex-direction:column; align-items:flex-start; gap:2px;
  }
  .secbar h2{ font-size:17px; line-height:1.2; }
  .secbar .sub{ font-size:10.5px; }
  .sec{ padding:14px 12px 16px; }
  .sec p.lede{ font-size:13px; line-height:1.55; max-width:none; }

  /* ===== Feature boxes / two-col / IO / pilot ===== */
  .feat3{ grid-template-columns:1fr; }
  .featbox{ padding:12px; }
  .featbox h3{ font-size:14px; }
  .featbox p{ font-size:12.5px; line-height:1.55; }

  .twocol{ grid-template-columns:1fr; gap:14px; }
  .twocol .aside{ order:2; padding:10px; }
  .twocol .aside .quote{ font-size:13px; }

  .io2{ grid-template-columns:1fr; }
  .io2 .col + .col{ border-left:0; border-top:1px solid var(--rule); }

  .pilot-grid{ grid-template-columns:1fr; }
  .metrics-old{ grid-template-columns:1fr 1fr; }
  .metrics-old .v{ font-size:18px; }

  /* ===== Buttons sized for thumbs ===== */
  .btn{ padding:9px 14px; font-size:12.5px; }

  /* ===== Tables: horizontal scroll without breaking row layout ===== */
  table.dt{
    display:block;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    max-width:100%;
    white-space:nowrap;
  }
  table.dt > caption{ display:block; white-space:normal; }
  /* Compatibility table benefits from wrapped text, not horizontal scroll */
  table.dt.compat{ white-space:normal; }
  table.dt.compat td:first-child{ width:auto; min-width:120px; }

  /* ===== Observe / quote panel ===== */
  .observe{ grid-template-columns:1fr; padding:12px; gap:10px; }
  .observe .pull{ font-size:14px; }

  /* ===== Workbench mock — keep desktop proportions in a sideways scroller ===== */
  .wb{ overflow:hidden; }
  .wb-title{ padding:4px 8px; }
  .wb-title > span:first-child{
    font-size:10.5px; flex:1; min-width:0;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
  .wb-menu,
  .wb-tabs{ overflow-x:auto; white-space:nowrap; }
  .wb-menu span, .wb-tab{ display:inline-block; }
  .wb-body{ overflow-x:auto; padding:8px; }
  .wb-body > *{ min-width:680px; }
  .statusbar{
    font-size:10.5px; gap:8px; flex-wrap:wrap; padding:5px 8px;
  }
  .statusbar > span{ white-space:nowrap; }

  /* ===== CTA strip ===== */
  .cta-strip{
    flex-direction:column; align-items:stretch;
    gap:10px; padding:14px 12px;
  }
  .cta-strip h3{ font-size:16px; }
  .cta-strip .ctas{ display:flex; flex-wrap:wrap; gap:6px; }
  .cta-strip .ctas .btn{
    flex:1 1 calc(50% - 3px);
    text-align:center; padding:10px 8px;
  }

  /* ===== Compliance / membership badge strips ===== */
  .compli{ padding:10px 12px; gap:6px 8px; }
  .compli .ttl{ width:100%; margin-right:0; }

  /* ===== Footer ===== */
  .footer{ padding:14px 14px 8px; }
  .footer .ftgrid{ grid-template-columns:1fr; gap:14px; }
  .footer h5{ font-size:12px; }
  .ftbot{ flex-direction:column; align-items:flex-start; gap:6px; }
  .ftbot .links a + a{ margin-left:6px; padding-left:6px; }

  /* ===== FAQ ===== */
  .faq dt{ font-size:13.5px; }
  .faq dd{ font-size:12.5px; }

  /* ════════════════ Demo.html-specific ════════════════ */

  /* File tiles in Demo (.ftgrid lives inside .sec, not .footer) */
  .sec .ftgrid{ grid-template-columns:1fr; }

  /* KPI strip → 2-up grid with proper borders */
  .kpirow{ grid-template-columns:repeat(2,1fr); }
  .kpirow .k{
    border-right:1px dotted var(--rule);
    border-bottom:1px dotted var(--rule);
  }
  .kpirow .k:nth-child(2n){ border-right:0; }
  .kpirow .k:nth-last-child(-n+2){ border-bottom:0; }
  .kpirow .k:nth-last-child(1):nth-child(2n+1){
    grid-column:1 / -1;
  }

  /* Evidence textarea panel + review cards */
  .ev-panel{ grid-template-columns:1fr; }
  .rvgrid{ grid-template-columns:1fr; }

  /* Action bar */
  .actionbar{ padding:8px; gap:6px; }
  .actionbar .grow{ display:none; }

  /* Flash toast */
  #flashbar{
    left:10px; right:auto;
    transform:translateX(0) translateY(40px);
    bottom:10px; padding:8px 12px;
    max-width:calc(100vw - 20px);
  }
  #flashbar.on{ transform:translateX(0) translateY(0); }

  /* ════════════════ Inline-styled grids inside Landing workbench ════════════════
     The three sub-panels under the workbench table use an inline
     `grid-template-columns:1fr 1fr 1fr` style. They live inside .wb-body
     which is already overflow-x:auto + min-width:680px, so the 3-column
     layout is preserved horizontally — the user scrolls sideways to see
     them, matching the spirit of "this is a desktop console preview". */
}

/* ===== Tiny phones ===== */
@media (max-width:380px){
  .hero-l .ctas .btn,
  .cta-strip .ctas .btn{ flex:1 1 100%; }
  .logo .name{ font-size:22px; }
  .mast-phone .num{ font-size:16px; }
  .secbar h2{ font-size:16px; }
}
