/* ==========================================================================
   AIAI_MOBILE_EXPLORER_WORLDCLASS_CLOSURE_V1
   Mobile Explorer only. No desktop rules.

   Product rule:
   - Discovery state can explain.
   - Results state gets out of the way.
   - One tool appears once per task.
   - One clear winner, then nearby alternatives.
   - No directory-style result counts.
   ========================================================================== */

@media (max-width:760px){
  body.page-explorer .aiai-mx-sr-only{
    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;
  }

  /* Results are a compact working state, not a second landing page. */
  body.page-explorer .aiai-mx.is-results{
    padding-top:20px!important;
  }

  body.page-explorer .aiai-mx.is-results .aiai-mx-intro{
    padding-bottom:18px!important;
  }

  body.page-explorer .aiai-mx.is-results .aiai-mx-intro::before{
    display:none!important;
  }

  body.page-explorer .aiai-mx.is-results .aiai-mx-composer{
    margin-top:0!important;
  }

  body.page-explorer .aiai-mx.is-results .aiai-mx-composer-main{
    min-height:60px!important;
  }

  body.page-explorer .aiai-mx.is-results .aiai-mx-runway{
    padding-top:20px!important;
  }

  /* The field has one hint only. */
  body.page-explorer .aiai-mx-composer-shell{
    overflow:hidden!important;
  }

  /* Empty-state examples should read as actions, not footer-like inline text. */
  body.page-explorer .aiai-mx-prompts{
    gap:7px!important;
    padding:2px 0 5px!important;
  }

  body.page-explorer .aiai-mx-prompts b{
    margin-left:2px!important;
  }

  body.page-explorer .aiai-mx-prompts a{
    min-height:32px!important;
    display:inline-flex!important;
    align-items:center!important;
    padding:0 10px!important;
    border:1px solid #E7E3DA!important;
    border-radius:999px!important;
    background:#FBFAF7!important;
    color:#5F625B!important;
    font-size:10.8px!important;
  }

  body.page-explorer .aiai-mx-prompts i{
    display:none!important;
  }

  /* One concise title, no result counter. */
  body.page-explorer .aiai-mx-runway-head{
    align-items:center!important;
  }

  body.page-explorer .aiai-mx-runway-head h2{
    margin:0!important;
  }

  /* Nearby alternatives are a subordinate layer beneath the winner. */
  body.page-explorer .aiai-mx-secondary-head{
    margin-top:18px!important;
    padding:0 0 8px!important;
    border-bottom:1px solid var(--mx-line-soft)!important;
  }

  body.page-explorer .aiai-mx-secondary-head span{
    color:var(--mx-gold-deep)!important;
    font-size:10.5px!important;
    font-weight:700!important;
  }

  body.page-explorer .aiai-mx-stream-item{
    padding-top:14px!important;
    padding-bottom:14px!important;
  }

  body.page-explorer .aiai-mx-stream-actions{
    min-height:40px!important;
    display:flex!important;
    align-items:center!important;
  }

  body.page-explorer .aiai-mx-stream-actions>a{
    min-height:40px!important;
    display:inline-flex!important;
    align-items:center!important;
    padding:0 2px!important;
  }

  /* Progressive disclosure is about additional choices, not search-engine counts. */
  body.page-explorer .aiai-mx-more>summary{
    min-height:52px!important;
  }

  body.page-explorer .aiai-mx-more>summary span{
    font-size:11.5px!important;
  }
}

/* AIAI_MOBILE_EXPLORER_WORLDCLASS_PRECISION_V1 */
@media (max-width:760px){

  /* One demonstration is enough; the prompt chips already expose other examples. */
  body.page-explorer .aiai-mx.is-discovery .aiai-mx-runway-head{
    margin-bottom:10px!important;
  }

  /* "بدائل قريبة" is a real information layer, not tiny metadata. */
  body.page-explorer .aiai-mx-secondary-head{
    margin-top:20px!important;
    padding-bottom:10px!important;
  }

  body.page-explorer .aiai-mx-secondary-head span{
    font-size:12px!important;
    letter-spacing:0!important;
  }

  /* Secondary alternatives should scan in seconds; the full reasoning is in the verdict. */
  body.page-explorer .aiai-mx-secondary-reason{
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    overflow:hidden!important;
    max-height:3.5em!important;
  }

  /* Without a ranking label, tool identity gets a little more breathing room. */
  body.page-explorer .aiai-mx-tool-mini{
    min-height:34px!important;
    align-items:center!important;
  }

  body.page-explorer .aiai-mx-tool-mini>b{
    margin-inline-start:2px!important;
  }

  /* Explicit action wording for progressive disclosure. */
  body.page-explorer .aiai-mx-more>summary{
    min-height:54px!important;
    padding-inline:2px!important;
  }

  body.page-explorer .aiai-mx-more>summary span{
    font-size:12px!important;
    font-weight:700!important;
  }
}

/* AIAI_MOBILE_EXPLORER_HEADER_SEAM_FIX_V1
   Explorer must meet the shared global header with the same straight seam
   used by the rest of the mobile product. No page-owned arc/corner treatment.
*/
@media (max-width:760px){
  body.page-explorer > main,
  body.page-explorer .aiai-mx{
    border-radius:0!important;
    clip-path:none!important;
  }

  body.page-explorer .aiai-mx{
    margin-top:0!important;
  }

  /* Defensive neutralization of the retired V8 curved header geometry. */
  body.page-explorer > .aiai-v8-header,
  body.page-explorer > .aiai-v8-header::before,
  body.page-explorer > .aiai-v8-header::after{
    display:none!important;
    content:none!important;
    border-radius:0!important;
  }
}

/* AIAI_MOBILE_EXPLORER_HEADER_SEAM_FIX_V2
   The visible curve is not the Explorer content section itself.
   Flatten the whole page handoff surface, including any legacy/main pseudo-layer.
*/
@media (max-width:760px){

  body.page-explorer > main{
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    clip-path:none!important;
    -webkit-clip-path:none!important;
    -webkit-mask:none!important;
    mask:none!important;
    box-shadow:none!important;
    overflow:visible!important;
    background:var(--mx-paper)!important;
  }

  body.page-explorer > main::before,
  body.page-explorer > main::after{
    display:none!important;
    content:none!important;
    width:0!important;
    height:0!important;
    border:0!important;
    border-radius:0!important;
    clip-path:none!important;
    -webkit-clip-path:none!important;
    -webkit-mask:none!important;
    mask:none!important;
    box-shadow:none!important;
  }

  body.page-explorer .aiai-mx{
    margin-top:0!important;
    border:0!important;
    border-radius:0!important;
    clip-path:none!important;
    -webkit-clip-path:none!important;
    -webkit-mask:none!important;
    mask:none!important;
    box-shadow:none!important;
    background:var(--mx-paper)!important;
  }

  body.page-explorer .aiai-mx::before,
  body.page-explorer .aiai-mx::after{
    display:none!important;
    content:none!important;
    border-radius:0!important;
  }

  /* Retired page-specific header can never paint a seam under the global header. */
  body.page-explorer .aiai-v8-header::before,
  body.page-explorer .aiai-v8-header::after{
    display:none!important;
    content:none!important;
    width:0!important;
    height:0!important;
    opacity:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
}

/* AIAI_EXPLORER_STRAIGHT_SEAM_FINAL
   Root cause:
   approved mobile reference gives every luminous <main> a 28px top radius.
   Explorer uses the shared global mobile header and requires a straight handoff.
*/
@media (max-width:760px){
  body.public-design-v440.aiai-luminous-internal-v1.page-explorer > main{
    border-radius:0!important;
    box-shadow:none!important;
  }
}
