
/* Portrait sheet: preserve the full Numbers sheet at native width. Phones and
   tablets start fitted; Edit 100% switches to natural size on demand. */
.portrait-sheet-tools{display:none}
@media screen and (orientation:portrait) and (max-width:1100px){
 #report-view .portrait-sheet-tools{display:flex;justify-content:flex-end;margin:3px 0 7px}
 #report-view #portrait-sheet-toggle{padding:6px 10px;min-height:32px;font-size:12px}
 #report-view .paper-scroll{max-width:100%}
}
@media screen{
 #report-view .paper-scroll.portrait-sheet-measuring .portrait-sheet-stage>.paper,
 #report-view .paper-scroll.portrait-sheet-fit .portrait-sheet-stage>.paper,
 #report-view .paper-scroll.portrait-sheet-actual .portrait-sheet-stage>.paper{
  width:var(--portrait-sheet-natural-width,960px)!important;
  min-width:0!important;max-width:none!important;margin:0!important
 }
 #report-view .paper-scroll.portrait-sheet-measuring .numbers-table-scroll,
 #report-view .paper-scroll.portrait-sheet-fit .numbers-table-scroll{
  max-width:none!important;overflow:visible!important
 }
 #report-view .paper-scroll.portrait-sheet-measuring #original-numbers-grid,
 #report-view .paper-scroll.portrait-sheet-fit #original-numbers-grid{
  max-width:none!important;overflow:visible!important
 }
 #report-view .paper-scroll.portrait-sheet-fit{overflow-x:hidden!important}
 #report-view .paper-scroll.portrait-sheet-fit .portrait-sheet-stage{
  width:100%;height:var(--portrait-sheet-height,1040px);
  position:relative;min-width:0
 }
 #report-view .paper-scroll.portrait-sheet-fit .portrait-sheet-stage>.paper{
  position:absolute;left:0;top:0;
  transform:scale(var(--portrait-sheet-scale,1));
  transform-origin:top left
 }
 /* Edit 100% must have ONE horizontal scroll owner. Chrome Android otherwise
    captures swipes inside the nested Numbers table's overflow-x:auto wrappers
    (which may have no free scroll range) and the worksheet appears frozen. */
 #report-view .paper-scroll.portrait-sheet-actual{
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-x pan-y pinch-zoom;
 }
 #report-view .paper-scroll.portrait-sheet-actual #original-numbers-grid,
 #report-view .paper-scroll.portrait-sheet-actual #original-numbers-grid .numbers-table-scroll{
  overflow:visible!important;
  max-width:none!important
 }
 #report-view .paper-scroll.portrait-sheet-actual .portrait-sheet-stage{
  width:var(--portrait-sheet-natural-width,960px);
  min-width:var(--portrait-sheet-natural-width,960px);
  max-width:none;height:auto
 }
 #report-view .paper-scroll.portrait-sheet-actual .portrait-sheet-stage>.paper{
  position:relative;transform:none
 }
 /* Even on iPhone, don't collapse Numbers source header into one column
    before scaling it: preserve the original full-sheet arrangement. */
 #report-view .paper-scroll.portrait-sheet-fit #original-numbers-grid .numbers-head-fields,
 #report-view .paper-scroll.portrait-sheet-measuring #original-numbers-grid .numbers-head-fields{
  grid-template-columns:55% 45%!important;gap:5px 7px!important
 }
 #report-view .paper-scroll.portrait-sheet-fit #original-numbers-grid .numbers-header-name,
 #report-view .paper-scroll.portrait-sheet-measuring #original-numbers-grid .numbers-header-name{
  grid-column:1!important;grid-row:1!important
 }
 #report-view .paper-scroll.portrait-sheet-fit #original-numbers-grid .numbers-header-duration,
 #report-view .paper-scroll.portrait-sheet-measuring #original-numbers-grid .numbers-header-duration{
  grid-column:2!important;grid-row:1!important
 }
 #report-view .paper-scroll.portrait-sheet-fit #original-numbers-grid .numbers-header-birth,
 #report-view .paper-scroll.portrait-sheet-measuring #original-numbers-grid .numbers-header-birth{
  grid-column:1!important;grid-row:2!important
 }
 #report-view .paper-scroll.portrait-sheet-fit #original-numbers-grid .numbers-header-plan,
 #report-view .paper-scroll.portrait-sheet-measuring #original-numbers-grid .numbers-header-plan{
  grid-column:2!important;grid-row:2!important
 }
}
/* Android Chrome: when the button says "Edit 100%" the worksheet is in
   Fit mode. overflow-x:hidden made the full-size wrapper a scroll container
   on Android, even though it has no vertical scroll range, trapping vertical
   one-finger gestures over the worksheet. Clip it without making a scroller;
   let the normal page own vertical movement. Keep iOS/older iPad unchanged. */
@supports (overflow:clip){
 @media screen and (orientation:portrait) and (max-width:1100px){
  html.iep-android-touch #report-view .paper-scroll.portrait-sheet-fit{
   overflow-x:clip!important;
   overflow-y:visible!important;
   touch-action:pan-y pinch-zoom;
  }
 }
}
/* Android browser-engine fix: prevent editable Numbers textarea and nested
   scroll wrappers from taking over one-finger pan. Our capture touch listener
   handles X/Y only after an intentional drag; native two-finger pinch stays.
   Only portrait phone/tablet IEP; does not affect iOS, print, PDF or imports. */
@media screen{
 html.iep-android-touch #report-view .paper-scroll.portrait-sheet-actual{
  touch-action:pinch-zoom!important;
 }
 /* Fit mode has no horizontal worksheet scroll range. Let Chrome pan the
    visual viewport after pinch zoom instead of disabling that gesture. */
 html.iep-android-touch #report-view .paper-scroll.portrait-sheet-fit{
  touch-action:pan-x pan-y pinch-zoom!important;
 }
 /* Apply to the touch TARGET, not just the outer scroller. A selected
    textarea may have readOnly=false and a native popup select has its own
    touch region. Android Chrome must not turn their swipes into native text
    selection instead of delivering touchmove to the sheet pan handler.
    Preserve two-finger zoom and stationary taps. */
 html.iep-android-touch #report-view .paper-scroll.portrait-sheet-actual #original-numbers-grid,
 html.iep-android-touch #report-view .paper-scroll.portrait-sheet-actual #original-numbers-grid *{
  touch-action:pinch-zoom!important;
 }
 html.iep-android-touch #report-view .paper-scroll.portrait-sheet-fit #original-numbers-grid,
 html.iep-android-touch #report-view .paper-scroll.portrait-sheet-fit #original-numbers-grid *{
  touch-action:pan-x pan-y pinch-zoom!important;
 }
}
@media print{
 #report-view .portrait-sheet-tools{display:none!important}
 #report-view .paper-scroll .portrait-sheet-stage{
  position:static!important;width:100%!important;min-width:0!important;
  height:auto!important
 }
 #report-view .paper-scroll .portrait-sheet-stage>.paper{
  position:static!important;transform:none!important;
  width:100%!important;max-width:none!important
 }
}

#sheet-expand,#sheet-exit,#sheet-full-name,#sheet-edit-size,#sheet-fit-size{display:none}
@media screen{
 #report-view.mobile-iep-editor:not(.mobile-easy-active) .portrait-sheet-tools{
  display:flex;justify-content:flex-end;align-items:center;gap:6px
 }
 #report-view.mobile-iep-editor:not(.mobile-easy-active):not(.sheet-fullscreen) #sheet-expand{display:inline-flex;gap:5px;white-space:nowrap;align-items:center;justify-content:center;min-width:44px;min-height:44px}
 html.sheet-fullscreen-open,html.sheet-fullscreen-open body{overflow:hidden}
 #report-view.sheet-fullscreen{
  position:fixed;top:0;right:0;bottom:0;left:0;z-index:150;
  display:flex;flex-direction:column;background:white;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)
 }
 #report-view.sheet-fullscreen>:not(.portrait-sheet-tools):not(.paper-scroll),
 #report-view.sheet-fullscreen #portrait-sheet-toggle,#report-view.sheet-fullscreen #sheet-expand{display:none!important}
 #report-view.mobile-iep-editor.sheet-fullscreen .portrait-sheet-tools{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:none;gap:3px 6px;margin:0;padding:4px 6px;border-bottom:1px solid #d6dfe9}
 .sheet-fullscreen #sheet-full-name{display:block;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:bold}
 .sheet-fullscreen #sheet-edit-size,.sheet-fullscreen #sheet-fit-size,.sheet-fullscreen #sheet-exit{
  display:block;min-height:44px;padding:4px 8px;white-space:nowrap;font-size:14px
 }
 .sheet-fullscreen #sheet-exit{display:inline-flex;align-items:center;justify-self:end;gap:6px;border:0;background:white;color:#185fc6}
 .sheet-fullscreen .portrait-sheet-tools [aria-pressed=true]{background:#185fc6;color:white}
 html.sheet-fullscreen-open #report-view.sheet-fullscreen .paper-scroll{
  flex:1;min-height:0;width:100%;margin:0;padding:0;overflow-y:auto!important;overscroll-behavior:contain
 }
 .sheet-fullscreen .portrait-sheet-fit .portrait-sheet-stage{overflow:hidden}
}
@media screen and (orientation:landscape){
 #report-view.mobile-iep-editor:not(.sheet-fullscreen) #portrait-sheet-toggle{display:none}
}
