/* =====================================================================
   MOBILE POLISH — layout hardening + phone-first patterns
   (loaded after main.css)
   ===================================================================== */

/* grid children may shrink below their content (prevents horizontal spill) */
.contact-grid > *, .reader > *, .svc-layout > *, .about-grid > *, .cred > *, .lib > *, .cta > *, .intro > *, .hero__grid > *, .footer__top > * { min-width: 0; }
.cinfo b, .cta__line span { overflow-wrap: anywhere; }
.sm-only { display: none; }
@media (max-width: 760px) { .sm-only { display: inline; } .lg-only { display: none; } .footer__top > div:last-child { grid-column: 1 / -1; } }

/* bottom action bar (phones only) */
.mbar, .swipe-hint { display: none; }

@media (max-width: 760px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); font-size: 16px; }
  .fab { display: none; }
  .mbar {
    display: grid; grid-template-columns: 1fr 1fr 1.15fr; position: fixed; z-index: 85; inset: auto 0 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 8px;
    background: rgba(11, 29, 51, .94); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
    border-top: 1px solid rgba(217, 176, 103, .25); transform: translateY(110%); transition: transform .5s var(--ease);
  }
  .mbar.is-on { transform: none; }
  .menu-open .mbar { transform: translateY(110%); }
  .mbar a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 14px;
    font-family: var(--f-display); font-size: 15px; color: var(--white); background: rgba(255, 253, 248, .07); }
  .mbar a svg { width: 19px; height: 19px; flex-shrink: 0; }
  .mbar a.mbar__wa svg { color: #3ccf7a; }
  .mbar a.mbar__main { background: var(--gold); color: var(--ink); font-weight: 700; }

  /* rhythm & type */
  .section { padding-block: 68px; }
  .section__head { gap: 14px; margin-bottom: 36px; }
  .section__head p { font-size: 16.5px; }
  .section-title { font-size: clamp(30px, 8.6vw, 40px); line-height: 1.12; }
  .eyebrow { font-size: 13px; }

  /* hero */
  .hero__grid { padding-block: 26px 48px; }
  .hero__kicker { margin-bottom: 14px; }
  .hero__title { font-size: clamp(42px, 12.4vw, 58px); }
  .hero__lead { font-size: 16px; line-height: 1.75; margin-top: 18px; }
  .hero__actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; margin-top: 26px; }
  .hero__actions .btn { justify-content: center; padding: 15px 12px; font-size: 15px; }
  .hero__float { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 28px; }
  .fl--quote { grid-column: 1 / -1; max-width: none; width: auto; margin: 0 0 2px; }
  .fl--quote .fl__in { padding: 16px 18px; }
  .fl--quote p { font-size: 21px; }
  .fl__mark { font-size: 56px; height: 22px; }
  .fl--chip { display: block; }
  .fl--chip .fl__in { flex-direction: column; justify-content: center; text-align: center; gap: 8px; white-space: normal;
    border-radius: 16px; padding: 12px 6px; font-size: 13px; line-height: 1.3; height: 100%; }
  .fl__in { animation-duration: 9s !important; }
  .hero__scroll { display: none; }

  /* intro */
  .intro__photo { max-width: 250px; margin: 22px auto 0; }
  .intro__sig { margin-top: 24px; }
  .intro__sig b { font-size: 20px; }
  .intro .intro__q { font-size: 21px; margin: 14px 0 22px; }
  .manifesto { font-size: 23px; line-height: 1.45; }
  .intro__more { margin-top: 36px; padding-top: 28px; gap: 18px; }
  .intro__more p { font-size: 16px; }

  /* pillars: compact, sub-services as a swipe strip */
  .pillar { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .pillar__num { font-size: 14px; }
  .pillar__body { grid-column: 1; }
  .pillar__title { font-size: 27px; }
  .pillar__lead { font-size: 15.5px; margin-bottom: 14px; }
  .pillar__tags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); }
  .pillar__tags::-webkit-scrollbar { display: none; }
  .pillar__tags a { flex-shrink: 0; padding: 8px 14px; }
  .section__head--split > .btn { justify-self: stretch; justify-content: center; }

  /* quote */
  .quote blockquote { font-size: 21px; line-height: 1.6; }
  .quote__mark { font-size: 110px; }
  .quote figcaption { font-size: 14px; }

  /* process */
  .step { grid-template-columns: 56px 1fr; gap: 18px; }
  .step h3 { font-size: 21px; }
  .step p { font-size: 15.5px; }
  .step__dot { width: 56px; height: 56px; font-size: 19px; }
  .process__line { right: 28px; top: 28px; bottom: 28px; }

  /* cases: swipeable carousel with a peek of the next card */
  .cases { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px; }
  .cases::-webkit-scrollbar { display: none; }
  .case { flex: 0 0 84%; scroll-snap-align: center; padding: 28px 24px 24px; }
  .case:hover { transform: none; }
  .case .case__big { font-size: 27px; margin: 16px 0 14px; }
  .swipe-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; }
  .swipe-hint i { display: inline-block; width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 253, 248, .3); transition: width .3s, background .3s; }
  .swipe-hint i.on { background: var(--gold); width: 20px; }

  /* credentials */
  .cred { gap: 34px; }
  .cred__doc { max-width: 290px; }
  .cred__seal { width: 90px; height: 90px; inset-inline-start: auto; left: -12px; bottom: -24px; }
  .cred__list { margin-top: 26px; }
  .cred__item { grid-template-columns: 42px 1fr; gap: 14px; padding: 18px 0; }
  .cred__ico { width: 42px; height: 42px; }
  .cred__ico svg { width: 19px; }
  .cred__item b { font-size: 18px; }
  .cred__item span { font-size: 15px; }

  /* library teaser */
  .lib__num { font-size: 52px; }
  .lib__cat { font-size: 19px; padding: 17px 2px; }

  /* CTA + form */
  .cta { border-radius: 24px; padding: 30px 18px; gap: 26px; }
  .cta__title { font-size: clamp(28px, 7.8vw, 36px); }
  .cta__line { font-size: 17px; gap: 12px; }
  .cta__line i { width: 42px; height: 42px; }
  .form { padding: 22px 16px; }
  .form .btn { padding: 15px 18px; }

  /* inner-page hero */
  .phero { padding: calc(var(--header-h) + 36px) 0 44px; }
  .phero__title { font-size: clamp(34px, 10vw, 46px); margin-top: 16px; }
  .phero__lead { font-size: 16.5px; margin-top: 16px; }
  .doc-hero .phero__title { font-size: clamp(24px, 6.8vw, 32px); line-height: 1.35; }
  .doc-meta { gap: 8px; margin-top: 20px; }
  .doc-meta span { font-size: 13px; padding: 7px 12px; }

  /* services */
  .svc-group { padding-block: 44px; gap: 22px; }
  .svc-group__head h2 { font-size: 30px; margin: 8px 0 10px; }
  .svc-card { min-height: 0; padding: 22px; }
  .svc-card h3 { font-size: 22px; }
  .callout { padding: 26px 22px; font-size: 17px; margin: 30px 0; }
  .side-cta { display: none; }
  .prose { font-size: 17px; line-height: 1.85; }
  .prose .lead-p { font-size: 22px; }

  /* about */
  .about-photo { max-width: 260px; margin-inline: auto; }
  .value { padding: 28px 4px; }
  .value h3 { font-size: 25px; margin: 10px 0 8px; }

  /* reading */
  .doc { font-size: 17.5px; line-height: 1.9; }
  .doc h2 { font-size: 21px; margin: 1.6em 0 .6em; }
  .doc-card { padding: 20px; font-size: 14.5px; }
  .pn a { padding: 20px; }

  /* rulings library */
  .lib-tools { top: 0; padding: 12px 0; }
  .search input { padding: 14px 50px 14px 18px; font-size: 16px; }
  .chips { padding-top: 10px; }
  .chip { padding: 8px 13px; font-size: 14px; }
  .ritem { padding: 20px 2px; }
  .ritem:hover { padding-inline-start: 2px; }
  .ritem h3 { font-size: 18px; }
  .results-meta { margin: 22px 0 10px; }

  /* contact */
  .cinfo a { grid-template-columns: 50px 1fr; gap: 14px; padding: 16px; }
  .cinfo a:hover { transform: none; }
  .cinfo i { width: 50px; height: 50px; }
  .cinfo i svg { width: 20px; }
  .cinfo b { font-size: clamp(17px, 5vw, 21px); }

  /* footer */
  .footer { padding-top: 56px; }
  .footer__top { gap: 30px 20px; padding-bottom: 36px; }
  .footer__bottom { flex-direction: column; gap: 8px; }
}

/* small phones */
@media (max-width: 370px) {
  .header .brand { --bw: 124px; }
  .hero__actions { grid-template-columns: 1fr; }
  .fl--chip .fl__in { font-size: 12px; }
  .mbar a { font-size: 13.5px; gap: 6px; }
}

/* header with 5 nav links: never wrap; tighten on narrower desktops */
.nav__link, .nav__cta, .header__phone span { white-space: nowrap; }
@media (min-width: 1081px) and (max-width: 1440px) {
  .header__phone { display: none; }
  .nav { gap: 0; }
  .nav__link { padding: 10px 10px; font-size: 15px; }
  .nav__link::after { inset-inline: 10px; }
}
@media (min-width: 1081px) and (max-width: 1220px) {
  .nav__link { padding: 10px 7px; font-size: 14.5px; }
  .nav__cta { padding: 11px 16px; }
}

/* tablets */
@media (min-width: 761px) and (max-width: 1080px) {
  .hero__float { display: flex; flex-wrap: wrap; gap: 10px; }
  .cases { grid-template-columns: 1fr 1fr; }
  .case:last-child { grid-column: 1 / -1; }
  .intro__photo { max-width: 300px; }
}
