/* Reserve Tax AI: phone-only layout helpers. Nothing here applies above 720px. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.m-more-wrap, .m-lbl { display: none; }
@media (max-width: 720px) {
  /* iPhone Safari zooms the page when a field under 16px is tapped */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea { font-size: 16px !important; }
  html, body { overflow-x: clip; }
  /* Footer: link groups collapse to tap-to-open rows */
  footer .m-acc-grid { row-gap: 0 !important; }
  footer .m-acc-grid > :not(.m-acc) { margin-bottom: 28px; }
  footer .m-acc { grid-column: 1 / -1; border-top: 1px solid #E5E2D8; }
  footer .m-acc > .m-acc-head { display: flex; align-items: center; justify-content: space-between; margin: 0 !important; padding: 15px 0; cursor: pointer; font-size: 12px; -webkit-tap-highlight-color: transparent; }
  footer .m-acc > ul { display: none; padding: 0 0 16px; margin: 0; }
  footer .m-acc.m-open > ul { display: block; }
  footer .m-acc > ul > li + li { margin-top: 12px !important; }
  footer .m-acc + .m-acc:last-of-type { border-bottom: 1px solid #E5E2D8; }
  footer .footer-lockup img { height: 64px !important; }

  /* Shared chevron */
  .m-chev { flex: 0 0 auto; width: 9px; height: 9px; margin: 0 4px 0 12px; border-right: 2px solid #0E0E0C; border-bottom: 2px solid #0E0E0C; transform: rotate(45deg) translate(-2px, -2px); transition: transform .18s ease; }
  .m-open > .m-acc-head .m-chev, .m-card.m-open .m-card-head .m-chev { transform: rotate(-135deg) translate(-2px, -2px); }
  .m-dark .m-chev, .m-card.m-dark .m-chev { border-color: #F5F2EA; }

  /* Card stacks: title row stays, body opens on tap */
  .m-card { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .m-card .m-card-head { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; }
  .m-card .m-hide { display: none !important; }
  .m-card.m-open .m-hide { display: revert !important; }
  .m-card.m-open .m-hide.m-was-flex { display: flex !important; }
  .m-card.m-open .m-hide.m-was-grid { display: grid !important; }
  .m-card.m-open .m-hide.m-was-inline-flex { display: inline-flex !important; }
  .m-card.m-open .m-hide.m-was-block { display: block !important; }
  .m-card.m-open .m-hide.m-was-inline-block { display: inline-block !important; }
  .m-cards-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .m-cards-grid > .m-card { padding-top: 16px !important; padding-bottom: 16px !important; min-height: 0 !important; }

  /* Link-card grids: title and tags only */
  .m-linkcards { grid-template-columns: 1fr !important; gap: 10px !important; }
  .m-linkcards > a > p { display: none !important; }
  .m-linkcards > a { padding-top: 16px !important; padding-bottom: 16px !important; min-height: 0 !important; }
  .m-hide-mobile { display: none !important; }

  /* Stacked comparison tables */
  table.m-stack, table.m-stack tbody, table.m-stack tr, table.m-stack td { display: block; width: 100% !important; }
  table.m-stack thead { display: none; }
  table.m-stack tr { padding: 16px 16px; border-bottom: 1px solid #EDEAE0; }
  table.m-stack tr:last-child { border-bottom: 0; }
  table.m-stack td { padding: 3px 0 !important; border: 0 !important; text-align: left !important; background: none !important; }
  table.m-stack td:first-child { font-weight: 700; font-size: 15px; padding-bottom: 6px !important; }
  table.m-stack td::before, table.m-stack td::after { display: none !important; }
  table.m-stack .m-lbl { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #46443F; margin: 6px 0 2px; line-height: 1.3; }

  /* Long lists: first 4 items, then a button */
  .m-list-more > li.m-extra { display: none !important; }
  .m-list-more.m-list-open > li.m-extra { display: revert !important; }
  .m-more-wrap { display: block; }
  .m-more-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 16px; border: 1px solid currentColor; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: transparent; color: inherit; cursor: pointer; }

  /* Calendar: search bar should not ride over other sections */
  .cal-controls { position: static !important; top: auto !important; box-shadow: none !important; }
}
