/* V24.3 — full-site responsive UX consolidation
   Loaded last so one predictable layer governs desktop, laptop, tablet,
   mobile, small-mobile, short-landscape and safe-area behaviour. */

html{
  width:100%;
  max-width:100%;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  scroll-padding-top:calc(84px + env(safe-area-inset-top,0px));
}
body{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:clip;
  padding-bottom:0!important;
}
@supports not (overflow:clip){body{overflow-x:hidden}}
*,*::before,*::after{box-sizing:border-box}
main,header,footer,section,article,aside,nav,form,fieldset,figure,
.wrap,.container,.nav,.nav-links,.navlinks,.hero-inner,.hero-grid,.vix-hero-grid,
.split,.cta-inner,.footer-grid,.f-grid,.grid-2,.grid-3,.grid-4,.team-grid,
.deal-grid,.editorial-grid,.archive-grid,.youtube-video-grid,.valuation-form-grid,
.valuation-impact-grid,.valuation-output-grid,.vix-gap-grid,.vix-output-grid,
.vix-proof-grid,.vix-layer-grid,.vix-decision-grid,.vix-assets-grid,
.vix-process-grid,.vix-track-record-grid,.proof-grid,.stats-grid,.work-grid,
.media-depth-grid,.logo-grid,.logo-row,.tst-marquee,.tst-track,.form,.field{
  min-width:0;
}
img,picture,video,canvas,svg,iframe{max-width:100%;height:auto}
iframe{display:block;width:100%;border:0}
table{max-width:100%}
pre,code{white-space:pre-wrap;overflow-wrap:anywhere}
h1,h2,h3,h4,h5,h6,p,li,a,strong,span,label,small,address{
  overflow-wrap:break-word;
  word-break:normal;
}
input,select,textarea,button{min-width:0;max-width:100%;font:inherit}
textarea{resize:vertical}

:root{
  --page-shell-max-v243:1296px;
  --page-gutter-v243:clamp(24px,4vw,58px);
}
.wrap{
  width:100%!important;
  max-width:var(--page-shell-max-v243)!important;
  margin-inline:auto!important;
  padding-left:max(var(--page-gutter-v243),env(safe-area-inset-left,0px))!important;
  padding-right:max(var(--page-gutter-v243),env(safe-area-inset-right,0px))!important;
}

/* Decorative layers must never create measurable page overflow. */
.hero,.dark,.jade,.valuation-awareness,.valuation-form-section,.vix-form-section,
.buy-asset-classes,.about-profile-bg,.about-expertise-bg,.about-notable-bg,
.team-how-bg,.team-pathways-bg,.media-stories-bg,.brief-thesis-bg,
.home-private-brief-bg,.authority-jade,.vix-gap-section,.vix-output-section{
  overflow:clip;
}

/* Navigation: desktop links only when there is genuinely enough room. */
@media (max-width:1129px){
  .topbar .navlinks{display:none!important}
  .topbar .mobile-menu{display:block!important}
}
@media (min-width:1130px){
  .topbar .navlinks{display:flex!important}
  .topbar .mobile-menu{display:none!important}
}
@media (max-width:999px){
  header .nav,.topbar .nav{min-height:72px!important;height:auto!important;gap:12px!important}
  .brand{
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    justify-content:center!important;
    min-width:0!important;
    max-width:min(64vw,360px)!important;
    white-space:normal!important;
    line-height:1.05!important;
  }
  .brand span{
    display:block!important;
    margin-top:4px!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .mobile-menu-panel,
  .nav-links.is-open,
  .nav-links.open{
    position:fixed!important;
    z-index:1300!important;
    top:calc(72px + env(safe-area-inset-top,0px))!important;
    right:max(18px,env(safe-area-inset-right,0px))!important;
    left:auto!important;
    width:min(320px,calc(100vw - 36px))!important;
    max-height:calc(100dvh - 92px - env(safe-area-inset-bottom,0px))!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
  }
}

/* Laptop and tablet widths: prevent dense desktop grids from becoming narrow columns. */
@media (min-width:768px) and (max-width:1099px){
  :root{--page-gutter-v243:clamp(30px,4vw,44px)}
  .footer-grid,.f-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    column-gap:clamp(34px,5vw,58px)!important;
    row-gap:38px!important;
  }
  .grid-4,.vix-assets-grid,.vix-decision-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .work-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .work-grid>*:last-child:nth-child(odd),
  .grid-4>*:last-child:nth-child(odd),
  .vix-assets-grid>*:last-child:nth-child(odd),
  .vix-decision-grid>*:last-child:nth-child(odd){grid-column:1/-1}
  .cta-inner{grid-template-columns:minmax(0,1fr)!important;gap:30px!important}
  .cta-actions{justify-content:flex-start!important}
}

/* The valuation comparison inside the homepage conversion panel becomes
   unreadable as three 130–195 px columns at tablet widths. Keep it vertical. */
@media (max-width:1199px){
  .valuation-impact-grid{
    grid-template-columns:minmax(0,1fr)!important;
    gap:1px!important;
  }
  .valuation-impact-grid>*{min-width:0!important}
}

/* Avoid activating the homepage two-column hero in the narrow 940–979 px band. */
@media (min-width:768px) and (max-width:979px){
  .hero-inner,.hero-grid:not(.vix-hero-grid){
    grid-template-columns:minmax(0,1fr)!important;
  }
  .hero-inner{gap:36px!important}
  .portrait{width:min(100%,500px)!important;margin-inline:auto!important}
  .hero-aside{max-width:760px!important}
}

/* Phone and compact-tablet layout. */
@media (max-width:767px){
  :root{--page-gutter-v243:max(20px,env(safe-area-inset-left,0px))}
  section{scroll-margin-top:78px}
  .grid-2,.grid-3,.grid-4,.split,.deal-grid,.editorial-grid,.archive-grid,
  .youtube-video-grid,.valuation-form-grid,.valuation-impact-grid,.valuation-output-grid,
  .vix-gap-grid,.vix-output-grid,.vix-proof-grid,.vix-layer-grid,.vix-decision-grid,
  .vix-assets-grid,.vix-process-grid,.vix-track-record-grid,.footer-grid,.f-grid,
  .work-grid,.media-depth-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .grid-2>*,.grid-3>*,.grid-4>*,.split>*,.deal-grid>*,.editorial-grid>*,
  .archive-grid>*,.youtube-video-grid>*,.valuation-form-grid>*,.vix-gap-grid>*,
  .vix-output-grid>*,.vix-proof-grid>*,.vix-layer-grid>*,.vix-decision-grid>*,
  .vix-assets-grid>*,.vix-process-grid>*,.vix-track-record-grid>*,.footer-grid>*{
    grid-column:auto!important;
    min-width:0!important;
  }
  .hero-actions,.hero-cta,.cta-actions,.member-actions,.private-brief-actions,
  .valuation-awareness-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    gap:11px!important;
  }
  .hero-actions .btn,.hero-cta .btn,.cta-actions .btn,.member-actions .btn,
  .private-brief-actions .btn,.valuation-awareness-actions .btn{
    width:100%!important;
    max-width:100%!important;
    min-height:50px!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:normal!important;
    line-height:1.3!important;
    padding-inline:16px!important;
  }
  .card,.member,.editorial,.archive-card,.youtube-video-copy,.legal-toc,.legal-callout,
  .work,.tst,.deal,.vix-stack-card{
    min-width:0!important;
    padding-left:clamp(18px,5.4vw,24px)!important;
    padding-right:clamp(18px,5.4vw,24px)!important;
  }
  .valuation-form,.page-valuation .valuation-form{
    width:100%!important;
    max-width:100%!important;
  }
  .valuation-form .two,.page-valuation .valuation-form .two,
  .address-details{
    grid-template-columns:minmax(0,1fr)!important;
    column-gap:0!important;
  }
  .valuation-form input,.valuation-form select,.valuation-form textarea,
  input,select,textarea{
    width:100%!important;
    font-size:16px!important;
  }
  .photo-caption{left:18px!important;right:18px!important;bottom:18px!important}
  .footer-bottom,.f-bot{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    justify-content:start!important;
    text-align:left!important;
  }
  .topbar .nav-cta,.nav>.btn{display:none!important}
  .archive-filter{min-height:44px!important;padding-block:10px!important}
  .archive-filters{align-items:stretch!important}
  .archive-filter{white-space:normal!important;text-align:center!important}
  .logo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .youtube-video-frame,.youtube-video-poster{aspect-ratio:16/9!important}
  .hero-grid,.vix-hero-grid{min-height:auto!important}
}

@media (max-width:479px){
  :root{--page-gutter-v243:max(18px,env(safe-area-inset-left,0px))}
  h1{font-size:clamp(36px,11vw,47px)!important;line-height:1.05!important}
  h2{font-size:clamp(28px,8.6vw,38px)!important;line-height:1.12!important}
  .eyebrow{letter-spacing:.15em!important;line-height:1.5!important}
  .brand{max-width:calc(100% - 58px)!important;font-size:clamp(16px,4.8vw,19px)!important}
  .brand span{font-size:clamp(6.7px,1.9vw,8.3px)!important;letter-spacing:.10em!important}
  .stats-grid,.proof-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .stat,.proof-cell{min-width:0!important;padding-left:12px!important;padding-right:12px!important}
  .btn{min-height:50px!important;padding-left:15px!important;padding-right:15px!important}
  .mobile-menu-panel,.nav-links.is-open,.nav-links.open{
    right:max(12px,env(safe-area-inset-right,0px))!important;
    width:min(310px,calc(100vw - 24px))!important;
  }
  .archive-toolbar{padding:18px!important}
  .archive-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (max-width:359px){
  :root{--page-gutter-v243:max(14px,env(safe-area-inset-left,0px))}
  h1{font-size:34px!important}
  h2{font-size:28px!important}
  .brand{max-width:calc(100% - 52px)!important;font-size:15.5px!important}
  .brand span{font-size:6.5px!important;letter-spacing:.075em!important}
  .stats-grid,.proof-grid{grid-template-columns:minmax(0,1fr)!important}
  .logo-grid{grid-template-columns:minmax(0,1fr)!important}
  .archive-filters{grid-template-columns:minmax(0,1fr)!important}
}

/* Floating contact controls are hidden by the companion script whenever a
   primary CTA, form action, open menu or footer is visible. This prevents the
   fixed control from covering buttons and text on compact screens. */
.floating-whatsapp{
  max-width:calc(100vw - 24px)!important;
  transition:opacity .2s ease,visibility .2s ease,transform .2s ease,
             background .2s ease,border-color .2s ease!important;
}
body.floating-contact-suppressed .floating-whatsapp,
body.menu-open .floating-whatsapp{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transform:translateY(10px)!important;
}
@media (max-width:767px){
  .floating-whatsapp{
    right:calc(14px + env(safe-area-inset-right,0px))!important;
    bottom:calc(14px + env(safe-area-inset-bottom,0px))!important;
    width:52px!important;
    min-width:52px!important;
    height:52px!important;
    min-height:52px!important;
    padding:5px!important;
  }
  .floating-whatsapp__icon{width:40px!important;height:40px!important}
  .floating-whatsapp__label{display:none!important}
}

@media (pointer:coarse){
  a.btn,button,summary,input,select,.archive-filter,.mobile-menu-panel a,
  .nav-links a{min-height:44px}
}

@media (orientation:landscape) and (max-height:600px) and (max-width:980px){
  section{padding-top:46px!important;padding-bottom:46px!important}
  .hero-grid,.hero-inner,.vix-hero-grid{
    min-height:auto!important;
    padding-top:40px!important;
    padding-bottom:44px!important;
  }
  .mobile-menu-panel,.nav-links.is-open,.nav-links.open{
    max-height:calc(100dvh - 76px - env(safe-area-inset-bottom,0px))!important;
  }
}

@media (hover:none){
  .btn:hover,.card:hover,.member:hover,.editorial:hover,.deal:hover,
  .archive-card:hover,.youtube-video-card:hover,.logo-cell:hover img,
  .floating-whatsapp:hover{transform:none!important}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

/* Touch-safe archive controls at every viewport. */
.archive-filter{min-height:44px!important;padding-block:10px!important}
