/* Portfolio mobile design baseline v1 — 2026-09-18
   Non-destructive safeguards for responsive forms, calculators and content. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
*,*::before,*::after{box-sizing:border-box}
body{overflow-x:hidden}
img,svg,video,canvas{max-width:100%;height:auto}
fieldset{min-inline-size:0;max-width:100%}
legend{max-width:100%;white-space:normal;line-height:1.35}
label{line-height:1.4}
input,select,textarea,button{font:inherit}
input,select,textarea{max-width:100%}
button,.button,.btn,[role="button"]{touch-action:manipulation}
:where(.container,.wrap,.shell,.inner,.content,.calculator-shell,.calculator-grid,.tool-shell,.tool-panel,.form-card,.result-card,.card,.grid)>*{min-width:0}
:where(.actions,.button-row,.form-actions,.tool-actions,.nav-actions,.cta-row){flex-wrap:wrap}
:where(h1,h2,h3,h4,p,li,label,legend,.button,.btn){overflow-wrap:break-word}
:where(.step-header,.tool-step,.wizard-step,.calculator-step){min-width:0}
:where(.step-header,.tool-step,.wizard-step,.calculator-step)>*{min-width:0}
:focus-visible{scroll-margin:96px}
@media(max-width:640px){
  body{line-height:1.6}
  h1,h2,h3,h4{line-height:1.15}
  p,li{line-height:1.6}
  input:not([type="checkbox"]):not([type="radio"]),select,textarea{font-size:16px!important;min-height:48px}
  textarea{min-height:112px}
  button,.button,.btn,[role="button"]{min-height:44px}
  .calculator-grid,.form-grid,.tool-grid,.tool-shell{grid-template-columns:minmax(0,1fr)!important}
  .result-grid{grid-template-columns:minmax(0,1fr)!important}
  .form-row{min-width:0}
  .step-header,.tool-step,.wizard-step,.calculator-step{gap:12px;align-items:flex-start}
}
@media(max-width:380px){
  input:not([type="checkbox"]):not([type="radio"]),select,textarea{font-size:16px!important}
}
