/* Wider compact screens use the same mobile layout and interactions.
   All mobile/desktop switching is width-only: mobile <1024px, desktop >=1024px.
   These rules only adjust density within each layout, never orientation. */
@media (min-width:641px) and (max-width:1023px) {
  body:not(.legacy-marketing-page) { --profile-name-size:34px; }
  body:not(.marketing-page):not(.legacy-marketing-page) .container { width:calc(100% - 48px); }
  body.catalog-page:not(.legacy-marketing-page) .profile-header-shell.profile-mobile-original { width:100vw; margin-inline:calc(50% - 50vw); }
  body.catalog-page:not(.legacy-marketing-page) .profile-header-shell .profile-identity { width:100%; }
  body:not(.legacy-marketing-page) .profile-mobile-statement { padding:24px 0 16px; }
  body.catalog-client-list:not(.legacy-marketing-page) .profile-mobile-statement { padding-bottom:var(--catalog-list-content-gap); }
  body:not(.legacy-marketing-page) .profile-mobile-statement h2 { max-width:780px; font-size:36px; line-height:1.16; }
  body:not(.legacy-marketing-page) .profile-mobile-statement h2.is-long { font-size:32px; }
  body:not(.legacy-marketing-page) .profile-links .profile-service-links-scroll { gap:10px; }
  body:not(.legacy-marketing-page) .profile-service-links-scroll > .button { min-height:40px; font-size:13px; }
  body:not(.legacy-marketing-page) .profile-header-shell .profile-mobile-contact .button { min-height:40px; height:40px; font-size:13px; }
  body:not(.legacy-marketing-page) .profile-header-shell .profile-mobile-contact .mobile-contact-call { width:40px; min-width:40px; }
  body:not(.legacy-marketing-page) .profile-header-shell .profile-links > .social-list { gap:8px; }
  body:not(.legacy-marketing-page) .profile-header-shell .profile-links > .social-list :is(.social-link,.profile-manage-action) { width:34px; min-width:34px; height:34px; min-height:34px; }

  /* Keep the useful tablet width: two cards, with the same full-width toolbar. */
  body.catalog-page:not(.catalog-layout-list) .property-grid,
  body.detail-page .related-properties .property-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  body.catalog-page.catalog-layout-list .property-grid { grid-template-columns:minmax(0,1fr); }
  body.catalog-page .catalog-filter-layout { width:100%; }
  body.catalog-page .filters { width:100%; max-width:none; }
  body.catalog-page .mobile-filter-toolbar { width:100%; max-width:none; }
  body.is-authenticated .authenticated-bottom-nav { min-height:60px; }
  body.is-authenticated .authenticated-bottom-nav > :is(a,button) { min-height:48px; }
  body.is-authenticated .authenticated-bottom-nav > :is(a,button) > span:not(.material-symbols-outlined):not(.verification-dot) { position:static; width:auto; height:auto; margin:0; clip-path:none; overflow:visible; font-size:11px; }
  body.is-authenticated .selection-dock { width:calc(100% - 48px); max-width:760px; }
  body.is-authenticated .site-footer { display:none; }

  /* Comfortable touch sheets without stretching a small form across the iPad. */
  .modal .modal-card { width:min(640px,calc(100vw - 48px)); max-width:calc(100vw - 48px); left:50%; right:auto; translate:-50% 0; padding:28px; }
  .mobile-filter-sheet { width:100%; max-width:none; left:0; right:0; translate:none; }
  .account-fullscreen-menu { max-width:720px; margin-inline:auto; }
  body.detail-page .detail-layout { grid-template-columns:minmax(0,1fr); }
  /* Reset the phone's fixed vw height as well as its ratio. Keeping both made
     the image wider than the viewport and pushed photo actions off-screen. */
  body.detail-page .gallery-main { width:100%; min-width:0; height:auto; aspect-ratio:4/3; }
  body.detail-page .detail-title h1 { font-size:36px; }
  .edit-gallery-thumbnails { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .edit-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .property-type-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }

  /* Marketing keeps its own art direction; give the three-part compositions
     a dedicated tablet arrangement instead of stretching the phone layout. */
  .discover-hero-band .discover-hero-editorial { grid-template-columns:minmax(0,1fr); gap:0; padding-block:0; }
  .discover-hero-band .discover-hero-copy { padding-block:44px; }
  .discover-hero-band .discover-hero-scene { width:calc(100% + 2 * var(--hero-edge)); height:620px; margin-left:calc(-1 * var(--hero-edge)); }
  .discover-hero-band .discover-hero-scene > .discover-hero-lifestyle { position:absolute; inset:0 0 0 auto; width:78%; height:100%; object-position:center; transform:scaleX(-1); }
  .discover-hero-band .discover-hero-device { width:300px; left:var(--hero-edge); right:auto; top:50%; bottom:auto; translate:0 -50%; }
  .discover-hero-band .discover-hero-device .discover-hero-mobile-home { height:540px; }
  .discover-hero-image-intro { display:none; }
  .discover-split-heading, .discover-people, .discover-collections, .discover-faq { grid-template-columns:minmax(0,1fr); gap:32px; }
  .discover-people-image { height:auto; min-height:0; aspect-ratio:4/3; }
  #discover-main :is(.discover-workflow-band .discover-steps-box,.discover-benefit-steps) { grid-template-columns:minmax(0,1fr); gap:24px; }
  .discover-website-customize, .discover-engagement-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .discover-close-split > .discover-close-photo { position:relative; inset:auto; width:100%; height:420px; }
  .discover-close-split > .discover-close-grid { display:block; min-height:0; }
  .discover-close-split .discover-close-copy { padding:48px 0; }
  .partner-hero { grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px; }
  .partner-intro { display:block; grid-column:1/-1; padding-right:0; }
  .partner-intro-copy { padding-left:0; }
  .partner-intro h1 { font-size:58px; }
  .partner-hero-calculator { grid-column:1; grid-row:2; width:100%; margin:0; transform:translateX(20px); }
  .partner-hero-photo { grid-column:2; grid-row:2; width:100%; max-width:350px; height:auto; min-height:0; aspect-ratio:9/16; }
  .partner-mobile-hero-action { grid-column:1/-1; }
  .partner-product-stage { display:block; position:static; height:auto; }
  .partner-product-sidebar { max-width:100%; margin-bottom:32px; }
  .partner-product-topics { display:none; }
  .partner-product-panels { gap:32px; }
  .partner-product-art { min-height:0; }
}

/* Keep the shared desktop contact row comfortable at narrower widths. */
@media (min-width:1024px) and (max-width:1366px) {
  .site-approved-hero .site-top-actions { column-gap:20px; }
}
