/* OI-7 mobile usability. Desktop styles stay unchanged except skip-link z-index. */
.cta-mobile{display:none}
.oi-mobile-cta-row{display:none}
.oi-cta-review-mobileonly{display:none}
.oi-contact-cta .oi-cta-review{display:none}

/* Skip link: stay hidden until focused; sit above the sticky header */
.skip-link{position:fixed;left:20px;top:-120px;z-index:10000}
.skip-link:focus,.skip-link:focus-visible{top:12px;font-size:16px}

/* Fee note: font-size moved out of the inline style so mobile can be 17px */
.fee-recovery-note{font-size:14px;line-height:1.65}

@media (max-width:768px){
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

  html body a.bigbtn.oi-desktop-call{display:none!important}

  /* Place Call / Review CTAs directly under the heading so they stay above the fold */
  .editorial-hero-copy,
  .phero>.wrap,
  main>section>.wrap:has([data-oi-top-ctas]){
    display:flex!important;
    flex-direction:column!important;
  }
  .editorial-hero-copy>*,
  .phero>.wrap>*,
  main>section>.wrap:has([data-oi-top-ctas])>*{order:10}
  .editorial-hero-copy>.eyebrow,
  .phero>.wrap>.crumb,
  main>section>.wrap:has([data-oi-top-ctas])>.eyebrow{order:1!important}
  .editorial-hero-copy>h1,
  .phero>.wrap>h1,
  main>section>.wrap:has([data-oi-top-ctas])>h1{order:2!important}
  .editorial-hero-copy>.hero-actions,
  .phero>.wrap>.oi-mobile-cta-row,
  main>section>.wrap:has([data-oi-top-ctas])>.oi-mobile-cta-row,
  main>section>.wrap:has([data-oi-top-ctas])>.hero-actions,
  main>section>.wrap:has([data-oi-top-ctas])>.oi-contact-cta{order:3!important}

  /* Body text 17px, AA-or-better contrast */
  main p,main li,main dd,main td,main th,
  .content p,.content li,.phero p,.editorial-hero-copy p,
  .fee-friendly-line,.fee-recovery-note,.fee-costs-line,
  article p,article li,.answers-block p,.faq details p,
  .consultation-layout p,.formcard p:not(.fine),
  .practice-rows p,.approach-grid p{
    font-size:17px!important;
    line-height:1.7!important;
  }
  .fee-recovery-note{font-size:17px!important;line-height:1.7!important}

  /* Forms: full-width, 17px to avoid iOS zoom, comfortable fields */
  main input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  main select,main textarea,
  .formcard input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  .formcard select,.formcard textarea,
  form[name=consultation] input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  form[name=consultation] select,form[name=consultation] textarea,
  form[name=attorney-referral] input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  form[name=attorney-referral] select,form[name=attorney-referral] textarea{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    font-size:17px!important;
    line-height:1.5!important;
    min-height:48px!important;
  }
  form[name=consultation] textarea,form[name=attorney-referral] textarea,
  .formcard textarea,main textarea{min-height:128px!important}
  form[name=consultation] label,.formcard label,main label{font-size:16px!important;line-height:1.5!important}

  /* Larger tap areas: breadcrumbs, footer, small links */
  .crumb a,nav.crumbs a,.breadcrumbs a,
  footer a,.fgrid a,.footer-links a,.footer-bottom a,
  .related-guides a,.direct-contact a{
    display:inline-flex!important;
    align-items:center!important;
    min-height:44px!important;
    font-size:16px!important;
    padding-top:6px;padding-bottom:6px;
  }
  .crumb,.breadcrumbs,nav.crumbs{font-size:16px!important;line-height:1.5!important}

  /* In-content text links: give them a taller hit area without breaking wrapping */
  main a, .content a, article a, .faq a{
    min-height:44px;
    padding-top:6px;padding-bottom:6px;
  }
  /* don't force huge padding on buttons already styled */
  main a.bigbtn, main a.oi-cta-call, main a.oi-cta-review, main a.hero-phone{padding-top:unset;padding-bottom:unset}

  footer p,footer .legal,footer .footer-bottom,.fine-print,.page-updated,.last-reviewed,.article-meta,.article-note{
    font-size:16px!important;line-height:1.65!important
  }
  .formcard .fine,form .fine,form small,.form-note,.consent{font-size:14px!important;line-height:1.6!important}

  /* Sticky header already exists; keep it above content */
  header{position:sticky!important;top:0!important;z-index:90!important}

  /* Clear Menu button */
  button.burger{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    min-width:44px!important;
    min-height:44px!important;
    padding:8px 12px!important;
    font-size:16px!important;
    font-weight:700!important;
    letter-spacing:.02em!important;
    color:#2e3a2d!important;
    background:#fff!important;
    border:1px solid #c0ccbf!important;
    border-radius:999px!important;
    line-height:1!important;
  }
  button.burger .burger-label{font-size:16px!important;font-weight:700!important;color:#2e3a2d!important}
  button.burger .burger-icon{font-size:18px!important;line-height:1!important}

  /* Large-tap nav links */
  header .menu{padding:8px 0 16px!important;background:#f8f4ec!important;z-index:91!important;max-height:calc(100dvh - 110px);overflow-y:auto;overscroll-behavior:contain}
  header .menu>li>a{
    display:flex!important;
    align-items:center!important;
    min-height:48px!important;
    padding:12px 20px!important;
    font-size:17px!important;
    font-weight:600!important;
    color:#2e3a2d!important;
    white-space:normal!important;
  }
  header .menu .drop a{
    display:flex!important;
    align-items:center!important;
    min-height:48px!important;
    padding:10px 20px 10px 28px!important;
    font-size:16px!important;
    color:#2e3a2d!important;
  }
  header .menu .caret{display:none!important}
  header .menu .mobile-sub-toggle{display:none!important}
  header .menu>li:has(.drop)::after,header .menu>li:has(.drop)::before{content:none!important;display:none!important}
  header .menu>li>a.callbtn,
  header .menu a.callbtn{
    margin:10px 16px 16px!important;
    min-height:52px!important;
    justify-content:center!important;
    background:#1f2a1f!important;
    color:#fff!important;
    border-radius:8px!important;
    font-size:17px!important;
  }
  header .menu a.callbtn b,header .menu a.callbtn .cb-top{color:#fff!important;font-size:16px!important}

  /* Above-the-fold CTAs: full-width stacked on phones */
  .cta-desktop{display:none!important}
  .cta-mobile{display:inline!important}
  .hero-actions, .oi-mobile-cta-row{
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
    width:100%!important;
    max-width:100%!important;
    margin:16px 0 8px!important;
    align-items:stretch!important;
  }
  .hero-actions .hero-call{display:contents}
  .hero-actions .hero-avail{display:none!important}
  .hero-actions a.bigbtn,
  .hero-actions a.hero-phone,
  .oi-mobile-cta-row a,
  a.oi-cta-call,a.oi-cta-review,a.oi-cta-review-mobileonly{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    min-height:52px!important;
    padding:14px 18px!important;
    border-radius:12px!important;
    font-size:18px!important;
    font-weight:700!important;
    text-align:center!important;
    text-decoration:none!important;
    line-height:1.2!important;
  }
  .hero-actions a.hero-phone,
  a.oi-cta-call{
    background:#1f2a1f!important;
    color:#fff!important;
    order:1;
    border:0!important;
  }
  .hero-actions a.bigbtn,
  a.oi-cta-review,a.oi-cta-review-mobileonly{
    background:#c39a4b!important;
    color:#1f2a1f!important;
    order:2;
    border:0!important;
  }
  a.oi-cta-review-mobileonly{display:flex!important}


  /* Contact: existing gold call button becomes full-width; review is added */

  .oi-contact-cta{
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
    width:100%!important;
    margin:16px 0 8px!important;
  }
  .oi-contact-cta .oi-cta-review{display:flex!important}
  .oi-contact-cta a.bigbtn{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:52px!important;
    padding:14px 18px!important;
    border-radius:12px!important;
    font-size:18px!important;
    font-weight:700!important;
    background:#1f2a1f!important;
    color:#fff!important;
    text-decoration:none!important;
  }
  /* Sticky bottom bar: hidden until .oi-bar-visible (JS / IntersectionObserver) */
  .mobilebar{
    display:none!important;
    position:fixed!important;
    bottom:0!important;left:0!important;right:0!important;
    z-index:95!important;
    box-shadow:0 -8px 24px rgba(0,0,0,.35)!important;
  }
  html body .mobilebar.oi-bar-visible{display:flex!important}
  html body .mobilebar a{
    flex:1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:52px!important;
    padding:14px 8px calc(14px + env(safe-area-inset-bottom,0px))!important;
    font-size:16px!important;
    font-weight:700!important;
    letter-spacing:.04em!important;
    text-transform:uppercase!important;
    text-decoration:none!important;
  }
  body{padding-bottom:0!important}
  body:has(.mobilebar.oi-bar-visible){padding-bottom:calc(56px + env(safe-area-inset-bottom,0px))!important}
  body:has(header .menu.open) .mobilebar,
  body:has(input:focus,textarea:focus,select:focus) .mobilebar{display:none!important}

  /* Tables → stacked cards */
  table.tb-table, table{
    display:block!important;
    width:100%!important;
    border:0!important;
  }
  table.tb-table thead, table thead{display:none!important}
  table.tb-table tbody, table.tb-table tr,
  table tbody, table tr{display:block!important;width:100%!important}
  table.tb-table tr, table tr{
    background:#fff;
    border:1px solid #c0ccbf;
    border-radius:12px;
    padding:12px 14px;
    margin:0 0 12px!important;
    box-sizing:border-box;
  }
  table.tb-table th, table.tb-table td, table th, table td{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    border:0!important;
    padding:4px 0!important;
    font-size:17px!important;
    line-height:1.5!important;
    text-align:left!important;
    box-sizing:border-box;
  }
  table.tb-table td::before, table td::before{
    content:attr(data-label);
    display:block;
    font-size:13px;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
    color:#5d685c;
    margin-bottom:2px;
  }
}

/* Mid-size phones / small tablets share the menu breakpoint used by the site (960) */
@media (min-width:769px) and (max-width:960px){
  button.burger{
    display:inline-flex!important;
    align-items:center!important;
    gap:6px!important;
    min-width:44px!important;
    min-height:44px!important;
    padding:8px 12px!important;
    font-size:16px!important;
    font-weight:700!important;
    color:#2e3a2d!important;
    background:#fff!important;
    border:1px solid #c0ccbf!important;
    border-radius:999px!important;
  }
  header .menu>li>a, header .menu .drop a{
    min-height:48px!important;
    display:flex!important;
    align-items:center!important;
    font-size:16px!important;
  }
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
}
