/* ============================================================
   Sawadi Ventures — Mobile design layer (v1)
   Applies ONLY at <=760px. Desktop is untouched.
   Pilot surface: Investor Portal.
   ============================================================ */

/* Bottom nav + sheet are hidden by default (desktop) */
.mnav,.msheet{display:none}

@media (max-width:760px){

  /* ---- Auto-sizing: fluid type that scales with the viewport ---- */
  .page-head h1{font-size:clamp(24px,7vw,34px)!important;line-height:1.06}
  .page-sub{font-size:clamp(13px,3.6vw,15px)!important}
  .dfac-big{font-size:clamp(22px,7.6vw,30px)!important;line-height:1.05;word-break:break-word}
  .kpi .v,.docstat .v{font-size:clamp(17px,5.2vw,22px)!important}

  /* ---- One clean column ---- */
  .portal-layout{display:block!important}
  .grid2,.kpis,.stake-grid,.perf-grid,.review-grid,.review-cards,
  .docstats,.kbgrid,.timeline,.readiness-grid{grid-template-columns:1fr!important}
  .review-hero{grid-template-columns:1fr!important}
  .dfac{flex-direction:column;align-items:flex-start;gap:14px}

  /* ---- Replace the top tab strip with a touch bottom bar ---- */
  .portal-nav{display:none!important}
  .portal-content{padding-bottom:92px!important}

  /* ---- Wide tables scroll horizontally instead of breaking layout ---- */
  .portal-content table{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap}

  /* ---- Comfortable touch spacing ---- */
  .card,.kpi,.docstat{padding:16px!important}
  .btn,.open,.wf-preset{min-height:44px}

  /* ============ Bottom navigation bar ============ */
  .mnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;
    background:rgba(12,12,14,.96);backdrop-filter:blur(14px);
    border-top:1px solid var(--line-soft);
    padding:6px 4px;padding-bottom:calc(6px + env(safe-area-inset-bottom))}
  .mnav.mnav-hide{display:none}
  .mnav button{flex:1;min-width:0;background:none;border:0;color:var(--muted);
    display:flex;flex-direction:column;align-items:center;gap:3px;
    font:inherit;font-size:10px;letter-spacing:.01em;padding:6px 2px;cursor:pointer}
  .mnav button svg{width:22px;height:22px;stroke:currentColor;fill:none;
    stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .mnav button span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mnav button.active{color:var(--red-bright,#f23a42)}

  /* ============ "More" sheet ============ */
  .msheet{display:none;position:fixed;inset:0;z-index:61;background:rgba(0,0,0,.55)}
  .msheet.open{display:block}
  .msheet-card{position:absolute;left:0;right:0;bottom:0;
    background:var(--panel,#151518);border-top:1px solid var(--line,rgba(255,255,255,.11));
    border-top-left-radius:20px;border-top-right-radius:20px;
    padding:8px 12px calc(14px + env(safe-area-inset-bottom))}
  .msheet-grip{width:38px;height:4px;border-radius:99px;background:rgba(255,255,255,.25);margin:8px auto 6px}
  .msheet-card button{display:flex;align-items:center;gap:12px;width:100%;text-align:left;
    background:none;border:0;color:var(--ink,#f3f1ef);font:inherit;font-size:15px;
    padding:15px 12px;border-radius:12px;cursor:pointer}
  .msheet-card button:active{background:var(--panel-2,#1b1b1f)}
}
