/* 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; }
}

/* 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; }
}
