/* Pusharoo — layout density layer (desktop, tablet and phones). Loaded LAST on every public page
   (after site.css, guides.css, mobile.css). Owns: wrap width, nav height, section rhythm, hero height,
   first-fold density on home, docs, guides, privacy and the try-it demo.
   Floors kept on purpose: body text and inputs >= 16px, tap targets >= 44px, safe-area insets.
   Rebuilds keep this file: build/common.py and build/seo/build_guides.py link it after mobile.css. */

/* ---------- Width: use more of wide screens ---------- */
:root{--max:1180px}
@media(min-width:1360px){:root{--max:1240px}}
@media(min-width:1680px){:root{--max:1320px}}

/* ---------- Nav: 56px desktop, 52px phones ---------- */
.nav .wrap{height:56px}
html{scroll-padding-top:64px}

/* ---------- Section rhythm (was 72–128px top and bottom) ---------- */
section{padding:clamp(40px,4.6vw,64px) 0}
.mt{margin-top:clamp(24px,3vw,40px)}
.kicker{margin-bottom:8px}
.flow,.pipe,.platforms{margin-top:clamp(24px,3vw,40px)}
.steps3{margin-top:clamp(24px,3vw,36px)}
.faq{margin-top:clamp(20px,2.6vw,32px)}
.browsers{margin-top:24px}
.final .btns{margin-top:22px}
.stats{margin-top:clamp(20px,2.8vw,36px)}
.stat{padding:16px 18px}
.chips{margin-top:18px}

/* ---------- Desktop + tablet (not phone landscape): hero, try-it, docs grid ---------- */
@media(min-width:861px) and (min-height:501px){
  .lead{margin-top:12px}
  /* Home hero: headline, value, CTAs AND the stat strip in the first screen */
  .hero{padding-top:clamp(20px,3vw,44px);padding-bottom:clamp(20px,2.4vw,32px)}
  .hero h1{font-size:clamp(40px,5.4vw,70px);margin-top:12px;line-height:1.03}
  .hero .lead{margin-top:14px;font-size:clamp(18px,1.6vw,21px);line-height:1.42}
  .hero-ctas{margin-top:22px}
  .hero-meta{margin-top:14px}
  .hero .hero-grid{gap:clamp(24px,4vw,56px)}
  .hero-art svg{max-height:min(46vh,440px);width:auto;margin:0 auto}
  /* Try-it: the #try jump lands on the card, not on 128px of padding */
  #try{padding-top:clamp(20px,2.2vw,32px)}
  .demo{padding:clamp(24px,3.4vw,44px)}
  .demo-steps{margin-top:16px}
  .demo-panel{padding:20px;gap:12px}
}
@media(min-width:901px){
  .docs{grid-template-columns:220px minmax(0,1fr);gap:clamp(28px,3vw,40px)}
  .docs aside{top:72px}
  .docs article{max-width:860px}
}

/* ---------- Docs / privacy / guide articles ---------- */
.docs{padding-top:clamp(14px,2vw,28px);padding-bottom:clamp(48px,5vw,72px)}
.docs article h1[style],.docs article .eyebrow+h1{margin-top:10px!important}
.docs article .lead{margin-top:12px}
.docs article h2{margin:40px 0 12px}
.callout{margin:14px 0}

/* Guides: breadcrumb and the category pill share one row; tighter intro and TL;DR */
.g-crumbs{display:inline-flex;margin:0 12px 0 0;vertical-align:middle}
.g-intro .eyebrow,.g-hub .eyebrow{vertical-align:middle}
.docs.g-page article h1{margin-top:6px}
.g-ctas{margin-top:18px}
.g-meta{margin-top:12px}
.g-tldr{margin:20px 0 4px;padding:18px 22px}
.g-fig{margin:24px 0}
.g-cta{margin-top:36px}
.g-hub{padding-top:clamp(12px,2vw,28px);padding-bottom:clamp(44px,5vw,72px)}
.g-hub h1[style]{margin-top:8px!important}
.g-hub .g-cards{margin-top:28px}
.g-hub h2.g-sec{margin-top:36px}
.g-hub h2.g-sec:first-of-type{margin-top:28px}

/* ---------- Tablet portrait (601–860px) ---------- */
@media(min-width:601px) and (max-width:860px) and (min-height:501px){
  .hero{padding-top:24px;padding-bottom:40px}
  .hero h1{margin-top:12px}
  .hero-ctas{margin-top:22px}
  #try{padding-top:28px}
  .demo{padding:28px}
}

/* ---------- Phones ---------- */
@media(max-width:860px){
  .nav .wrap{height:52px}
  html{scroll-padding-top:60px}
  .nav-links{top:calc(52px + env(safe-area-inset-top));max-height:calc(100dvh - 52px - env(safe-area-inset-top))}
}
@media(max-width:600px){
  section{padding:40px 0}
  .hero{padding-top:12px;padding-bottom:32px}
  .hero h1{margin-top:10px}
  .hero .lead{margin-top:10px}
  .hero-ctas{margin-top:16px}
  .hero-meta{margin-top:12px}
  .stats{margin-top:20px}
  #try{padding-top:24px}
  .demo{padding:20px 18px}
  .demo-steps{margin-top:14px}
  .docs{padding-top:10px;padding-bottom:48px}
  .docs article h2{margin:32px 0 10px}
  .docs.g-page{padding-top:4px}
  .g-crumbs{margin-right:8px}
  .g-intro .eyebrow,.g-hub .eyebrow{font-size:13px;padding:5px 11px}
  .g-tldr{margin-top:16px;padding:16px 18px}
  .docs.g-page aside{margin-top:14px}
  .g-hub{padding-top:6px}
  .g-hub .g-cards{margin-top:20px}
  .g-hub h2.g-sec{margin-top:28px}
}
/* Phone landscape */
@media(orientation:landscape) and (max-height:500px){
  section{padding:32px 0}
  .nav .wrap{height:48px}
  html{scroll-padding-top:56px}
  #try{padding-top:16px}
  .demo{padding:20px 22px;grid-template-columns:1.1fr .9fr;gap:20px;align-items:start}
  .demo h2{font-size:28px}
  .demo-steps{margin-top:12px}
}
@media(orientation:landscape) and (max-height:500px) and (max-width:860px){.nav-links{top:calc(48px + env(safe-area-inset-top))}}
