/* RC41 V4.0.13 — focal/mobile Perfil polishing based on authenticated
   18:49 screenshots. Presentation only: no changes to original H11 DOM, D1,
   profile save, avatar, Vant, login, V2, alerts or production. */

/* FIX #1: The source .advanced-fields summary::after selector was descendant-
   wide; it drew a second "minus" on each nested rj412 panel. Retain ONLY the
   original rj412 Chevron, and keep keyboard focus and native <details>. */
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #rj412-panel-host .rj412-complementary details.rj412-panel>summary.rj412-panel-summary::after,
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #rj412-panel-host .rj412-complementary details.rj412-panel[open]>summary.rj412-panel-summary::after{
 content:none!important;display:none!important;
 width:0!important;height:0!important;
 background:none!important;border:0!important;box-shadow:none!important;
}

/* FIX #2: The same legacy advanced-fields summary rule hid <small> on mobile.
   Restore all the concise section descriptors in NEW panel headings only. */
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #rj412-panel-host .rj412-complementary summary.rj412-panel-summary
 .rj412-panel-title>small{
 display:block!important;visibility:visible!important;
 margin:0!important;max-width:100%!important;
 color:#aac6d0!important;font:450 11px/1.4 Inter,system-ui,sans-serif!important;
 letter-spacing:normal!important;
}

/* FIX #3: Older v4.0/glass rules had more selector weight than the v4.0.12
   container reset and painted an outer hard rectangle around every panel. */
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile #profileCard,
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile #profileViewHost{
 display:block!important;width:100%!important;max-width:100%!important;
 min-width:0!important;
 border:0!important;outline:0!important;border-radius:0!important;
 padding:0!important;margin:0!important;
 background:none!important;background-image:none!important;
 box-shadow:none!important;filter:none!important;
 overflow:visible!important;
}
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile #profileCard::before,
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile #profileCard::after{
 content:none!important;display:none!important;
}

/* FIX #4: Compact the original native toolbar; leave each original action and
   H11 save-state node connected, not moved again or duplicated. */
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #rj3-profile-overview>.rj412-header-tools{
 width:100%!important;min-width:0!important;display:flex!important;
 justify-content:flex-start!important;align-items:center!important;
 margin:0!important;padding:0!important;border:0!important;
 background:none!important;box-shadow:none!important;
}
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #rj3-profile-overview .rj412-header-tools>.small-actions{
 display:flex!important;flex-direction:row!important;
 flex-wrap:wrap!important;justify-content:flex-start!important;
 align-items:center!important;gap:8px!important;
 width:auto!important;max-width:100%!important;
 min-width:0!important;margin:0!important;padding:0!important;
 border:0!important;background:none!important;box-shadow:none!important;
}
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #rj3-profile-overview .rj412-header-tools .small-actions #profileSaveState{
 display:inline-flex!important;align-items:center!important;order:0!important;
 align-self:center!important;justify-self:auto!important;flex:0 0 auto!important;
 width:auto!important;max-width:100%!important;
 min-height:37px!important;margin:0!important;
 padding:7px 11px!important;
 font:680 11px/1.25 Inter,system-ui,sans-serif!important;
}
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #rj3-profile-overview .rj412-header-tools .small-actions button#loadLegalExample{
 display:inline-flex!important;align-items:center!important;
 align-self:center!important;justify-content:center!important;
 order:1!important;flex:0 0 auto!important;
 width:auto!important;min-width:0!important;max-width:100%!important;
 min-height:37px!important;margin:0!important;padding:8px 11px!important;
 border:1px solid rgba(78,188,201,.25)!important;border-radius:10px!important;
 background:rgba(0,35,49,.24)!important;box-shadow:none!important;
 color:#c0d8e2!important;font:680 11px/1.2 Inter,system-ui,sans-serif!important;
}

/* FIX #5: The double label under Experience redundantly repeated the parent.
   Keep all native text in DOM for assistive technologies and H11 listeners. */
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #rj412-experience .profile-structured-head>div>span{
 display:none!important;
}
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #rj412-experience .profile-structured-head>div>h3{
 position:absolute!important;width:1px!important;height:1px!important;
 padding:0!important;margin:-1px!important;overflow:hidden!important;
 clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}

/* FIX #6: One compact results surface in mobile; no stretched empty grid row
   after recommendations. Keep bottom clearance for fixed five-item nav. */
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile{
 align-content:start!important;grid-auto-rows:max-content!important;
 min-height:0!important;height:auto!important;
 row-gap:12px!important;
 padding-bottom:max(82px,calc(env(safe-area-inset-bottom) + 75px))!important;
}
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile #profileQualityHost{
 margin:8px 0 0!important;padding:0!important;
 min-height:0!important;align-self:start!important;
}

/* User can distinguish actual completion from a fake 85% value. */
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile .rj412-progress-hint{
 font-size:10px!important;line-height:1.4!important;max-width:45ch!important;
}
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #rj412-panel-host details.rj412-panel>summary.rj412-panel-summary:focus-visible,
body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
 #loadLegalExample:focus-visible{
 outline:2px solid #acffff!important;outline-offset:3px!important;
}

/* No hidden-field regression: profile accordion content remains native,
   and 44px touch targets apply to both primary and secondary controls. */
@media(max-width:610px){
 body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
  #rj3-profile-overview .rj412-header-tools .small-actions button#loadLegalExample,
 body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
  #rj3-profile-overview .rj412-header-tools .small-actions #profileSaveState{
  min-height:42px!important;
 }
 body.rj3-ux-ready.role-session-active.rj412-profile-ready #viewProfile
  #rj412-panel-host .rj412-panel-summary{
  min-height:58px!important;
 }
}
