/* Responsive layer for oxfordseminars.ca, loaded last by includes/responsive-head.php.
   Desktop is untouched: every rule is inside a max-width query. The breakpoint matches
   /CSS/mobileMenu.css (980px), which already swaps in the slide-out menu below it. */

@media only screen and (max-width: 980px) {

  /* --- undo the phone zoom hack ---
     mobileMenu.css (and a few templates) zoom the mobile header/menu by 120-180% because, without a viewport tag, phones laid pages out 980px wide. With width=device-width that
     zoom double-scales everything. (2, 0, 1) specificity beats their class-level !important. */
  html:not(#r1):not(#r2) * { zoom: 1 !important; }

  /* --- page shell: the fixed 950px desktop columns become one fluid column --- */
  html, body { max-width: 100%; }
  body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

  html:not(#os-r1):not(#os-r2) body .wrapper, html:not(#os-r1):not(#os-r2) body #content-container, html:not(#os-r1):not(#os-r2) body #main-col, html:not(#os-r1):not(#os-r2) body #right-col, html:not(#os-r1):not(#os-r2) body #left-col, html:not(#os-r1):not(#os-r2) body #header, html:not(#os-r1):not(#os-r2) body #main-col > .container, html:not(#os-r1):not(#os-r2) body #doormat-box, html:not(#os-r1):not(#os-r2) body #doormat-box > .container, html:not(#os-r1):not(#os-r2) body #breadcrumb, html:not(#os-r1):not(#os-r2) body #proudly-canadian-bar, html:not(#os-r1):not(#os-r2) body .mob-menu-header-holder, html:not(#os-r1):not(#os-r2) body .mobmenu-push-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* mobileMenu.css makes the column wrappers a flex row, which shrinks the 100%-wide columns
     back to side by side. A column instead: stacked, with the page content first (the sidebar
     comes first in the HTML) */
  html:not(#os-r1):not(#os-r2) body #content-container, html:not(#os-r1):not(#os-r2) body #utility-box2 {
    display: flex !important; flex-direction: column !important; border-left: 0 !important;
  }
  html:not(#os-r1):not(#os-r2) body #content-container > #main-col, html:not(#os-r1):not(#os-r2) body #utility-box2 > #main-col { order: -1; }
  html:not(#os-r1):not(#os-r2) body #content-container > *, html:not(#os-r1):not(#os-r2) body #utility-box2 > * { flex: 0 0 auto !important; }

  /* footer link lists: readable, not the zoom-era 24px */
  html:not(#os-r1):not(#os-r2) body #doormat-box h4 { font-size: 17px !important; margin: 6px 0 !important; }
  html:not(#os-r1):not(#os-r2) body #doormat-box li, html:not(#os-r1):not(#os-r2) body #doormat-box li a { font-size: 15px !important; line-height: 1.9; }
  html:not(#os-r1):not(#os-r2) body #main-col > .container { padding: 8px 14px 12px !important; }
  html:not(#os-r1):not(#os-r2) body #right-col { margin-top: 16px !important; }

  /* footer link columns stack */
  html:not(#os-r1):not(#os-r2) body #doormat-box > .container .box { float: none !important; width: 100% !important; padding: 0 !important; margin: 0 0 14px !important; box-sizing: border-box !important; }
  html:not(#os-r1):not(#os-r2) body #doormat-box > .container .box li { margin-left: 18px !important; }

  /* --- phone header: one compact row (menu button | logo | tap-to-call) ---
     The old header was sized for the zoom hack (330px logo, 40px phone number, 140px icon).
     It is position:fixed; the templates' offset scripts measure its height and pad the body. */
  html:not(#os-r1):not(#os-r2) body .mob-menu-header-holder.mobmenu {
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; z-index: 9999;
    box-sizing: border-box !important; height: 57px !important; /* matches body padding below */
    display: flex !important; align-items: center; gap: 10px;
    min-height: 0 !important;
    padding: 6px 12px !important; background: #f7f7f7;
    border-bottom: 1px solid #e2e2e2;
  }
  html:not(#os-r1):not(#os-r2) body .mob-menu-header-holder.mobmenu > br, html:not(#os-r1):not(#os-r2) body .mobmenul-container > br { display: none !important; }
  html:not(#os-r1):not(#os-r2) body .mobmenul-container {
    order: -1; position: static !important; width: auto !important; height: auto !important;
    margin: 0 !important; padding: 0 !important; flex: 0 0 auto;
  }
  html:not(#os-r1):not(#os-r2) body .mobmenu-left-bt { display: flex !important; align-items: center; justify-content: center; width: 44px; height: 44px; }
  html:not(#os-r1):not(#os-r2) body .mobmenu-left-bt i.mob-icon-menu, html:not(#os-r1):not(#os-r2) body .mobmenu-left-bt i.mob-cancel-button {
    width: auto !important; height: auto !important; float: none !important;
    font-size: 28px !important; line-height: 1 !important; margin: 0 !important; color: #444;
  }
  html:not(#os-r1):not(#os-r2) body .left-menu-icon-text { display: none !important; }
  html:not(#os-r1):not(#os-r2) body .mob-menu-logo-holder {
    flex: 1 1 auto; display: flex !important; align-items: center; justify-content: space-between; gap: 8px;
    width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; position: static !important;
  }
  html:not(#os-r1):not(#os-r2) body .mob-menu-logo-holder .headertext { display: block; line-height: 0; }
  html:not(#os-r1):not(#os-r2) body img.mob-standard-logo { height: 40px !important; width: auto !important; max-width: 150px !important; padding: 0 !important; margin: 0 !important; }
  html:not(#os-r1):not(#os-r2) body .mob-menu-header-phone { margin: 0 !important; font-size: 15px !important; white-space: nowrap; }
  html:not(#os-r1):not(#os-r2) body .mob-menu-header-phone a { color: #1a4f8b !important; }

  /* clear the fixed 57px header with one offset on <body>, replacing the old hard-coded
     clearances (295px on the push wrapper, 25px on #header) sized for the zoomed header.
     mobmenu.js moves the header to the end of <body>, so it cannot be sticky. The test prep
     template's offset script measures the same 57px and sets it inline. */
  html:not(#os-r1):not(#os-r2) body.mob-menu-slideout { padding-top: 57px !important; }
  html:not(#os-r1):not(#os-r2) body .mobmenu-push-wrap { padding-top: 0 !important; }
  html:not(#os-r1):not(#os-r2) body #header { margin-top: 0 !important; }

  /* footer address block: seals | address | card logos are three floats; stack them, centred.
     (The seal images are third-party: their alt text shows when they are blocked.) */
  html:not(#os-r1):not(#os-r2) body .address_footer > div {
    float: none !important; width: auto !important; max-width: 100% !important; margin: 10px auto !important;
    text-align: center !important; font-size: 13px !important; line-height: 1.5;
  }
  html:not(#os-r1):not(#os-r2) body .address_footer .seals img { display: inline-block; vertical-align: middle; }

  /* slide-out menu panel: a phone-sized drawer */
  html:not(#os-r1):not(#os-r2) body .mob-menu-left-panel { width: 82vw !important; max-width: 340px !important; }

  /* --- content with hard-coded desktop widths (inline style="width:700px" or width="...")
     is capped at its container; max-width wins over any width, inline included --- */
  html:not(#os-r1):not(#os-r2) body .wrapper [style*="width"], html:not(#os-r1):not(#os-r2) body .wrapper [width], html:not(#os-r1):not(#os-r2) body #main-col [style*="width"], html:not(#os-r1):not(#os-r2) body #right-col [style*="width"] {
    max-width: 100% !important; box-sizing: border-box;
  }

  /* --- media never wider than the screen --- */
  html:not(#os-r1):not(#os-r2) body img, html:not(#os-r1):not(#os-r2) body svg, html:not(#os-r1):not(#os-r2) body video, html:not(#os-r1):not(#os-r2) body canvas { max-width: 100% !important; height: auto; }
  html:not(#os-r1):not(#os-r2) body iframe, html:not(#os-r1):not(#os-r2) body embed, html:not(#os-r1):not(#os-r2) body object { max-width: 100% !important; }

  /* image maps (e.g. the ESL schools directory world map) keep their real size so the
     clickable areas line up; the box scrolls sideways instead */
  html:not(#os-r1):not(#os-r2) body img[usemap] { max-width: none !important; }
  html:not(#os-r1):not(#os-r2) body #mapContainer { width: 100% !important; max-width: 100% !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* boxes floated beside the text at a % width (e.g. "Living and Teaching in Mexico" on the
     esl-info country pages: float:right; width:40%) take the full column instead */
  html:not(#os-r1):not(#os-r2) body #main-col div[style*="float"][style*="%"] {
    float: none !important; width: auto !important; margin: 12px 0 !important;
  }

  /* embedded videos: full width at 16:9 (e.g. #mobileCountryVideo on the esl-info pages) */
  html:not(#os-r1):not(#os-r2) body #mobileCountryVideo { float: none !important; width: 100% !important; margin: 12px 0 !important; }
  html:not(#os-r1):not(#os-r2) body iframe[src*="youtube"], html:not(#os-r1):not(#os-r2) body iframe[src*="vimeo"] {
    width: 100% !important; height: auto !important; aspect-ratio: 16 / 9;
  }

  /* content images with a side margin on top of their full width (e.g. div.image on the placement page) */
  html:not(#os-r1):not(#os-r2) body #main-col .image img { margin-left: 0 !important; margin-right: 0 !important; }

  /* images pushed right with big desktop margins (e.g. GMAT links page) */
  html:not(#os-r1):not(#os-r2) body #main-col p > a > img[style*="margin"] { display: block; margin-left: auto !important; margin-right: auto !important; }

  /* test prep "notify me" mini forms: two desktop columns stack, fields go full width */
  html:not(#os-r1):not(#os-r2) body #main-col .col-1, html:not(#os-r1):not(#os-r2) body #main-col .col-2 { float: none !important; width: 100% !important; margin-left: 0 !important; }
  html:not(#os-r1):not(#os-r2) body .notify-form [class^="td-"] { width: auto !important; max-width: 100% !important; }

  /* contact form captcha: the reload link was absolutely placed 210px right of the image */
  html:not(#os-r1):not(#os-r2) body #lnkReloadImage { position: static !important; margin-left: 8px; }

  /* --- tables: drop the fixed desktop widths; let cells shrink and wrap --- */
  html:not(#os-r1):not(#os-r2) body table { max-width: 100% !important; }
  html:not(#os-r1):not(#os-r2) body table[width], html:not(#os-r1):not(#os-r2) body table[style*="width"] { width: 100% !important; }
  html:not(#os-r1):not(#os-r2) body td, html:not(#os-r1):not(#os-r2) body th { overflow-wrap: break-word; }

  /* --- wide non-data tables (no <th> header row) scroll sideways in their own box
     (box added by /js/responsive-tables.js) --- */
  html:not(#os-r1):not(#os-r2) body .rtable-scroll {
    max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px;
    border-right: 3px solid #e3e8dc;   /* hint that there is more to the right */
  }
  html:not(#os-r1):not(#os-r2) body .rtable-scroll > table { max-width: none !important; width: auto !important; }
  html:not(#os-r1):not(#os-r2) body .rtable-scroll td, html:not(#os-r1):not(#os-r2) body .rtable-scroll th { width: auto !important; }

  /* narrow layout tables (1 row, or 3 columns or fewer) that do not fit: cells stack */
  html:not(#os-r1):not(#os-r2) body table.rtable-stack, html:not(#os-r1):not(#os-r2) body table.rtable-stack > tbody,
  html:not(#os-r1):not(#os-r2) body table.rtable-stack > tbody > tr, html:not(#os-r1):not(#os-r2) body table.rtable-stack > tbody > tr > td,
  html:not(#os-r1):not(#os-r2) body table.rtable-stack > tr, html:not(#os-r1):not(#os-r2) body table.rtable-stack > tr > td {
    display: block !important; width: auto !important; height: auto !important;
  }
  html:not(#os-r1):not(#os-r2) body table.rtable-stack td { text-align: left !important; }

  /* --- data tables become stacked cards: one card per row, each value labelled with its
     column title (data-label, added by /js/responsive-tables.js to tables with a <th> header
     row and 4+ columns). Layout tables are untouched. --- */
  html:not(#os-r1):not(#os-r2) body table.rtable, html:not(#os-r1):not(#os-r2) body table.rtable > tbody, html:not(#os-r1):not(#os-r2) body table.rtable > tbody > tr, html:not(#os-r1):not(#os-r2) body table.rtable > tr {
    display: block !important; width: auto !important; height: auto !important;
  }
  html:not(#os-r1):not(#os-r2) body table.rtable { border: 0 !important; background: none !important; }
  html:not(#os-r1):not(#os-r2) body table.rtable > thead, html:not(#os-r1):not(#os-r2) body table.rtable tr.rtable-head { display: none !important; }
  html:not(#os-r1):not(#os-r2) body table.rtable tr:not(.rtable-head) {
    border: 1px solid #c9d6b8 !important; border-radius: 8px; margin: 0 0 12px !important;
    padding: 4px 12px !important; background: #fff !important;
  }
  html:not(#os-r1):not(#os-r2) body table.rtable td {
    display: flex !important; width: auto !important; height: auto !important; align-items: baseline; gap: 12px;
    border: 0 !important; border-bottom: 1px solid #eef1ea !important; background: none !important;
    padding: 7px 0 !important; text-align: left !important; font-size: 14px; line-height: 1.4;
  }
  html:not(#os-r1):not(#os-r2) body table.rtable td:last-child { border-bottom: 0 !important; }
  html:not(#os-r1):not(#os-r2) body table.rtable td[data-label]::before {
    content: attr(data-label); flex: 0 0 40%; max-width: 40%;
    font-weight: bold; font-size: 12px; text-transform: none; color: #4a4a4a;
  }
  html:not(#os-r1):not(#os-r2) body table.rtable td:empty, html:not(#os-r1):not(#os-r2) body table.rtable td[data-label=""] { display: none !important; }
  html:not(#os-r1):not(#os-r2) body td[width], html:not(#os-r1):not(#os-r2) body th[width], html:not(#os-r1):not(#os-r2) body td[style*="width"], html:not(#os-r1):not(#os-r2) body th[style*="width"] { width: auto !important; }

  /* --- forms: full-width, finger-sized fields --- */
  html:not(#os-r1):not(#os-r2) body input[type="text"], html:not(#os-r1):not(#os-r2) body input[type="email"], html:not(#os-r1):not(#os-r2) body input[type="tel"], html:not(#os-r1):not(#os-r2) body input[type="number"], html:not(#os-r1):not(#os-r2) body input[type="password"], html:not(#os-r1):not(#os-r2) body input[type="search"], html:not(#os-r1):not(#os-r2) body select, html:not(#os-r1):not(#os-r2) body textarea {
    max-width: 100% !important;
    box-sizing: border-box;
    font-size: 16px; /* 16px stops iOS zooming into the field */
  }

  /* ===== checkouts: /register/ (TESOL) and /tpregister/ (test prep) =====
     register.css lays them out at 950px: 625px form column + 300px info column, 147px labels.
     On a phone: one column, labels above full-width fields, the info boxes below the form. */
  html:not(#os-r1):not(#os-r2) body #wrapper { width: 100% !important; max-width: 100% !important; padding: 0 12px !important; box-sizing: border-box !important; }
  html:not(#os-r1):not(#os-r2) body #wrapper #header { height: auto !important; text-align: left; padding: 8px 0 !important; }
  html:not(#os-r1):not(#os-r2) body #wrapper #header > a > img { width: 180px !important; height: auto !important; }
  html:not(#os-r1):not(#os-r2) body #wrapper #header #utilityMenu, html:not(#os-r1):not(#os-r2) body #wrapper #header #paymentOptions, html:not(#os-r1):not(#os-r2) body #wrapper #header #phone {
    position: static !important; float: none !important; width: auto !important; margin: 4px 0 !important; text-align: left !important;
  }
  html:not(#os-r1):not(#os-r2) body #leftColumn, html:not(#os-r1):not(#os-r2) body #rightColumn, html:not(#os-r1):not(#os-r2) body #content, html:not(#os-r1):not(#os-r2) body .infoContainer, html:not(#os-r1):not(#os-r2) body .infoContainerTop, html:not(#os-r1):not(#os-r2) body .infoContainerBottom, html:not(#os-r1):not(#os-r2) body #seals, html:not(#os-r1):not(#os-r2) body #statusBar, html:not(#os-r1):not(#os-r2) body #status, html:not(#os-r1):not(#os-r2) body .steps, html:not(#os-r1):not(#os-r2) body #final, html:not(#os-r1):not(#os-r2) body #approval ul, html:not(#os-r1):not(#os-r2) body #final ul, html:not(#os-r1):not(#os-r2) body #confirmInfo ul, html:not(#os-r1):not(#os-r2) body .infoBox, html:not(#os-r1):not(#os-r2) body .faqAnswer, html:not(#os-r1):not(#os-r2) body #tandc_right_margin {
    width: auto !important; max-width: 100% !important; float: none !important; margin-left: 0 !important; margin-right: 0 !important;
    box-sizing: border-box !important;
  }
  html:not(#os-r1):not(#os-r2) body #rightColumn { margin-top: 18px !important; }
  /* inline-styled rows (e.g. the Continue row: margin-left:20px; width:580px) */
  html:not(#os-r1):not(#os-r2) body #wrapper [style*="width"] { max-width: 100% !important; box-sizing: border-box !important; }
  html:not(#os-r1):not(#os-r2) body #wrapper div[style*="margin-left"] { margin-left: 0 !important; }
  html:not(#os-r1):not(#os-r2) body #wrapper div[style*="height"] { height: auto !important; }   /* e.g. the 25px-high row holding the test prep Continue button */
  /* the Continue image button: its own line, finger-sized */
  html:not(#os-r1):not(#os-r2) body #wrapper form input[type="image"], html:not(#os-r1):not(#os-r2) body #wrapper #continueButton {
    float: none !important; display: block; position: static !important; left: auto !important; right: auto !important;
    width: 180px !important; height: auto !important; margin: 18px 0 14px !important;
  }
  /* payment step: the card fields (#ccvalues) are absolutely placed beside the payment-method
     radios on desktop (top:135px; left:245px); on a phone they follow the radios */
  html:not(#os-r1):not(#os-r2) body #ccvalues { position: static !important; top: auto !important; left: auto !important; width: 100% !important; margin-top: 8px !important; }
  html:not(#os-r1):not(#os-r2) body #ccvalues select#expiremonth, html:not(#os-r1):not(#os-r2) body #ccvalues select#expireyear { display: inline-block !important; width: 48% !important; }
  html:not(#os-r1):not(#os-r2) body #ccvalues input, html:not(#os-r1):not(#os-r2) body #studentInfo input { height: auto !important; }
  /* telephone is three fields (area / tel1 / tel2): keep them on one line */
  html:not(#os-r1):not(#os-r2) body #wrapper input#area, html:not(#os-r1):not(#os-r2) body #wrapper input[name="tel1"], html:not(#os-r1):not(#os-r2) body #wrapper input[name="tel2"] {
    display: inline-block !important; width: 4.6em !important; min-width: 0 !important;
  }
  html:not(#os-r1):not(#os-r2) body #wrapper input[name="tel2"] { width: 5.6em !important; }
  html:not(#os-r1):not(#os-r2) body #printPage { display: none !important; }
  html:not(#os-r1):not(#os-r2) body #statusBar > img { width: 100% !important; height: auto !important; }
  html:not(#os-r1):not(#os-r2) body #statusBar h1 { font-size: 22px !important; }
  html:not(#os-r1):not(#os-r2) body .steps table, html:not(#os-r1):not(#os-r2) body .steps tbody, html:not(#os-r1):not(#os-r2) body .steps tr { display: block; width: 100% !important; }
  html:not(#os-r1):not(#os-r2) body .steps td { display: block; width: auto !important; padding: 2px 0 !important; text-align: left !important; }
  html:not(#os-r1):not(#os-r2) body .steps td + td { padding-bottom: 10px !important; }
  html:not(#os-r1):not(#os-r2) body .steps select, html:not(#os-r1):not(#os-r2) body .steps input[type="text"], html:not(#os-r1):not(#os-r2) body .steps input[type="email"], html:not(#os-r1):not(#os-r2) body .steps input[type="tel"], html:not(#os-r1):not(#os-r2) body #studentInfo input[type="text"], html:not(#os-r1):not(#os-r2) body #studentInfo select, html:not(#os-r1):not(#os-r2) body #ccvalues input[type="text"], html:not(#os-r1):not(#os-r2) body #ccvalues select {
    width: 100% !important; min-height: 44px; box-sizing: border-box;
  }
  html:not(#os-r1):not(#os-r2) body #studentInfo label, html:not(#os-r1):not(#os-r2) body #ccvalues label, html:not(#os-r1):not(#os-r2) body fieldset label {
    display: block !important; float: none !important; width: auto !important; text-align: left !important; margin: 8px 0 4px !important;
  }
  html:not(#os-r1):not(#os-r2) body #approval ul li span, html:not(#os-r1):not(#os-r2) body #final ul li span, html:not(#os-r1):not(#os-r2) body #confirmInfo ul li span { display: block !important; width: auto !important; font-weight: bold; }
  html:not(#os-r1):not(#os-r2) body .steps input[type="submit"], html:not(#os-r1):not(#os-r2) body .steps input[type="image"], html:not(#os-r1):not(#os-r2) body .steps button, html:not(#os-r1):not(#os-r2) body #content input[type="submit"], html:not(#os-r1):not(#os-r2) body #content button { min-height: 44px; max-width: 100% !important; }

  /* ===== homepage (index.php, splash-page-resources/css/style-v3.2.css) =====
     Desktop is a 950px carousel: five absolutely positioned tabs switch five slides.
     On a phone the five slides become stacked cards and the carousel controls go.
     ID-prefixed to beat the zoom-era rules in mobileMenu.css (fixed 1124px/1250px heights, 3em text, 20% image padding). The homepage has no fixed phone header, so no body offset. */
  html:not(#os-r1):not(#os-r2) body.mob-menu-slideout:not(:has(.mob-menu-header-holder)) { padding-top: 0 !important; }
  html:not(#os-r1):not(#os-r2) body .dv-wrapper { width: 100% !important; padding: 0 12px !important; box-sizing: border-box; }
  html:not(#os-r1):not(#os-r2) body #dv-header { height: auto !important; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
  html:not(#os-r1):not(#os-r2) body #dv-header img { float: none !important; margin: 0 !important; height: auto !important; }
  html:not(#os-r1):not(#os-r2) body #dv-header img:first-child { width: 170px !important; }
  html:not(#os-r1):not(#os-r2) body #dv-header img + img { width: 120px !important; }
  html:not(#os-r1):not(#os-r2) body #dv-content, html:not(#os-r1):not(#os-r2) body #dvCarouselMainContainer { height: auto !important; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer {
    display: block !important; position: static !important; top: auto !important;
    width: auto !important; height: auto !important; border: 0 !important; overflow: visible !important;
  }
  html:not(#os-r1):not(#os-r2) body #dvCarouselNavContainer, html:not(#os-r1):not(#os-r2) body #dvSliderArrow, html:not(#os-r1):not(#os-r2) body #dvCarouselBullets, html:not(#os-r1):not(#os-r2) body #dvAltTexts { display: none !important; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .carouselSlideClass {
    display: block !important; position: static !important; width: auto !important; height: auto !important;
    overflow: hidden !important; opacity: 1 !important; box-sizing: border-box;
    border: 2px solid #709f3f; border-radius: 8px; padding: 12px 14px; margin: 0 0 14px;
  }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .tab_inner_text {
    float: none !important; width: auto !important; height: auto !important;
    padding: 0 !important; margin: 0 !important; font-size: 15px !important; line-height: 1.45;
  }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer h1 { font-size: 20px !important; line-height: 1.25; margin: 0 0 8px !important; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer div[style*="float"] { float: none !important; padding: 8px 0 0 !important; text-align: center; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer img {
    display: block; width: auto !important; max-width: 100% !important; height: auto !important;
    margin: 0 auto !important; padding: 0 !important; transform: none !important;
  }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .moreInfo { position: static !important; }
  html:not(#os-r1):not(#os-r2) body #dv-top-utility, html:not(#os-r1):not(#os-r2) body #dv-bottom-nav, html:not(#os-r1):not(#os-r2) body #dv-footer { box-sizing: border-box; width: 100% !important; }
  html:not(#os-r1):not(#os-r2) body #dv-bottom-nav > div { width: auto !important; font-size: 13px !important; line-height: 1.5; }
  html:not(#os-r1):not(#os-r2) body #dv-bottom-nav a[href^="tel:"] { white-space: nowrap; }

  /* long URLs wrap instead of pushing the page wide; normal words never break mid-word */
  html:not(#os-r1):not(#os-r2) body p, html:not(#os-r1):not(#os-r2) body li, html:not(#os-r1):not(#os-r2) body h1, html:not(#os-r1):not(#os-r2) body h2, html:not(#os-r1):not(#os-r2) body h3, html:not(#os-r1):not(#os-r2) body h4, html:not(#os-r1):not(#os-r2) body a, html:not(#os-r1):not(#os-r2) body span, html:not(#os-r1):not(#os-r2) body div { overflow-wrap: break-word; }  /* only a word wider than the screen breaks */
}

/* page fixes found by the 2026-11-15 audit at 320px */
@media only screen and (max-width: 980px) {
  /* "N people viewed a course" notice on the course dates page: fit the screen, bottom edge */
  html:not(#os-r1):not(#os-r2) body .ui-dialog.ui-dialog-no-of-viewers {
    position: fixed !important; left: 12px !important; right: 12px !important; top: auto !important; bottom: 12px !important;
    width: auto !important; max-width: none !important; height: auto !important; box-sizing: border-box;
    padding: 10px 12px !important; font-size: 15px; line-height: 1.35;
  }
  html:not(#os-r1):not(#os-r2) body .ui-dialog-no-of-viewers .ui-dialog-content { width: auto !important; height: auto !important; min-height: 0 !important; font-size: 15px !important; }
  /* specialization module buttons: 350px fixed width */
  html:not(#os-r1):not(#os-r2) body .modules-nav-links a { width: auto !important; max-width: 350px; box-sizing: border-box; }
  /* course instructors: negative margins pushed the list and photos off the left edge */
  html:not(#os-r1):not(#os-r2) body .instructor-container, html:not(#os-r1):not(#os-r2) body .instructors_list, html:not(#os-r1):not(#os-r2) body .list-left { margin-left: 0 !important; }
  /* instructor photos: an even wrapping grid (each photo is wrapped in a.lnkInstructor) */
  html:not(#os-r1):not(#os-r2) body .instructors_list, html:not(#os-r1):not(#os-r2) body .instructors_list.rfloat-stack { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 12px; }
  html:not(#os-r1):not(#os-r2) body .instructors_list > :not(a.lnkInstructor) { flex: 0 0 100%; }
  html:not(#os-r1):not(#os-r2) body .instructors_list > a.lnkInstructor { display: block; flex: 0 0 auto; }
  html:not(#os-r1):not(#os-r2) body .instructors_list .instructor-images { margin: 0 !important; float: none !important; width: 125px !important; }
  /* every photo the same size (one has a broken height attribute, which made the grid jagged) */
  html:not(#os-r1):not(#os-r2) body .instructors_list .instructor-images img { width: 125px !important; height: 125px !important; object-fit: cover; display: block; }
  /* graduate placement testimonial and the 520px intro boxes (finding an ESL job, TESOL organizations) */
  html:not(#os-r1):not(#os-r2) body #doormatTestimonial { width: auto !important; max-width: 100%; height: auto !important; float: none !important; }
  /* floats that would squeeze the text into a sliver (marked by js/responsive-floats.js):
     full width above the text instead; videos fill the column at 16:9 */
  html:not(#os-r1):not(#os-r2) body .rfloat-stack {
    float: none !important; display: block !important; clear: both;
    width: auto !important; max-width: 100% !important; margin: 0 auto 14px !important; box-sizing: border-box;
    height: auto !important; min-height: 0 !important;
  }
  html:not(#os-r1):not(#os-r2) body img.rfloat-stack, html:not(#os-r1):not(#os-r2) body .rfloat-stack img { height: auto !important; max-width: 100% !important; }
  html:not(#os-r1):not(#os-r2) body iframe.rfloat-stack, html:not(#os-r1):not(#os-r2) body video.rfloat-stack,
  html:not(#os-r1):not(#os-r2) body .rfloat-stack iframe, html:not(#os-r1):not(#os-r2) body .rfloat-stack video {
    width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; margin-left: 0 !important; margin-right: 0 !important;
  }
  /* course outline day boxes: inner box was a fixed 245px (gaps in short days, long days cut off) */
  html:not(#os-r1):not(#os-r2) body .dayOutlineAlt .content, html:not(#os-r1):not(#os-r2) body .dayOutlineAlt40 .content { height: auto !important; min-height: 0 !important; }
  html:not(#os-r1):not(#os-r2) body .dayOutlineAlt .content ul > br, html:not(#os-r1):not(#os-r2) body .dayOutlineAlt40 .content ul > br { display: none; }   /* spacer <br>s that padded Day 1 to the fixed height */
  /* fixed-height boxes whose text overflows on a narrow screen (marked by js/responsive-floats.js) */
  html:not(#os-r1):not(#os-r2) body .rheight-auto { height: auto !important; }
  /* layout tables whose narrow cells squeeze text (marked by js/responsive-floats.js, phones only) */
  html:not(#os-r1):not(#os-r2) body table.rtable-stack, html:not(#os-r1):not(#os-r2) body table.rtable-stack > tbody,
  html:not(#os-r1):not(#os-r2) body table.rtable-stack > tbody > tr, html:not(#os-r1):not(#os-r2) body table.rtable-stack > tr,
  html:not(#os-r1):not(#os-r2) body table.rtable-stack > tbody > tr > td, html:not(#os-r1):not(#os-r2) body table.rtable-stack > tr > td {
    display: block !important; width: auto !important; max-width: 100% !important; height: auto !important; box-sizing: border-box;
  }
  html:not(#os-r1):not(#os-r2) body table.rtable-stack > tbody > tr > td, html:not(#os-r1):not(#os-r2) body table.rtable-stack > tr > td { padding-left: 0 !important; padding-right: 0 !important; }
  html:not(#os-r1):not(#os-r2) body table.rtable-stack > tbody > tr > td + td, html:not(#os-r1):not(#os-r2) body table.rtable-stack > tr > td + td { margin-top: 16px; }
  /* readable text: sidebar boxes (0.9em of 12px), city-page testimonials (9.5px) and their
     name/date lines (5.7px from an inline .6em) */
  html:not(#os-r1):not(#os-r2) body .box .bd { font-size: 15px !important; line-height: 1.5; }
  html:not(#os-r1):not(#os-r2) body .box .bd li { padding: 3px 0; }
  html:not(#os-r1):not(#os-r2) body #mobileTestimonial, html:not(#os-r1):not(#os-r2) body #mobileReview { font-size: 15px !important; line-height: 1.45; }
  html:not(#os-r1):not(#os-r2) body #mobileTestimonial div[style*="font-size"] { font-size: 13px !important; }
  /* graduate portal / ESL directory login box (350px) and the test prep checkout's 500px utility links */
  html:not(#os-r1):not(#os-r2) body #login { width: auto !important; max-width: 100%; box-sizing: border-box; }
  html:not(#os-r1):not(#os-r2) body #login .loginHead, html:not(#os-r1):not(#os-r2) body #login .signupHead { width: auto !important; box-sizing: border-box; }
  html:not(#os-r1):not(#os-r2) body #utility-menu, html:not(#os-r1):not(#os-r2) body #utilityMenu { width: auto !important; max-width: 100%; box-sizing: border-box; }
  html:not(#os-r1):not(#os-r2) body div.dvSubContent div.dvSubContentIntro { width: auto !important; max-width: 100% !important; float: none !important; margin-left: 0 !important; margin-right: 0 !important; }
}

/* ===== 2026-11-22 mobile feedback (Chris) ===== */
@media only screen and (max-width: 980px) {
  /* 1. slide-out menu: mobileMenu.css sized it for the zoomed 980px layout (35px, "Open Sans" which
     is never loaded, so Times). Phone-sized sans text; "TESOL/TESL/TEFL Certification" on one line. */
  html:not(#os-r1):not(#os-r2) body .mob-menu-left-panel.mobmenu, html:not(#os-r1):not(#os-r2) body .menu-test-menu-container { font-size: 16px !important; }
  html:not(#os-r1):not(#os-r2) body .mobmenu_content li a {
    font-family: Arial, Helvetica, sans-serif !important; font-size: 16px !important; line-height: 1.3 !important;
    letter-spacing: 0 !important; padding: 12px 48px 12px 8px !important;
  }
  html:not(#os-r1):not(#os-r2) body .mobmenu_content .sub-menu li a { font-size: 15px !important; padding-left: 20px !important; }
  html:not(#os-r1):not(#os-r2) body .mob-expand-submenu { width: 44px !important; height: 44px !important; margin-top: -44px !important; display: flex; align-items: center; justify-content: center; }
  html:not(#os-r1):not(#os-r2) body .mob-expand-submenu i { font-size: 20px !important; padding: 0 !important; }
  html:not(#os-r1):not(#os-r2) body .mob-menu-left-panel li, html:not(#os-r1):not(#os-r2) body .leftmbottom, html:not(#os-r1):not(#os-r2) body .leftmtop { margin-left: 0 !important; }
  /* menu open: mobileMenu.css pushes the page and header 470px (the old drawer width), which put the close (X)
     off the right edge of the screen. Push by the drawer's real width so the X sits just right of the drawer. */
  html:not(#os-r1):not(#os-r2) body.mob-menu-slideout.show-nav-left .mobmenu-push-wrap,
  html:not(#os-r1):not(#os-r2) body.mob-menu-slideout.show-nav-left .mob-menu-header-holder {
    -webkit-transform: translate3d(min(82vw, 340px), 0, 0) !important; transform: translate3d(min(82vw, 340px), 0, 0) !important;
  }
  html:not(#os-r1):not(#os-r2) body.show-nav-left .mobmenu-left-bt { background: #fff; border-radius: 50%; box-shadow: 0 1px 6px rgba(0,0,0,.35); }
  html:not(#os-r1):not(#os-r2) body.show-nav-left .mobmenu-left-bt i.mob-cancel-button { color: #333 !important; font-size: 24px !important; line-height: 1 !important; }

  /* 2. Next Info Session popup: a slim strip, at most the bottom quarter of the screen
     (footerv2.php's own phone rule enlarged it for the zoomed layout) */
  html:not(#os-r1):not(#os-r2) body .infosession-notice-box {
    left: 10px !important; right: 10px !important; bottom: 10px !important; width: auto !important;
    max-height: 25vh; overflow-y: auto; box-sizing: border-box;
    padding: 10px 36px 10px 14px !important; border-radius: 10px !important; font-size: 13px !important; line-height: 1.4 !important;
  }
  html:not(#os-r1):not(#os-r2) body .infosession-notice-box strong { font-size: 14px !important; margin-bottom: 2px !important; }
  html:not(#os-r1):not(#os-r2) body .infosession-notice-box .infosession-notice-close { font-size: 24px !important; top: 6px !important; right: 10px !important; padding: 4px; }
  /* "N people viewed..." notice (jQuery UI dialog, positioned for a desktop screen): same strip, on screen */
  html:not(#os-r1):not(#os-r2) body .ui-dialog:has(> .js-notice) {
    position: fixed !important; left: 10px !important; right: 10px !important; top: auto !important; bottom: 10px !important;
    width: auto !important; max-width: none !important; box-sizing: border-box; font-size: 13px !important;
  }
  html:not(#os-r1):not(#os-r2) body .ui-dialog:has(> .js-notice) .js-notice { height: auto !important; min-height: 0 !important; font-size: 13px !important; line-height: 1.4; padding: 4px 10px 8px !important; }
  html:not(#os-r1):not(#os-r2) body .ui-dialog:has(> .js-notice) .ui-dialog-titlebar { padding: 2px 6px !important; min-height: 0 !important; }

  /* 3. test prep course dates (includes/testprep/dates.php: LSAT, GMAT, GRE, MCAT): keep the 30-hour and
     48-hour columns side by side at phone width with smaller text; the column headings had fixed
     225px/260px widths, which forced the table wider than the screen and made it stack. */
  html:not(#os-r1):not(#os-r2) body .bottomCourseDates ~ table.bodycontent {
    display: table !important; table-layout: fixed; width: 100% !important; max-width: 100% !important; border-collapse: collapse;
  }
  html:not(#os-r1):not(#os-r2) body .bottomCourseDates ~ table.bodycontent > tbody { display: table-row-group !important; }
  html:not(#os-r1):not(#os-r2) body .bottomCourseDates ~ table.bodycontent tr { display: table-row !important; }
  html:not(#os-r1):not(#os-r2) body .bottomCourseDates ~ table.bodycontent > tbody > tr > td {
    display: table-cell !important; width: 50% !important; vertical-align: top; text-align: left !important;
    padding: 4px 4px 8px !important; font-size: 13px !important; line-height: 1.35 !important; margin: 0 !important;
  }
  html:not(#os-r1):not(#os-r2) body .bottomCourseDates ~ table.bodycontent td * { font-size: inherit !important; }
  html:not(#os-r1):not(#os-r2) body .bottomCourseDates ~ table.bodycontent td h3 { width: auto !important; margin: 0 !important; font-size: 13px !important; }
  html:not(#os-r1):not(#os-r2) body .bottomCourseDates ~ table.bodycontent td h3 + br { display: none; }
  html:not(#os-r1):not(#os-r2) body .bottomCourseDates ~ table.bodycontent .zoom-course-label { font-size: 12px !important; }
  html:not(#os-r1):not(#os-r2) body .bottomCourseDates ~ table.bodycontent svg { width: 12px !important; height: 12px !important; }

  /* 4. splash page (index.php): TESL and LSAT side by side on the first screen. Cards in a 2-column grid:
     heading + image + "Learn more"; descriptions hidden on phones. The markup nests links inside the card
     link, so the browser splits it: the heading ends up in its own <a>. That link is stretched over the
     whole card so the card stays one tap target. */
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .carouselSlideClass {
    position: relative !important; display: flex !important; flex-direction: column; margin: 0 !important; padding: 10px !important;
  }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .carouselSlideClass:nth-child(odd):last-child { grid-column: 1 / -1; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .carouselSlideClass > a:empty { display: none !important; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .tab_inner_text { font-size: 0 !important; line-height: 0 !important; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .tab_inner_text > :not(h1):not(:has(h1)) { display: none !important; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .tab_inner_text > a:has(h1) { position: static !important; color: #000 !important; text-decoration: none !important; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .tab_inner_text > a:has(h1)::after { content: ""; position: absolute; inset: 0; z-index: 1; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer h1 { font-size: 15px !important; line-height: 1.25 !important; margin: 0 0 8px !important; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .tab_inner_text { order: 1; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer div[style*="float"] { order: 2; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer div[style*="float"] { padding: 0 !important; margin-top: auto !important; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer img { width: 100% !important; height: 110px !important; object-fit: cover; border-radius: 4px; }
  html:not(#os-r1):not(#os-r2) body #dvCarouselSlidesContainer .carouselSlideClass::after {
    content: "Learn more \203A"; order: 3; display: block; margin-top: 8px; font-size: 14px; font-weight: bold; color: #1a4f8b;
  }

  /* 5. TESL homepage (tesol-tesl-certification.php): every box below the main image the same full width,
     no inline negative margins/fixed heights (white space, text under images), images one consistent size */
  html:not(#os-r1):not(#os-r2) body #mobileMainPage { margin: 0 !important; width: auto !important; }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage #content-container1 {
    display: flex !important; flex-direction: column; gap: 12px; width: auto !important; margin: 12px 0 0 !important; padding: 0 !important; height: auto !important;
  }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage .content_cols {
    float: none !important; width: auto !important; max-width: none !important; height: auto !important; min-height: 0 !important;
    margin: 0 !important; padding: 14px !important; box-sizing: border-box; text-align: center;
  }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage .content_cols > div, html:not(#os-r1):not(#os-r2) body #mobileMainPage .content_cols > .col_text {
    width: auto !important; max-width: 100% !important; height: auto !important; margin: 0 0 10px !important; padding: 0 !important; float: none !important;
  }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage .content_cols > div:empty, html:not(#os-r1):not(#os-r2) body #mobileMainPage .content_cols > br { display: none !important; }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage .content_cols h3 { margin: 0 0 8px !important; }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage #mainCourseDatesBox { order: 1; }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage #cc-iColumn { order: 2; }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage #cc-tAbroad { order: 3; }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage #blog_box { order: 4; }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage .content_cols img {
    display: block; width: auto !important; max-width: 100% !important; height: 160px !important; object-fit: contain; margin: 0 auto !important;
  }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage .content_cols .nearByCourses, html:not(#os-r1):not(#os-r2) body #mobileMainPage .content_cols .nextInfoSession { text-align: left; }
  html:not(#os-r1):not(#os-r2) body #mobileMainPage .content_cols .reg_div { width: auto !important; margin: 4px 0 0 !important; }
}

/* smallest phones (320-359px, e.g. iPhone SE 1st gen): logo and phone number both fit the header */
@media (max-width: 359px) {
  html:not(#os-r1):not(#os-r2) body .mob-menu-logo-holder { gap: 4px; min-width: 0; }
  html:not(#os-r1):not(#os-r2) body img.mob-standard-logo { height: 32px !important; max-width: 118px !important; }
  html:not(#os-r1):not(#os-r2) body .mob-menu-header-phone { font-size: 13px !important; }
}
