/* SortMyDivorce — shared responsive layer (loaded on every page, after page styles) */

/* --- universal safety: nothing may overflow the viewport --- */
html{-webkit-text-size-adjust:100%}
body{overflow-x:hidden}
img,svg,video,table,pre{max-width:100%}
* {word-wrap:break-word;overflow-wrap:break-word}

/* --- iOS: inputs under 16px trigger auto-zoom on focus. Never let that happen. --- */
input,select,textarea,button{font-size:16px}
@media(min-width:900px){input,select,textarea,button{font-size:inherit}}

/* ============ TABLET (≤1024px) ============ */
@media(max-width:1024px){
  .wrap{padding-left:20px;padding-right:20px}
}

/* ============ SMALL TABLET / LARGE PHONE (≤820px) ============ */
@media(max-width:820px){
  /* stacked, centered header nav everywhere */
  header{flex-wrap:wrap;gap:8px;padding:12px 0}
  header nav{order:3;width:100%;justify-content:center;flex-wrap:wrap;gap:8px 14px;margin-left:0!important;padding-top:2px}
  header nav a{padding:6px 2px;font-size:13px}
  header .btn,header a.btn{margin-left:auto!important}

  /* hero: art below text, full width */
  .hero{padding:30px 0 16px!important;text-align:left}
  .hero h1{font-size:26px!important;line-height:1.2}
  .hero .lede{font-size:15px!important;max-width:none!important}
  .hero svg{max-width:420px;margin:18px auto 0}

  h1{font-size:25px!important;line-height:1.22}
  h2{font-size:19px!important}
  h3{font-size:16.5px!important}

  /* 1-2-3 chips: stack into readable rows */
  .stepchips{flex-direction:column;align-items:stretch!important;gap:6px!important}
  .stepchips span{white-space:normal!important;text-align:center}
  .stepchips .arw{display:none}
}

/* ============ PHONE (≤600px) ============ */
@media(max-width:600px){
  .wrap{padding-left:16px;padding-right:16px}

  /* KB quick-facts table → stacked cards (no cramped 2-col squeeze) */
  table.qf,table.qf tbody,table.qf tr,table.qf th,table.qf td{display:block;width:100%}
  table.qf tr{border-bottom:1px solid #eef1f5;padding:2px 0}
  table.qf tr:last-child{border-bottom:none}
  table.qf th{width:100%!important;background:transparent;padding:10px 12px 2px!important;font-size:12px!important;text-transform:uppercase;letter-spacing:.05em;color:#2f66a7;border-bottom:none}
  table.qf td{padding:0 12px 11px!important;border-bottom:none;font-size:14.5px!important}

  /* steps: tighter gutters */
  ol.steps li{padding-left:38px}
  ol.steps li:before{width:26px;height:26px;font-size:12.5px}

  /* generous tap targets */
  a,button,.btn,label.it{min-height:44px}
  nav a{min-height:auto}
  .btn,button.btn{padding:12px 18px}

  /* tools: keep everything inside the screen */
  .smdt{padding:16px 14px;border-radius:12px}
  .smdt .row{gap:6px}
  .smdt .btn2{padding:10px 14px}
  .smdt table{font-size:13px}
  .smdt input[type=text],.smdt input[type=number],.smdt input[type=date],.smdt select{width:100%;max-width:100%}
  .smdt .cal{gap:3px}
  .smdt .cal .d{padding:10px 1px;font-size:11.5px}
  .smdt .tot{gap:8px}
  .smdt .tot div{flex:1 1 45%;padding:8px 10px}

  /* asset worksheet: shrink the delete column, let name breathe */
  .smdt table th:nth-child(2),.smdt table td:nth-child(2){width:80px}
  .smdt table th:nth-child(4),.smdt table td:nth-child(4){width:34px;padding-left:0}

  /* deadline tracker add-row stacks */
  .smdt .row input[type=date]{flex:1 1 100%}

  /* footer: 2 columns, brand full width */
  .smdf .cols{gap:18px!important}
  .smdf .cols>div{flex:1 1 44%!important}
  .smdf .cols>.brand{flex:1 1 100%!important}
  .smdf a{font-size:13px;padding:5px 0;white-space:normal!important}

  /* homepage sneak-peek + demo player: no horizontal scroll */
  .peek,.player{border-radius:10px}
  .kpis{flex-direction:column}
  .kpi{min-width:0}

  /* about letter: comfortable reading */
  .letter{padding:26px 20px 26px!important}
  .photo{width:150px!important}
}

/* ============ TINY (≤380px) ============ */
@media(max-width:380px){
  h1{font-size:22px!important}
  .hero h1{font-size:23px!important}
  .smdt .cal .d{padding:8px 0;font-size:10.5px}
  .btn,button.btn{padding:11px 14px;font-size:14px}
}

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