/* RC26R201 — Home First-Viewport Fit
 * Surgical desktop geometry fix over R200. Home only. Functional owners NO DELTA.
 */

@media (min-width:941px){
  /* The public header + studio must fit inside the real desktop viewport used by direction.
   * Remove the R200 520px floor that forced the studio beyond ~600px browser viewports. */
  body.home.ottoni-public-software-surface .ot199-studio{
    height:clamp(486px,calc(100svh - 102px),650px)!important;
    min-height:0!important;
    margin:10px auto 6px!important;
  }

  body.home.ottoni-public-software-surface .ot199-studio-bar{
    height:50px!important;
    min-height:50px!important;
  }
  body.home.ottoni-public-software-surface .ot199-studio-body{
    height:calc(100% - 50px)!important;
    min-height:0!important;
  }
  body.home.ottoni-public-software-surface .ot199-stage{
    min-height:0!important;
    grid-template-rows:50px minmax(0,1fr)!important;
  }
  body.home.ottoni-public-software-surface .ot199-stage-toolbar{
    min-height:0!important;
    padding-inline:13px!important;
  }

  /* Keep the canvas visually strong while recovering vertical headroom. */
  body.home.ottoni-public-software-surface .ot199-canvas-copy{
    top:clamp(30px,5.4vh,48px)!important;
  }
  body.home.ottoni-public-software-surface .ot199-canvas-copy h1{
    font-size:clamp(40px,4.35vw,62px)!important;
    line-height:.94!important;
  }
  body.home.ottoni-public-software-surface .ot199-canvas-copy p{
    margin-top:12px!important;
  }
  body.home.ottoni-public-software-surface .ot199-canvas-footer{
    bottom:12px!important;
  }

  /* Inspector must fit completely, including its primary and secondary actions. */
  body.home.ottoni-public-software-surface .ot199-inspector{
    min-height:0!important;
    overflow:hidden!important;
    padding:10px 12px!important;
    gap:7px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-head{
    gap:3px!important;
    padding:0 2px 8px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-head>b{
    font-size:16px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-head>small{
    font-size:8px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-section{
    padding:9px 10px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-section>strong{
    margin-top:5px!important;
    font-size:12px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-section>p{
    margin-top:4px!important;
    line-height:1.35!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-section ul{
    margin-top:7px!important;
    gap:4px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-metrics{
    gap:5px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-metrics span{
    padding:7px 4px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-metrics b{
    font-size:16px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-actions{
    margin-top:auto!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:6px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-actions a{
    min-height:34px!important;
    padding:0 9px!important;
    white-space:nowrap!important;
  }
}

/* Short desktop/laptop browser windows: prioritize complete action visibility. */
@media (min-width:941px) and (max-height:680px){
  body.home.ottoni-public-software-surface .ot199-studio{
    height:calc(100svh - 100px)!important;
    min-height:470px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-section.is-soft{
    padding-top:8px!important;
    padding-bottom:8px!important;
  }
  body.home.ottoni-public-software-surface .ot199-inspector-section li{
    font-size:7.5px!important;
  }
}
