/* FIX2857: scoped mobile rich text only; preserve author-defined colors and desktop. */
@media (max-width:767px){
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body){box-sizing:border-box!important;min-width:0!important;max-width:100%!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2857-empty{display:none!important;height:0!important;min-height:0!important;max-height:0!important;margin:0!important;padding:0!important;border:0!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2857-shell{background:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:0!important;padding:0!important;height:auto!important;min-height:0!important;margin:12px 0!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2857-spacing{margin-top:16px!important;margin-bottom:16px!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) :is(.notice,.callout,.alert,.highlight,.ccna-exam-tip,blockquote){box-sizing:border-box!important;max-width:100%!important;margin-top:14px!important;margin-bottom:14px!important;min-height:0!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) :is(.nga2853-table-viewport,.nga2854-table-viewport,.nga190-table-scroll,.nga189-table-wrap,.nga189-table-scroll,.nga-mobile-table-scroll,.nga-table-scroll,.table-responsive,.table-scroll,.nga2855-table-host,.nga2856r1-table-fit-host){box-sizing:border-box!important;max-width:100%!important;min-width:0!important;width:100%!important;overflow-x:visible!important;overflow-y:visible!important;margin:12px 0!important;padding-inline:0!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) table{display:table!important;box-sizing:border-box!important;border-collapse:collapse!important;table-layout:auto!important;width:100%!important;min-width:0!important;max-width:100%!important;margin:12px 0!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) table :is(th,td){display:table-cell!important;box-sizing:border-box!important;vertical-align:top!important;min-width:0!important;max-width:none!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important;hyphens:none!important;padding:8px 9px!important;font-size:clamp(12px,3.2vw,15px)!important;line-height:1.45!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) table.nga2857-fit{width:100%!important;max-width:100%!important;min-width:0!important;}
 /* All 3+ column tables retain original grid, with their own scroll surface. */
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2857-table-scroll,
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2856r1-table-scroll:not(.nga2857-fit-host){display:block!important;position:relative!important;box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;margin:12px 0!important;padding:0!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2857-fit-host{overflow-x:visible!important;overflow-y:visible!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) :is(.nga2857-table-scroll,.nga2856r1-table-scroll)>table.nga2857-wide{width:max(100%,760px)!important;min-width:760px!important;max-width:none!important;table-layout:auto!important;margin:0!important;}
 :is(.nga2857-table-scroll,.nga2856r1-table-scroll)>table.nga2857-wide :is(th,td){min-width:145px!important;overflow-wrap:normal!important;word-break:normal!important;white-space:normal!important;}
 :is(.nga2857-table-scroll,.nga2856r1-table-scroll)>table.nga2857-wide :is(th,td):first-child{min-width:165px!important;}
 /* One-row labeled callouts are visually stacked without modifying the HTML or colors. */
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) table.nga2857-callout{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:14px 0!important;border-collapse:separate!important;}
 table.nga2857-callout>tbody,table.nga2857-callout>tbody>tr,table.nga2857-callout>tr{display:block!important;width:100%!important;}
 table.nga2857-callout tr>td,table.nga2857-callout tr>th{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;overflow-wrap:break-word!important;word-break:normal!important;}
 table.nga2857-callout tr>td:first-child,table.nga2857-callout tr>th:first-child{font-weight:800!important;white-space:normal!important;letter-spacing:.02em!important;text-align:left!important;}
 table.nga2857-callout tr>td+td,table.nga2857-callout tr>th+td{border-top:0!important;}
 /* Code inside generic wrappers must never be cut off. */
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) :is(pre,.nga2857-cli,.nga2857-cli pre,.nga2857-cli code,pre code,pre span){box-sizing:border-box!important;max-width:100%!important;min-width:0!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important;overflow-x:hidden!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) :is(h2,h3,h4){margin-top:20px!important;margin-bottom:9px!important;scroll-margin-top:90px;}
}


/* FIX2858: only the original table is a visible frame; nested legacy wrappers
   add no border, padding, radius or cumulative margins. Scoped to mobile readers. */
@media (max-width:767px){
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2858-frame{
   display:block!important;box-sizing:border-box!important;position:relative!important;
   width:100%!important;max-width:100%!important;min-width:0!important;
   height:auto!important;min-height:0!important;padding:0!important;margin:0!important;
   border:0!important;outline:0!important;border-radius:0!important;
   box-shadow:none!important;background:transparent!important;background-image:none!important;
   overflow:visible!important;
 }
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2858-scroll-host{
   box-sizing:border-box!important;display:block!important;position:relative!important;
   width:100%!important;max-width:100%!important;min-width:0!important;
   height:auto!important;min-height:0!important;margin:12px 0!important;padding:0!important;
   border:0!important;outline:0!important;border-radius:0!important;
   box-shadow:none!important;background:transparent!important;background-image:none!important;
   overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch;
 }
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2858-empty{
   display:none!important;height:0!important;min-height:0!important;max-height:0!important;
   margin:0!important;padding:0!important;border:0!important;
 }
 /* Keep all original table cells, colors and borders; avoid cumulative top/bottom gap. */
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2858-frame table{
   margin-top:0!important;margin-bottom:0!important;
 }
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2858-scroll-host > table{
   margin-top:0!important;margin-bottom:0!important;
 }
}


/* FIX2859: mobile 3+ column tables MUST be wider than the available viewport.
   Force the width on the real table, regardless of legacy intermediate wrappers.
   Only the innermost dedicated scroll host scrolls. */
@media (max-width:767px) {
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2859-scroll-host {
   display:block!important; box-sizing:border-box!important; position:relative!important;
   width:100%!important; max-width:100%!important; min-width:0!important;
   margin:12px 0!important; padding:0!important;
   border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;
   overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch;
   overscroll-behavior-x:contain;scrollbar-width:thin;
 }
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2859-scroll-host table.nga2859-wide {
   display:table!important; width:820px!important;min-width:820px!important;
   max-width:none!important;table-layout:fixed!important;overflow:visible!important;
   margin:0!important;border-collapse:collapse!important;
 }
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2859-scroll-host table.nga2859-wide :is(th,td){
   width:auto!important;max-width:none!important;min-width:0!important;
   white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;
   hyphens:none!important;box-sizing:border-box!important;
 }
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2859-scroll-host table.nga2859-wide :is(th,td):first-child{
   width:190px!important; min-width:190px!important;max-width:190px!important;
 }
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2859-scroll-host table.nga2859-wide :is(th,td):last-child{
   width:300px!important;min-width:300px!important;max-width:300px!important;
 }
 /* Repeated neutral legacy frames do not add visual chrome or vertical gaps. */
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2859-frame {
   box-sizing:border-box!important;border:0!important;outline:0!important;box-shadow:none!important;
   background:transparent!important;background-image:none!important;border-radius:0!important;
   padding:0!important;margin:0!important;height:auto!important;min-height:0!important;
   max-height:none!important;max-width:100%!important;min-width:0!important;
   overflow:visible!important;
 }
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2859-empty {
   display:none!important;height:0!important;min-height:0!important;max-height:0!important;
   margin:0!important;padding:0!important;border:0!important;
 }
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) :is(.nga2859-scroll-host,.nga2859-flow-block){margin-top:12px!important;margin-bottom:12px!important;}
 :is(.reader-content,.article-body,.resource-topic-body,.course-preview-excerpt,.cms-page-content,.menu-outline-body,.sponsored-body) .nga2859-flow-heading{margin-top:20px!important;margin-bottom:10px!important;}
}
