/* ==========================================================
   V5 FINAL · CROSS-DEVICE PRODUCTION HARDENING
   Preserves approved V5 visual language, typography and copy.
   Focus: containment, touch usability, compact screens,
   tablet transitions, forms, menus, anchors and accessibility.
   ========================================================== */

html{
  max-width:100%;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  scroll-padding-top:96px;
}
body{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:clip;
}
@supports not (overflow:clip){body{overflow-x:hidden}}

*,*::before,*::after{box-sizing:border-box}
main,header,footer,nav,section,article,aside,figure,form,fieldset,
.wrap,.hero-grid,.split,.convert,.cta-inner,.section-head,.sec-head,
.footer-grid,.f-grid,.team-grid,.member,.member-actions,
.valuation-form-grid,.valuation-choice-guide__grid,
.valuation-choice-guide__recommendation,.propnex-valuation-addon__shell,
.propnex-valuation-addon__panel,.propnex-valuation-addon__panel-inner{
  min-width:0;
}
img,picture,video,svg,canvas,iframe{max-width:100%}
img,picture,video{height:auto}

h1,h2,h3,h4,h5,h6,p,li,dd,dt,blockquote,a,button,label,summary{
  overflow-wrap:break-word;
  word-break:normal;
}
pre,code{max-width:100%;overflow:auto}

/* Interactive controls remain usable by mouse, keyboard and touch. */
a,button,summary,input,select,textarea{touch-action:manipulation}
button,input,select,textarea{max-width:100%;font:inherit}
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]),select,textarea{width:100%;min-width:0}
textarea{resize:vertical}
summary{cursor:pointer}
:target{scroll-margin-top:104px}

/* Do not allow long labels or CTA text to force a wider viewport. */
.btn,a.btn,button.btn,.propnex-valuation-addon__button{
  max-width:100%;
  white-space:normal;
  text-wrap:balance;
}
.hero-actions,.cta-actions,.member-actions{min-width:0;flex-wrap:wrap}

/* Navigation: match the actual 1130px desktop switch and remain usable
   on short tablets / landscape phones. */
@media(max-width:1129px){
  .topbar .nav{min-width:0}
  .mobile-menu{max-width:100%}
  .mobile-menu>summary{min-width:44px;min-height:44px}
  .mobile-menu-panel,.nav-links.is-open,.nav-links.open{
    max-height:calc(100dvh - 76px - env(safe-area-inset-bottom,0px));
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
}

/* Tablet: protect multi-column content from min-content expansion. */
@media(min-width:768px) and (max-width:1129px){
  .hero-grid,.split,.convert,.valuation-form-grid,
  .valuation-choice-guide__grid,.propnex-valuation-addon__shell{
    min-width:0;
  }
  .hero-copy,.hero-aside,.valuation-form-copy,.valuation-form,
  .valuation-choice-card{min-width:0;max-width:100%}
}

/* Mobile: keep forms legible, actions reachable and decorative layouts
   from becoming wider than the viewport. */
@media(max-width:767px){
  input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]),select,textarea{font-size:16px}
  .hero-actions,.cta-actions{width:100%;gap:10px}
  .hero-actions>.btn,.cta-actions>.btn{max-width:100%}
  details>summary{min-height:44px}
  .mobile-menu>summary{display:flex;align-items:center}
  .valuation-choice-guide__recommendation .btn,
  .propnex-valuation-addon__button{min-height:48px}
  .floating-whatsapp{max-width:calc(100vw - 24px)}
}

/* The V5 valuation comparison was added after earlier responsive layers.
   These are containment-only refinements; hierarchy and copy are unchanged. */
@media(max-width:900px){
  .valuation-choice-guide__grid{grid-template-columns:minmax(0,1fr)}
  .valuation-choice-guide__recommendation{grid-template-columns:minmax(0,1fr)}
  .propnex-valuation-addon__shell{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:560px){
  .valuation-choice-card,.valuation-choice-guide__recommendation,
  .propnex-valuation-addon__panel-inner{min-width:0;max-width:100%}
  .valuation-choice-card__badge{max-width:100%;white-space:normal}
  .valuation-choice-guide__recommendation .btn,
  .propnex-valuation-addon__button{width:100%;justify-content:center}
}
@media(max-width:359px){
  html{scroll-padding-top:84px}
  :target{scroll-margin-top:92px}
  .btn,a.btn,button.btn,.propnex-valuation-addon__button{padding-left:14px;padding-right:14px}
  .valuation-choice-card{padding-left:18px!important;padding-right:18px!important}
  .valuation-choice-guide__recommendation{padding-left:18px!important;padding-right:18px!important}
  .propnex-valuation-addon__panel-inner{width:calc(100% - 32px)!important}
}

/* Keyboard focus must remain visible on every device. */
:where(a,button,summary,input,select,textarea):focus-visible{
  outline:2px solid var(--brass,#B08D57);
  outline-offset:3px;
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  *,*::before,*::after{
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

@media print{
  body{overflow:visible}
  .floating-whatsapp,.mobile-menu,.nav-toggle{display:none!important}
}
