/* Mobile profile: full-width surfaces with readable, touch-friendly content. */
@media(max-width:820px){
  body:is(.logged-in,.guest-workspace).profile-view>#profilePage{width:100%!important;max-width:none!important;margin:0!important;padding:0 0 calc(100px + env(safe-area-inset-bottom))!important}
  #profilePage .dossier-hero{width:100%;margin:0 0 12px;border-radius:0;box-shadow:none;border-left:0;border-right:0}
  #profilePage .dossier-cover{height:156px}
  #profilePage .dossier-cover:before{display:none}
  #profilePage .dossier-cover:after{right:20px;top:32px;font-size:100px}
  #profilePage .profile-cover-actions{top:12px;right:12px;left:auto;max-width:calc(100% - 24px)}
  #profilePage .profile-cover-actions button{font-size:12px;min-height:44px;padding:8px 12px}
  #profilePage #coverUploadButton{right:12px;bottom:12px;min-height:44px;font-size:12px;padding:8px 12px}
  #profilePage .dossier-identity{display:grid;grid-template-columns:88px minmax(0,1fr);gap:0 12px;padding:0 16px 16px;align-items:start}
  #profilePage .story-avatar-wrap{margin-top:-32px;width:88px}
  #profilePage .story-avatar-wrap .dossier-avatar{width:88px;height:88px;border-width:4px}
  #profilePage .dossier-name{padding:12px 0 0;min-width:0}
  #profilePage .name-row h1{font-size:26px;line-height:1.2;letter-spacing:-.3px}
  #profilePage .dossier-name>p{font-size:14px;line-height:1.45;margin:5px 0 8px;overflow-wrap:anywhere}
  #profilePage .identity-meta{font-size:12px;line-height:1.6;gap:4px 0}
  #profilePage .identity-meta>span{overflow-wrap:anywhere}
  #profilePage .identity-meta>span+span:before{margin:0 7px}
  #profileOwnerActions,#profileMemberActions{grid-column:1/-1;width:100%;max-width:none;margin:0;padding:14px 0 0;display:flex;gap:10px;justify-content:flex-start}
  #profileOwnerActions>button,#profileMemberActions>button{flex:1;min-height:44px;font-size:14px}
  #profileMemberActions small{font-size:12px;text-align:left;line-height:1.5}
  #profilePage .dossier-stats{padding:12px 16px;gap:24px;justify-content:flex-start;flex-wrap:wrap}
  #profilePage .dossier-stats div{padding-right:20px}#profilePage .dossier-stats strong{font-size:22px}#profilePage .dossier-stats span{font-size:12px}
  #profilePage .dossier-grid{width:100%;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:0}
  #profilePage :is(.dossier-left,.dossier-main,.dossier-side){display:grid;grid-template-columns:minmax(0,1fr);position:static;width:100%;min-width:0;gap:12px}
  #profilePage:not(.editing) .dossier-left{display:none}
  #profilePage .dossier-card{width:100%;min-width:0;margin:0;padding:20px 16px;border-radius:0;border-left:0;border-right:0;box-shadow:none}
  #profilePage .section-heading{margin-bottom:12px}#profilePage .section-heading h2{font-size:22px;line-height:1.3}
  #profilePage .eyebrow{font-size:11px;line-height:1.4;letter-spacing:1.2px;margin-bottom:7px}
  #profilePage :is(.long-value,.profile-value.long-value,.timeline-item>p){font-size:14px;line-height:1.65}
  #profilePage .timeline-head{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start}
  #profilePage .timeline-head>div{min-width:0;flex:1 1 160px}#profilePage .timeline-head h3{font-size:19px;line-height:1.35;overflow-wrap:anywhere}
  #profilePage .timeline-head strong{font-size:13px;line-height:1.5;overflow-wrap:anywhere}
  #profilePage .timeline-head time{font-size:11px;line-height:1.5;margin:0;white-space:normal}
  #profilePage .timeline-meta{font-size:12px;line-height:1.5}#profilePage .timeline-item{padding-bottom:20px}
  #profilePage .details-card label{font-size:12px;line-height:1.5;padding:10px 0}#profilePage .details-card .profile-value{font-size:14px;line-height:1.6}
  #profilePage .resume-split{grid-template-columns:minmax(0,1fr)}#profilePage .resume-split h3{font-size:17px;line-height:1.4}
  #profilePage .tag-list>span{font-size:13px;line-height:1.5;padding:6px 9px}
  #profilePage.editing :is(input,textarea,select){font-size:16px!important;line-height:1.5;max-width:100%}
  #profilePage.editing :is(input:not([type=checkbox]),select){min-height:44px}
  #profilePage .entry-grid{grid-template-columns:minmax(0,1fr)}#profilePage .entry-grid label{font-size:13px;line-height:1.5;min-width:0}
  #profilePage .profile-section-save>button{min-height:44px;font-size:14px}#profilePage #profileSaveBar{margin:12px 8px 0}
}
@media(max-width:360px){#profilePage .dossier-identity{grid-template-columns:76px minmax(0,1fr);gap:0 10px;padding-inline:12px}#profilePage .story-avatar-wrap,#profilePage .story-avatar-wrap .dossier-avatar{width:76px}#profilePage .story-avatar-wrap .dossier-avatar{height:76px}#profilePage .name-row h1{font-size:24px}#profilePage .dossier-card{padding-inline:12px}}

/* More compact reading scale for phone screens. */
@media(max-width:820px){
 #profilePage .name-row h1{font-size:23px}
 #profilePage .section-heading h2{font-size:19px;line-height:1.3}
 #profilePage .dossier-name>p{font-size:13px}
 #profilePage .identity-meta{font-size:11px}
 #profilePage :is(.long-value,.profile-value.long-value,.timeline-item>p,.dossier-post p){font-size:13px;line-height:1.6}
 #profilePage .timeline-head h3{font-size:17px}
 #profilePage .timeline-head strong{font-size:12px}
 #profilePage .timeline-meta{font-size:11px}
 #profilePage .details-card .profile-value{font-size:13px}
 #profilePage .resume-split h3{font-size:15px}
 #profilePage .tag-list>span{font-size:12px}
 #profilePage .eyebrow{font-size:10px}
 #profilePage .dossier-stats strong{font-size:20px}
 #profilePage .dossier-stats span{font-size:11px}
}
@media(max-width:360px){#profilePage .name-row h1{font-size:22px}}

/* Match the desktop rail’s spacing below the shared header. */
@media(min-width:62.5625rem){body:is(.logged-in,.guest-workspace).profile-view>#profilePage{padding-top:1.5rem!important}}
