/* Phone polish. Loaded last, so it only tightens what the other sheets set for desktop.
   Nothing here changes a layout above 640px. */

@media (max-width: 640px) {
  /* Headings: the desktop minimums were too big for a 375px screen */
  .h-display { font-size: 38px; }
  .h1 { font-size: 30px; }
  .h2 { font-size: 25px; }
  .xh-title { font-size: 42px; line-height: .92; margin-top: 20px; }
  .xh-title--page { font-size: 38px; }
  .page-hero { padding: 44px 0 40px; }
  .page-hero h1 { font-size: 36px; line-height: 1; margin-top: 18px; }
  .page-hero p { font-size: 16px; margin-top: 18px; }
  .sec-head h2 { font-size: 30px; margin-top: 16px; }
  .statement h2 { font-size: 30px; margin-top: 22px; }
  .story-head h2 { font-size: 30px; }
  .story-num { font-size: 32px; }
  .xh-lead { font-size: 16px; margin-top: 20px; }
  .xh-card-amt { font-size: 34px; }
  .auth-title { font-size: 30px; }
  .topbar h1, .dash .topbar h1 { font-size: 26px; }
  .shop-head h1, .shop-head:not(.shop-head--slim) h1 { font-size: 30px; }
  .shop-head--slim h1 { font-size: 26px; }
  .sell-hero h1 { font-size: 32px; margin-top: 14px; }
  .sell-sec h2, .sell-end h2 { font-size: 26px; }
  .seller-id h1 { font-size: 28px; }
  .pdp-info h1 { font-size: 24px; }
  .pdp-price .price-big { font-size: 32px; }
  .pg-hero { padding: 22px; }
  .pg-hero h2 { font-size: 26px; }
  .menu-links a { font-size: 30px; padding: 12px 0; }

  /* Breathing room: tighter cards and sections so content isn't squeezed */
  .card, .kpi { padding: 18px; }
  .card-navy { padding: 20px; }
  .main { padding: 20px 16px 40px; }
  .topbar { margin-bottom: 20px; gap: 12px; }

  /* Small text: nothing under 12px on a phone */
  .kicker, .eyebrow, .cap, label, dt, .bento-tag, .city-menu-head, .auth-eyebrow,
  .table th, .side .role, .side-group { font-size: 12px; }
  .small, small, .fav-tag, .tr-link { font-size: 13px; }
  .tracker > div { font-size: 11.5px; }

  /* Tap targets: links and buttons that were 17-22px tall */
  .link-gold, .auth-back, .site-foot a, .crumbs a, .breadcrumb a { display: inline-flex; align-items: center; min-height: 40px; }
  .site-foot .cols a { min-height: 36px; }
  .btn-sm { min-height: 42px; }
  .city-menu a, .city-menu button { min-height: 44px; }
  .shop-head-meta .city-menu { left: auto; right: 0; }
  .popular a, .faq-more a, .shop-head-meta > a, .shop-sec-head > a, .pro-foot a { display: inline-flex; align-items: center; min-height: 40px; }
  .pro-card h3 a { display: inline-block; padding: 6px 0; }
  .ft-cols nav a { display: flex; align-items: center; min-height: 40px; }
  .ft-cols nav b, .popular span, .console-field label { font-size: 12px; }
  .facts dt { font-size: 11px; }
  .book-from, fieldset > legend { font-size: 12px; }
  .xh-copy .kicker { font-size: 11px; letter-spacing: .1em; gap: 10px; padding: 9px 14px; }
  .contact-send .hint a, .pro-row-name a { display: inline-block; padding: 8px 0; }

  /* Service price list: keep the price on screen, let the name wrap */
  .price-list li { gap: 14px; padding: 18px 2px; }
  .price-list li > span:first-child { min-width: 0; flex: 1 1 auto; }
  .price-list li > .serif, .price-list li > b.serif { flex: none; font-size: 22px; }
  .price-list b { font-size: 16px; }
  .price-list small { font-size: 13px; }

  /* Tables that scroll sideways: show that more is there and keep cells compact */
  .table th, .table td { padding: 11px 12px; }
  .table { font-size: 13px; }
  .table-wrap { border-radius: 16px; }
  .panel-head { padding: 12px 14px; }

  /* Signed-in sidebar becomes a tidy top bar instead of a stack of wrapped blocks */
  .side { padding: 10px 14px 8px; gap: 6px 10px; }
  .side > .brand img { width: 36px; }
  .side > .brand span { font-size: 19px; }
  .side nav { order: 3; gap: 2px; padding-bottom: 4px; scrollbar-width: none; }
  .side nav::-webkit-scrollbar { display: none; }
  .side nav a { min-height: 40px; padding: 0 12px; font-size: 13.5px; flex: none; }
  .side .foot { order: 2; width: auto; margin: 0 0 0 auto; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .side .foot > * { flex: 0 0 auto; margin: 0; }
  .side .foot .btn-block { width: auto; min-height: 40px; padding: 0 14px; }
}

@media (max-width: 400px) {
  .xh-title { font-size: 38px; }
  .xh-title--page { font-size: 34px; }
  .page-hero h1 { font-size: 32px; }
  .sec-head h2, .statement h2, .story-head h2 { font-size: 27px; }
  .btn-lg { min-height: 54px; padding: 0 24px; }
}
