/* V135: Audit Workday mobile fit/no-cut fix.
   Keeps desktop premium layout, but on phones/tablets the workbook uses the real app width,
   natural page scroll, compact cards, and smaller English/Hinglish text so nothing is half-cut. */

/* Base containment: the Audit Workday must never use 100vw inside the app card. */
#workdaySection,
#workdaySection *,
#workdayList,
.workday-insert-root,
.workday-shell,
.workday-v113-academy,
.workday-v135-mobile-fit{
  box-sizing:border-box!important;
}

#workdaySection{
  min-width:0!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  overflow-y:visible!important;
}

#workdaySection .section-card{
  min-width:0!important;
  max-width:100%!important;
  overflow:visible!important;
}

#workdayList,
.workday-insert-root{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:hidden!important;
  overflow-y:visible!important;
}

#workdayList > .workday-v135-mobile-fit,
.workday-v135-mobile-fit.workday-shell{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:auto!important;
  overflow-x:hidden!important;
  overflow-y:visible!important;
  margin:0!important;
}

.workday-v135-mobile-fit .academy-header,
.workday-v135-mobile-fit .academy-rail,
.workday-v135-mobile-fit .academy-body,
.workday-v135-mobile-fit .academy-stage,
.workday-v135-mobile-fit .academy-side,
.workday-v135-mobile-fit .active-stage-shell,
.workday-v135-mobile-fit .stage-start-card,
.workday-v135-mobile-fit .stage-headline,
.workday-v135-mobile-fit .interactive-task,
.workday-v135-mobile-fit .learning-concept,
.workday-v135-mobile-fit .manager-report-card,
.workday-v135-mobile-fit .v118-language-card{
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}

/* Shared compact typography for both English and Hinglish text blocks. */
.workday-v135-mobile-fit p,
.workday-v135-mobile-fit span,
.workday-v135-mobile-fit small,
.workday-v135-mobile-fit button,
.workday-v135-mobile-fit label,
.workday-v135-mobile-fit input,
.workday-v135-mobile-fit textarea,
.workday-v135-mobile-fit select{
  max-width:100%!important;
}

.workday-v135-mobile-fit .academy-side:empty,
.workday-v135-mobile-fit .academy-side.v118-side-clean:empty{
  display:none!important;
}

/* Desktop/tablet: keep it inside app shell, avoid right-side clipping. */
@media (min-width:761px){
  .workday-v135-mobile-fit{
    padding:12px!important;
  }
  .workday-v135-mobile-fit .academy-body{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .workday-v135-mobile-fit .academy-side.v118-side-clean:empty{
    display:none!important;
  }
}

/* Main mobile repair. */
@media (max-width:760px){
  html, body{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }

  body.audit-workday-active{
    padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;
  }

  .workspace{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:8px 8px calc(118px + env(safe-area-inset-bottom,0px))!important;
    gap:9px!important;
    overflow-x:hidden!important;
  }

  #workdaySection .section-card{
    width:100%!important;
    max-width:100%!important;
    padding:8px!important;
    border-radius:16px!important;
    overflow:visible!important;
  }

  #workdaySection .section-head{
    align-items:flex-start!important;
    gap:8px!important;
    margin-bottom:8px!important;
  }
  #workdaySection .section-head h3{font-size:16px!important;line-height:1.1!important;}
  #workdaySection .section-head .eyebrow{font-size:8px!important;letter-spacing:.11em!important;}
  #workdaySection .section-head small{font-size:10px!important;line-height:1.25!important;}
  #workdayRefreshBtn{min-height:30px!important;padding:0 9px!important;font-size:10px!important;border-radius:11px!important;}

  #workdayList > .workday-v135-mobile-fit,
  .workday-v135-mobile-fit.workday-shell{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:auto!important;
    padding:0!important;
    gap:7px!important;
    display:grid!important;
    overflow:visible!important;
  }

  .workday-v135-mobile-fit .academy-header{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    padding:9px!important;
    border-radius:15px!important;
    overflow:visible!important;
  }
  .workday-v135-mobile-fit .academy-header h3{
    font-size:20px!important;
    line-height:1.04!important;
    letter-spacing:-.045em!important;
    margin:3px 0 4px!important;
  }
  .workday-v135-mobile-fit .academy-header > div:first-child > span{
    display:block!important;
    font-size:10.5px!important;
    line-height:1.33!important;
    color:rgba(232,238,250,.70)!important;
    -webkit-line-clamp:3!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }
  .workday-v135-mobile-fit .academy-header .eyebrow{
    font-size:7.8px!important;
    letter-spacing:.10em!important;
    line-height:1.2!important;
  }

  .workday-v135-mobile-fit .academy-status-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  .workday-v135-mobile-fit .academy-status-grid article{
    padding:7px!important;
    border-radius:12px!important;
    min-height:46px!important;
  }
  .workday-v135-mobile-fit .academy-status-grid strong{
    font-size:12px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .workday-v135-mobile-fit .academy-status-grid small{
    font-size:8.5px!important;
    line-height:1.15!important;
    margin-top:3px!important;
  }

  /* Use horizontal stage rail, not a long vertical rail that cuts the workbook in half. */
  .workday-v135-mobile-fit .academy-rail{
    display:flex!important;
    gap:6px!important;
    padding:6px!important;
    border-radius:14px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
  }
  .workday-v135-mobile-fit .academy-rail::-webkit-scrollbar{display:none!important;}
  .workday-v135-mobile-fit .phase-step{
    flex:0 0 132px!important;
    width:132px!important;
    min-width:132px!important;
    min-height:52px!important;
    height:auto!important;
    padding:8px!important;
    border-radius:12px!important;
  }
  .workday-v135-mobile-fit .phase-step b{
    font-size:10.5px!important;
    line-height:1.12!important;
    max-height:24px!important;
    overflow:hidden!important;
  }
  .workday-v135-mobile-fit .phase-step span,
  .workday-v135-mobile-fit .phase-step small{
    font-size:8.4px!important;
    line-height:1.1!important;
  }

  .workday-v135-mobile-fit .academy-body{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    overflow:visible!important;
  }
  .workday-v135-mobile-fit .academy-stage{
    padding:7px!important;
    border-radius:15px!important;
    overflow:visible!important;
    min-height:auto!important;
  }
  .workday-v135-mobile-fit .academy-side.v118-side-clean{
    display:none!important;
  }

  .workday-start-window-card{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin:7px 0!important;
    padding:9px!important;
    border-radius:14px!important;
  }
  .workday-start-window-card strong,
  .workday-start-window-card.is-open strong{
    font-size:16px!important;
    line-height:1.08!important;
  }
  .workday-start-window-card small{
    font-size:10px!important;
    line-height:1.3!important;
  }
  .gate-kicker,
  .workday-secure-note-v126 .gate-kicker{
    font-size:7.8px!important;
    letter-spacing:.10em!important;
    padding:4px 7px!important;
  }

  .workday-secure-note-v126{
    grid-template-columns:1fr!important;
    gap:7px!important;
    padding:8px!important;
    margin:7px 0!important;
    border-radius:14px!important;
  }
  .workday-secure-note-v126 strong{font-size:11px!important;line-height:1.18!important;}
  .workday-secure-note-v126 small{font-size:9.5px!important;line-height:1.25!important;}
  .workday-secure-note-v126 button{min-height:32px!important;font-size:10px!important;border-radius:11px!important;}

  .workday-v135-mobile-fit .stage-start-card,
  .workday-v135-mobile-fit .language-hero,
  .workday-v135-mobile-fit .v118-language-card,
  .workday-v135-mobile-fit .stage-headline,
  .workday-v135-mobile-fit .learning-concept,
  .workday-v135-mobile-fit .interactive-task,
  .workday-v135-mobile-fit .manager-report-card,
  .workday-v135-mobile-fit .assessment-warning,
  .workday-v135-mobile-fit .locked-banner,
  .workday-v135-mobile-fit .report-language-note,
  .workday-v135-mobile-fit .manager-fit-note{
    padding:9px!important;
    border-radius:14px!important;
    overflow:visible!important;
  }
  .workday-v135-mobile-fit .active-stage-shell{
    gap:7px!important;
  }
  .workday-v135-mobile-fit .stage-headline h3,
  .workday-v135-mobile-fit .stage-start-card h3,
  .workday-v135-mobile-fit .language-hero h3,
  .workday-v135-mobile-fit .v118-language-card h3,
  .workday-v135-mobile-fit .manager-report-card h3{
    font-size:18px!important;
    line-height:1.08!important;
    letter-spacing:-.035em!important;
    margin:3px 0 5px!important;
  }
  .workday-v135-mobile-fit .stage-headline span,
  .workday-v135-mobile-fit .stage-start-card p,
  .workday-v135-mobile-fit .language-hero p,
  .workday-v135-mobile-fit .v118-language-card p,
  .workday-v135-mobile-fit .task-head p,
  .workday-v135-mobile-fit .learning-concept p,
  .workday-v135-mobile-fit .example-box,
  .workday-v135-mobile-fit .mistake-box,
  .workday-v135-mobile-fit .manager-fit-note span,
  .workday-v135-mobile-fit .report-language-note span{
    font-size:10.5px!important;
    line-height:1.34!important;
  }

  .workday-v135-mobile-fit .stage-rules-grid,
  .workday-v135-mobile-fit .learning-card-grid,
  .workday-v135-mobile-fit .choice-card-grid,
  .workday-v135-mobile-fit .hunt-card-grid,
  .workday-v135-mobile-fit .flow-step-pool,
  .workday-v135-mobile-fit .flow-order-strip,
  .workday-v135-mobile-fit .report-hero-grid,
  .workday-v135-mobile-fit .field-score-grid,
  .workday-v135-mobile-fit .v113-report-scores{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
  }
  .workday-v135-mobile-fit .stage-rules-grid div,
  .workday-v135-mobile-fit .report-hero-grid article,
  .workday-v135-mobile-fit .field-score-grid article{
    padding:8px!important;
    border-radius:12px!important;
  }
  .workday-v135-mobile-fit .stage-rules-grid strong,
  .workday-v135-mobile-fit .report-hero-grid strong,
  .workday-v135-mobile-fit .field-score-grid strong{
    font-size:11.5px!important;
    line-height:1.15!important;
  }
  .workday-v135-mobile-fit .stage-rules-grid span,
  .workday-v135-mobile-fit .report-hero-grid span,
  .workday-v135-mobile-fit .field-score-grid span,
  .workday-v135-mobile-fit .report-hero-grid small{
    font-size:9.5px!important;
    line-height:1.24!important;
  }

  .workday-v135-mobile-fit .stage-timer-card,
  .workday-v135-mobile-fit .time-buy-panel{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
    padding:8px!important;
    border-radius:13px!important;
  }
  .workday-v135-mobile-fit .stage-timer-card strong{
    font-size:17px!important;
    line-height:1.05!important;
  }
  .workday-v135-mobile-fit .stage-timer-card span,
  .workday-v135-mobile-fit .stage-timer-card small,
  .workday-v135-mobile-fit .time-buy-panel small{
    font-size:9.5px!important;
    line-height:1.25!important;
  }
  .workday-v135-mobile-fit [data-buy-time],
  .workday-v135-mobile-fit .premium-action,
  .workday-v135-mobile-fit .secondary-btn,
  .workday-v135-mobile-fit .glass-btn{
    min-height:34px!important;
    height:auto!important;
    padding:8px 10px!important;
    border-radius:12px!important;
    font-size:10px!important;
    line-height:1.15!important;
    white-space:normal!important;
  }

  .workday-v135-mobile-fit .concept-top{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
  }
  .workday-v135-mobile-fit .learning-concept h4,
  .workday-v135-mobile-fit .task-head h4{
    font-size:13px!important;
    line-height:1.16!important;
    margin:2px 0 5px!important;
  }
  .workday-v135-mobile-fit .task-head span,
  .workday-v135-mobile-fit .concept-top span,
  .workday-v135-mobile-fit .example-box span,
  .workday-v135-mobile-fit .mistake-box span{
    font-size:8.2px!important;
    letter-spacing:.10em!important;
  }
  .workday-v135-mobile-fit .choice-card-grid button,
  .workday-v135-mobile-fit .hunt-card-grid button,
  .workday-v135-mobile-fit .flow-step-pool button,
  .workday-v135-mobile-fit .flow-order-strip button,
  .workday-v135-mobile-fit .language-choice-grid button{
    min-height:34px!important;
    padding:8px!important;
    border-radius:12px!important;
    font-size:10.2px!important;
    line-height:1.25!important;
    text-align:left!important;
    white-space:normal!important;
  }
  .workday-v135-mobile-fit .v118-language-buttons,
  .workday-v135-mobile-fit .language-choice-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    max-width:100%!important;
  }

  .workday-v135-mobile-fit .task-actions,
  .workday-v135-mobile-fit .stage-action-row{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
  }
  .workday-v135-mobile-fit .confidence-row{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
  }
  .workday-v135-mobile-fit .confidence-row span,
  .workday-v135-mobile-fit .confidence-row button{
    font-size:9px!important;
    min-height:30px!important;
    padding:6px!important;
  }

  /* Bottom camera/mic widget should not hide Workday buttons/content. */
  .secure-session-widget-v81,
  #secureSessionWidgetV81{
    left:8px!important;
    right:8px!important;
    bottom:calc(8px + env(safe-area-inset-bottom,0px))!important;
    max-width:none!important;
    grid-template-columns:32px minmax(0,1fr) auto!important;
    gap:6px!important;
    padding:7px!important;
    border-radius:14px!important;
  }
  .secure-session-widget-v81 .secure-preview{
    width:32px!important;
    height:32px!important;
    border-radius:11px!important;
  }
  .secure-session-widget-v81 strong{font-size:10px!important;line-height:1.1!important;}
  .secure-session-widget-v81 span{font-size:8.8px!important;line-height:1.12!important;}
  .secure-session-widget-v81 button{min-height:29px!important;padding:0 8px!important;font-size:9px!important;border-radius:10px!important;}
}

/* Extra-small devices: squeeze typography further without hiding content. */
@media (max-width:390px){
  .workspace{padding-left:6px!important;padding-right:6px!important;}
  #workdaySection .section-card{padding:6px!important;}
  .workday-v135-mobile-fit .academy-header h3{font-size:18px!important;}
  .workday-v135-mobile-fit .stage-headline h3,
  .workday-v135-mobile-fit .stage-start-card h3,
  .workday-v135-mobile-fit .language-hero h3,
  .workday-v135-mobile-fit .v118-language-card h3,
  .workday-v135-mobile-fit .manager-report-card h3{font-size:16.5px!important;}
  .workday-v135-mobile-fit .academy-header > div:first-child > span,
  .workday-v135-mobile-fit .stage-headline span,
  .workday-v135-mobile-fit .stage-start-card p,
  .workday-v135-mobile-fit .task-head p,
  .workday-v135-mobile-fit .learning-concept p{font-size:9.8px!important;line-height:1.3!important;}
  .workday-v135-mobile-fit .phase-step{flex-basis:122px!important;width:122px!important;min-width:122px!important;}
}
