/* Mobile navigation + touch fixes (mobile_render.py, Nov 2026) */
.brand-header details.menu.m2 > summary { list-style: none; }
.brand-header details.menu.m2 > summary::-webkit-details-marker { display: none; }
@media (max-width: 1180px) {
  .brand-header details.menu.m2 > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 4px 0 10px; text-transform: none; font-size: .95rem; -webkit-tap-highlight-color: transparent; user-select: none; }
  .m2-ic { position: relative; width: 22px; height: 16px; display: inline-block; }
  .m2-ic i { position: absolute; left: 0; right: 0; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s, top .2s; }
  .m2-ic i:nth-child(1) { top: 0; } .m2-ic i:nth-child(2) { top: 6.75px; } .m2-ic i:nth-child(3) { top: 13.5px; }
  details.m2[open] .m2-ic i:nth-child(1) { top: 6.75px; transform: rotate(45deg); }
  details.m2[open] .m2-ic i:nth-child(2) { opacity: 0; }
  details.m2[open] .m2-ic i:nth-child(3) { top: 6.75px; transform: rotate(-45deg); }
  .m2-lbl-close { display: none; } details.m2[open] .m2-lbl-open { display: none; } details.m2[open] .m2-lbl-close { display: inline; }
  .m2-panel { position: fixed; left: 0; right: 0; top: var(--m2-top, 77px); bottom: 0; z-index: 70; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: #fff; border-top: 3px solid #00785e; padding: 16px max(18px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); box-sizing: border-box; }
  .brand-header .menu.m2 nav { position: static; background: none; border: 0; box-shadow: none; padding: 0; max-width: 640px; margin: 0 auto; }
  .brand-header .menu.m2 nav ul { padding: 0; margin: 0; list-style: none; max-width: none; }
  .m2-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; }
  .brand-header .menu.m2 nav .m2-acts a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 50px; padding: 6px 10px; border-radius: 10px; font-weight: 700; font-size: .95rem; border: 0; line-height: 1.2; }
  .brand-header .menu.m2 nav .m2-acts .m2-ts { background: #00785e; color: #fff; }
  .brand-header .menu.m2 nav .m2-acts .m2-call { background: #fff; color: #0b2540; box-shadow: inset 0 0 0 1.5px #0b2540; }
  .m2-h { margin: 0 0 8px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #5b6b7a; }
  .brand-header .menu.m2 nav .m2-progs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 20px; }
  .brand-header .menu.m2 nav .m2-progs a { display: flex; align-items: center; min-height: 52px; height: 100%; box-sizing: border-box; padding: 8px 12px; border: 1px solid #dbe4ea; border-radius: 10px; background: #f7fafb; font-size: .92rem; line-height: 1.25; color: #0b2540; }
  .brand-header .menu.m2 nav .m2-links a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 2px; border-bottom: 1px solid #edf1f4; font-size: 1.02rem; color: #0b2540; }
  .brand-header .menu.m2 nav .m2-links a::after { content: "›"; font-size: 1.4rem; line-height: 1; color: #9aa9b5; }
  .brand-header .menu.m2 nav a[aria-current="page"] { color: #00785e; }
  .brand-header .menu.m2 nav .m2-progs a[aria-current="page"] { border-color: #00785e; background: #eaf6f2; }
  html.m2-open .mbar, html.m2-open .m2-sec-btn { display: none !important; }
}
/* "Sections" jump sheet on long pages */
.m2-sec-btn, .m2-sheet { display: none; }
@media (max-width: 900px) {
  .m2-sec-btn { display: flex; position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: calc(var(--m2-bar, 0px) + 12px + env(safe-area-inset-bottom)); z-index: 55; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: #0b2540; color: #fff; font: 700 .9rem/1 inherit; font-family: inherit; box-shadow: 0 6px 18px rgba(11,37,64,.3); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
  .m2-sec-btn.show { opacity: 1; transform: none; pointer-events: auto; }
  .m2-sheet[open] { display: block; position: fixed; inset: 0; z-index: 80; margin: 0; padding: 0; width: 100%; max-width: none; height: 100%; max-height: none; border: 0; background: rgba(11,37,64,.45); }
  .m2-sheet .m2-sheet-in { position: absolute; left: 0; right: 0; bottom: 0; max-height: 78vh; overflow-y: auto; overscroll-behavior: contain; background: #fff; border-radius: 16px 16px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); box-sizing: border-box; }
  .m2-sheet-hd { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #fff; padding: 10px 0 8px; font-weight: 700; color: #0b2540; }
  .m2-sheet-hd button { min-width: 44px; min-height: 44px; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: #5b6b7a; }
  .m2-sheet a { display: flex; align-items: center; min-height: 48px; padding: 4px 2px; border-bottom: 1px solid #edf1f4; color: #0b2540; text-decoration: none; font-weight: 600; line-height: 1.3; }
  .m2-sheet a.m2-top { color: #00785e; }
  /* bigger touch targets */
  .crumbs a { display: inline-block; padding: 12px 2px; margin: -12px 0; }
  .cta-call, .rail-call { padding-top: 10px !important; padding-bottom: 10px !important; }
  .f-contact a { display: inline-block; padding: 9px 0; }
  .chart-data summary { padding: 12px 0; }
  .city-table a, .lr-link, .cx-card a { display: inline-block; padding-top: 10px; padding-bottom: 10px; }
  sup.fn a { display: inline-block; padding: 10px 4px; margin: -10px -2px; }
  .state-index a { display: inline-flex; align-items: center; min-height: 44px; }
  /* locations directory: city names only on phones (each city page lists its loan programs) */
  .dir-cities { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0; list-style: none; }
  .dir-cities > li > ul { display: none; }
  .dir-cities > li > h3 { margin: 0; font-size: 1rem; }
  .dir-cities > li > h3 a { display: flex; align-items: center; min-height: 48px; padding: 4px 12px; border: 1px solid #dbe4ea; border-radius: 10px; background: #fff; text-decoration: none; }
  .usmap-dots circle { r: 9; }
}
/* narrow phones: icon-only menu button and a tighter header so nothing runs off screen */
@media (max-width: 460px) {
  .brand-header details.menu.m2 > summary { padding: 0 4px; gap: 0; }
  .brand-header details.menu.m2 > summary .m2-lbl-open, .brand-header details.menu.m2 > summary .m2-lbl-close { display: none; }
  .brand-header .header-row { gap: 10px; }
}
@media (max-width: 400px) {
  .brand-header .btn-pill { padding: .6rem .85rem !important; font-size: .74rem !important; letter-spacing: 0 !important; }
  .brand-header .logo img { width: 112px; height: auto; }
}
@media (max-width: 350px) {
  .brand-header .btn-pill { padding: .55rem .65rem !important; font-size: .68rem !important; }
  .brand-header .logo img { width: 96px; }
  .brand-header .header-row { gap: 6px; }
}
