/* ============================================================================
   TSC Easy N Quick Chrome - v1.0 - November 2026
   Header + footer for the back-end pages on
   virginiadriverimprovementcliniconline.com (affiliate 24), plus the phone
   layout for those pages (register, login, student home, chapter view,
   payment).
   ----------------------------------------------------------------------------
   PART 1  header + footer: the site's own design, ported from
           easynquickdrivingclinic.com site.css. Same colours, fonts, sizes
           and breakpoints (1120 / 900 / 640).
   PART 2  phone layout for the platform pages. Layout only.

   WORKS WITH registration-skin.css. The skin styles the content card and
   the form (fields, green Continue button); this sheet never restyles those,
   it only makes sure nothing is wider than the screen on a phone.
   Desktop pages are untouched: every Part 2 rule sits in a max-width query.

   ISOLATION
   - Part 1: every selector starts with .enq-chrome; every class is enq-*.
     .enq-chrome x (0,1,1+) beats the skin's "html body a / h2" (0,0,3) and
     the platform's bare-element globals.
   - Part 2: every selector starts with ":root body", so it wins even when
     a page links its own sheet after this one.

   FONTS: the same self-hosted files the skin uses. The site's .htaccess
   already sends Access-Control-Allow-Origin for them.
   ========================================================================= */
@font-face{font-family:"Bricolage Grotesque";src:url(https://easynquickdrivingclinic.com/assets/fonts/bricolage-grotesque-latin.woff2) format("woff2");font-weight:500 800;font-display:swap}
@font-face{font-family:"Instrument Sans";src:url(https://easynquickdrivingclinic.com/assets/fonts/instrument-sans-latin.woff2) format("woff2");font-weight:400 700;font-display:swap}

/* =========================== PART 1: CHROME =========================== */
.enq-chrome{
  /* = site.css :root */
  --enq-display:"Bricolage Grotesque",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --enq-body:"Instrument Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --enq-ink:#0F2A3A;--enq-soft:#4A6172;--enq-line:#D6E4F2;--enq-tint:#E3F0FF;
  --enq-struct:#1B6FD6;--enq-act:#3F7A00;--enq-act-hi:#5FA312;--enq-act-edge:#2C5600;
  --enq-pad:28px;

  display:block;width:100%;margin:0;padding:0;
  font:400 16px/1.6 var(--enq-body);color:var(--enq-ink);text-align:left;letter-spacing:normal;
  -webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-size-adjust:100%;
}
.enq-chrome *,.enq-chrome *::before,.enq-chrome *::after{box-sizing:border-box}
.enq-chrome p{margin:0;padding:0;color:inherit;font-size:inherit;line-height:inherit}
.enq-chrome b,.enq-chrome small,.enq-chrome i{font-size:inherit}
.enq-chrome img,.enq-chrome svg{display:block;margin:0;border:0;max-width:none}
.enq-chrome a{color:var(--enq-struct);text-decoration:none}
.enq-chrome .enq-wrap{max-width:1180px;margin:0 auto;padding:0 var(--enq-pad)}
.enq-chrome .enq-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.enq-chrome .enq-nw{white-space:nowrap}
.enq-chrome .enq-skip{position:absolute;left:-999px;top:8px;background:var(--enq-ink);color:#fff;padding:8px 12px;border-radius:8px;z-index:50}
.enq-chrome .enq-skip:focus{left:8px}
.enq-chrome a:focus-visible,.enq-chrome summary:focus-visible{outline:3px solid var(--enq-struct);outline-offset:3px;border-radius:4px}

/* ---- header ---- */
.enq-chrome.enq-bar{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.96);
  backdrop-filter:saturate(1.4) blur(8px);-webkit-backdrop-filter:saturate(1.4) blur(8px);border-bottom:1px solid var(--enq-line)}
.enq-chrome .enq-bar-in{display:flex;align-items:center;gap:26px;height:76px;position:relative}
.enq-chrome .enq-brand{display:flex;align-items:center;gap:12px;flex:none;color:var(--enq-ink)}
.enq-chrome .enq-brand-mark{width:46px;height:46px;flex:none}
.enq-chrome .enq-word{display:flex;flex-direction:column;line-height:1}
.enq-chrome .enq-word b{font:800 22px/1 var(--enq-display);letter-spacing:-.01em;white-space:nowrap;color:inherit}
.enq-chrome .enq-word i{font-style:normal;color:var(--enq-struct)}
.enq-chrome .enq-word small{font:600 11px/1 var(--enq-body);letter-spacing:.2em;text-transform:uppercase;margin-top:6px;color:var(--enq-soft);white-space:nowrap}

.enq-chrome .enq-menu{display:flex;gap:26px;margin-left:auto;align-items:center}
.enq-chrome .enq-menu a{color:var(--enq-ink);font-weight:500;font-size:15px;white-space:nowrap;opacity:.85}
.enq-chrome .enq-menu a:hover{opacity:1;color:var(--enq-struct)}

/* Log in: outlined blue pill, visible at every width */
.enq-chrome .enq-login{display:inline-flex;align-items:center;gap:7px;height:44px;padding:0 16px;border:2px solid var(--enq-struct);
  border-radius:11px;background:var(--enq-tint);color:var(--enq-struct);font-weight:700;font-size:15px;white-space:nowrap;
  transition:background .15s,color .15s}
.enq-chrome .enq-login svg{width:18px;height:18px}
.enq-chrome .enq-login:hover{background:var(--enq-struct);color:#fff}

/* Register: the green pressable button */
.enq-chrome .enq-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;font:700 16px/1 var(--enq-body);
  color:#fff;padding:14px 22px;border-radius:11px;white-space:nowrap;border:0;
  background:linear-gradient(180deg,var(--enq-act-hi),var(--enq-act));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 3px 0 var(--enq-act-edge),0 8px 18px -8px var(--enq-act-edge);
  transition:transform .15s,box-shadow .15s,filter .15s}
.enq-chrome .enq-btn .enq-arr{transition:transform .2s}
.enq-chrome .enq-btn:hover{color:#fff;transform:translateY(-1px);filter:brightness(1.05)}
.enq-chrome .enq-btn:hover .enq-arr{transform:translateX(4px)}
.enq-chrome .enq-btn:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 var(--enq-act-edge)}

/* menu button + drop-down (<details>; hidden on desktop) */
.enq-chrome .enq-drop{display:none}
.enq-chrome .enq-menu-btn{list-style:none;display:inline-flex;width:44px;height:44px;border:1px solid var(--enq-line);border-radius:10px;
  background:#fff;color:var(--enq-ink);align-items:center;justify-content:center;cursor:pointer}
.enq-chrome .enq-menu-btn::-webkit-details-marker{display:none}
.enq-chrome .enq-menu-btn svg{width:22px;height:22px}
.enq-chrome .enq-drop-panel{display:flex;flex-direction:column;align-items:stretch;position:absolute;top:100%;right:var(--enq-pad);
  width:260px;background:#fff;border:1px solid var(--enq-line);border-radius:14px;padding:8px;margin:8px 0 0;
  box-shadow:0 24px 40px -20px rgba(15,42,58,.45)}
.enq-chrome .enq-drop-panel a{display:block;padding:13px 14px;border-radius:9px;font-size:16px;font-weight:500;color:var(--enq-ink)}
.enq-chrome .enq-drop-panel a:hover{background:var(--enq-tint);color:var(--enq-struct)}
.enq-chrome .enq-drop-panel .enq-menu-reg{color:#fff;background:linear-gradient(180deg,var(--enq-act-hi),var(--enq-act));
  text-align:center;font-weight:700;margin-top:6px}
.enq-chrome .enq-drop-panel .enq-menu-reg:hover{color:#fff;background:linear-gradient(180deg,var(--enq-act-hi),var(--enq-act));filter:brightness(1.05)}

/* ---- footer: one compact band ---- */
.enq-chrome.enq-foot{clear:both;background:var(--enq-ink);color:#C9D7E2;padding-top:24px;font-size:14px}
.enq-chrome.enq-foot .enq-brand{color:#fff}
.enq-chrome.enq-foot .enq-brand-mark{width:38px;height:38px}
.enq-chrome.enq-foot .enq-word b{font-size:18px}
.enq-chrome.enq-foot .enq-word i{color:#8EC3FF}
.enq-chrome.enq-foot .enq-word small{color:#9FB4C4}
.enq-chrome .enq-foot-in{display:grid;grid-template-columns:auto 1fr auto;gap:32px;align-items:center}
.enq-chrome .enq-foot-lic{margin-top:6px;font-size:13px;color:#9FB4C4}
.enq-chrome .enq-foot-contact{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.enq-chrome .enq-foot-contact p{font-size:13px;color:#9FB4C4}
.enq-chrome.enq-foot a{color:#C9D7E2}
.enq-chrome.enq-foot a:hover{color:#fff}
.enq-chrome .enq-foot-phone{display:inline-flex;align-items:center;gap:8px;font-weight:700;color:#fff!important;font-size:17px}
.enq-chrome .enq-foot-phone svg{width:18px;height:18px}
.enq-chrome .enq-foot-links{display:flex;gap:20px;font-weight:600}
.enq-chrome .enq-foot-legal{border-top:1px solid rgba(255,255,255,.12);margin-top:20px;padding-top:12px;padding-bottom:14px;
  display:flex;justify-content:space-between;align-items:flex-start;gap:24px;font-size:12px;color:#8FA6B8}
.enq-chrome .enq-foot-legal p:last-child{white-space:nowrap}

/* ---- responsive: site.css breakpoints ---- */
@media (max-width:1120px){
  .enq-chrome .enq-menu{display:none}
  .enq-chrome .enq-drop{display:block}
  .enq-chrome .enq-login{margin-left:auto}
  .enq-chrome .enq-bar-in{gap:16px}
}
@media (max-width:900px){
  .enq-chrome .enq-foot-in{grid-template-columns:1fr auto;gap:14px 24px}
  .enq-chrome .enq-foot-contact{grid-column:1/3;grid-row:2;align-items:flex-start;text-align:left}
}
@media (max-width:640px){
  .enq-chrome{--enq-pad:16px}
  .enq-chrome .enq-bar-in{height:64px;gap:10px}
  .enq-chrome .enq-brand{gap:9px}
  .enq-chrome .enq-brand-mark{width:38px;height:38px}
  .enq-chrome .enq-word b{font-size:18px}
  .enq-chrome .enq-word small{font-size:10px;letter-spacing:.14em;margin-top:5px}
  .enq-chrome .enq-btn-bar{display:none}
  .enq-chrome .enq-login{font-size:14px;padding:0 12px}
  .enq-chrome .enq-menu-btn{width:42px;height:42px}
  .enq-chrome .enq-drop-panel{right:16px;left:16px;width:auto}
  /* footer stacks: brand, contact, links; 44px tap rows */
  .enq-chrome.enq-foot{padding-top:20px}
  .enq-chrome .enq-foot-in{grid-template-columns:1fr;gap:12px}
  .enq-chrome .enq-foot-contact{grid-column:auto;grid-row:auto;order:2;align-items:stretch;text-align:left}
  .enq-chrome .enq-foot-links{order:3;gap:0;flex-wrap:wrap;margin-left:-12px}
  .enq-chrome .enq-foot-links a{display:inline-flex;align-items:center;min-height:44px;padding:0 12px}
  .enq-chrome .enq-foot-phone{justify-content:center;min-height:48px;border:1px solid rgba(255,255,255,.25);border-radius:11px}
  .enq-chrome .enq-foot-contact p{margin-top:6px}
  .enq-chrome .enq-foot-legal{flex-direction:column;gap:4px;margin-top:6px}
}
@media (max-width:380px){
  /* very small phones: logo, Log in and menu still fit on one row */
  .enq-chrome .enq-word b{font-size:16px}
  .enq-chrome .enq-word small{letter-spacing:.08em}
  .enq-chrome .enq-login svg{display:none}
}
@media (prefers-reduced-motion:reduce){.enq-chrome *{transition:none!important}}

/* ================== PART 2: LEGACY PAGES ON PHONES AND TABLETS ==================
   Up to 960px: every fixed-width box (the 450-950px widths in main.css,
   affiliate.css, menu.css, chapters.css, the payment style.css) shrinks to
   the screen. Up to 640px: side-by-side floats stack and fields go full width.
   Layout only: no colours, fonts or button looks change.

   WHY EVERY RULE STARTS WITH ":root body": payment.php links
   includes/css/style.css AFTER the header record (where this sheet is
   linked), so a rule here with the same specificity as style.css loses.
   ":root body" adds (0,1,1) to every selector so these rules win whatever
   order the page loads the sheets in. It changes nothing above 960px.
   ============================================================================ */
@media (max-width:960px){

  /* ---- page frame ---- */
  html,
  body{max-width:100%}
  :root body #main_container,
  :root body #content_containter,
  :root body #reg,
  :root body #forms,
  :root body #cert_container,
  :root body #cert_header,
  :root body #option_container,
  :root body #payment_container,
  :root body #receipt_container,
  :root body #lite_payment_container,
  :root body #old,
  :root body #no_badge,
  :root body #receipt,
  :root body #fax_email_container,
  :root body #discount_container,
  :root body #menu_container,
  :root body #menu_header,
  :root body #change_reg,
  :root body .idemia,
  :root body #proctor,
  :root body #map_container,
  :root body #proctor_locations,
  :root body #location_list,
  :root body .payment_panel,
  :root body .pricing_panel,
  :root body #startTable{
    max-width:100%;box-sizing:border-box}

  /* boxes with a fixed width wider than a tablet */
  :root body #content_containter,
  :root body #cert_header,
  :root body #option_container,
  :root body #proctor,
  :root body #map_container,
  :root body #proctor_locations,
  :root body #location_list,
  :root body #menu_header,
  :root body #old,
  :root body #payment_container,
  :root body #lite_payment_container,
  :root body #no_badge{width:auto}
  :root body #content_containter{padding:24px}
  :root body #menu_header{height:auto;overflow:hidden}   /* was fixed 150px */

  /* fixed-width tables from markup (width="600" etc.) fit the screen;
     any table can scroll inside itself instead of widening the page */
  :root body table[width]{width:100%}
  :root body table{max-width:100%}

  /* media */
  :root body #main_container img,
  :root body #content_containter img,
  :root body #viewchap img{max-width:100%;height:auto}
  :root body #main_container iframe,
  :root body #main_container video,
  :root body #content_containter iframe,
  :root body #content_containter video{max-width:100%}

  /* pop-ups positioned for a 900px desktop (left:50% + negative margin) */
  :root body #chapreview{left:8px;right:8px;width:auto;margin-left:0;height:80vh}
  :root body #chapreview iframe{width:100%;height:calc(100% - 21px);box-sizing:border-box}
  :root body #reviewbar{width:auto;box-sizing:border-box}
  :root body #notice{left:8px;right:8px;margin-left:0;box-sizing:border-box}

  /* chapters.css fixed boxes */
  :root body .chapter_title{width:auto;max-width:100%;height:auto;min-height:40px;box-sizing:border-box}
  :root body div#transcript1,
  :root body div#transcript2,
  :root body div#transcript3,
  :root body div#transcript4,
  :root body div#transcript5,
  :root body div#transcript6,
  :root body div#transcript7{width:auto;max-width:100%;box-sizing:border-box}
  :root body .one_liners,
  :root body .insurance_claims,
  :root body .real_jokes,
  :root body .joke_text,
  :root body .trivia_text{
    width:auto;max-width:100%;float:none;box-sizing:border-box}
  :root body div.joke_container{width:auto;max-width:100%;margin-left:0;margin-right:0}
  :root body table.response-table{width:100%}
  :root body .section-break{margin-left:0;margin-right:0;font-size:36pt;padding:50px 0}
  :root body #dock{width:auto;height:auto;overflow:hidden;box-sizing:border-box}

  /* main.css green/blue link-buttons: 450px wide */
  :root body div.button{width:auto;max-width:450px;height:auto;min-height:30px}
}

@media (max-width:640px){

  :root body #content_containter{padding:16px 12px}
  :root body #main_container{padding-left:12px;padding-right:12px}

  /* every text field and select: fits, 16px so iPhones don't zoom on tap */
  :root body input[type="text"],
  :root body input[type="email"],
  :root body input[type="password"],
  :root body input[type="tel"],
  :root body input[type="number"],
  :root body input:not([type]),
  :root body select,
  :root body textarea{
    max-width:100%;font-size:16px;box-sizing:border-box}

  /* ---- registration (registration.css) ---- */
  :root body #reg{padding:0}
  :root body .reg_input,
  :root body .reg_select{width:100%;margin:4px 0 10px;min-height:44px}
  :root body .reg_label{padding-left:0}
  /* two-column label/field tables stack: label above field */
  :root body td.label,
  :root body td.field{display:block;width:auto;text-align:left;padding-left:0;padding-right:0}
  :root body td.label{padding-top:10px}
  :root body td[width]{width:auto}

  /* ---- payment (style.css) ---- */
  :root body .payment_panel,
  :root body .pricing_panel{width:auto;margin-left:0;margin-right:0}
  :root body #fax_email_container,
  :root body #discount_container{width:auto;padding:14px}
  :root body #receipt{width:auto;padding:16px}
  :root body .title,
  :root body .text_form{float:none}
  :root body .text_form{display:block;width:100%;margin:4px 0 12px}
  :root body .text_form input,
  :root body .text_form select{width:100%;min-height:44px}
  :root body .description{float:none;text-align:left}
  :root body label.form{float:none;width:auto;display:block}
  :root body .price{float:none;display:block;margin-top:4px}
  :root body #payment_container{position:static;height:auto}
  :root body #old{height:auto}

  /* ---- student menu (menu.css) ---- */
  :root body #stoplight_container{float:none;height:auto}
  :root body #profile_container{float:none;width:auto;height:auto;margin-top:10px;box-sizing:border-box}
  :root body #change_reg{width:auto;padding:0}
  :root body .change_label{text-align:left;padding:8px 0 2px}

  /* ---- chapter view (chapters.css) ---- */
  :root body .img_lt,
  :root body .img_rt,
  :root body .left,
  :root body .right,
  :root body .img_l,
  :root body .img_r{float:none;display:block;margin:10px auto;text-align:center}
  :root body #main_container ul li,
  :root body #main_container ol li{margin-left:22px}
  :root body #main_container h2,
  :root body #main_container h3,
  :root body #main_container h4{padding-left:0}
  :root body .joke_guy,
  :root body .joke_image,
  :root body .trivia_image,
  :root body .smiley_face{float:none}
  :root body .joke_time{margin-left:0;width:auto}
  :root body .dock_content{float:none;width:auto;padding:4px 0}
  :root body .dock_content a{display:inline-block;min-height:44px;line-height:44px}
  :root body .answer input[type="radio"],
  :root body .answer input[type="checkbox"]{width:20px;height:20px;vertical-align:middle}
  :root body ul.sortable,
  :root body ul.sortable-numbers{float:none}
  :root body #Timer{max-width:100%}
}


/* ===================== PAYMENT: UPGRADES + PAYMENT STEP =====================
   The upgrades ("PROCESSING OPTIONS") step: each .shipping_option is an
   image floated left, a price floated right, a radio/checkbox floated left
   and label.form floated left at 480px (style.css). #main_container is
   align="center", so on a phone that 480px row was centred on a 360px
   screen and pushed past the LEFT edge, where the page can't scroll to.
   Below 640px each option becomes a small grid:
       [ image ........ price ]
       [ o  label text ...... ]
   The payment step has inline widths (Groupon box 350px + padding, coupon
   row 400px) that only !important can override.
   ============================================================================ */
@media (max-width:640px){
  :root body #main_container{text-align:left;overflow-wrap:anywhere}
  :root body #main_container #shipping_header{margin:12px 0 18px;text-align:center}
  :root body #main_container #shipping_header h1{font-size:22px;letter-spacing:1px}

  :root body #main_container table#upgrade_container,
  :root body #main_container table.existingTable{width:100%;max-width:100%}
  :root body #main_container table#upgrade_container td{font-size:15px!important;line-height:1.45}

  /* each upgrade option */
  :root body #main_container .shipping_option{
    display:grid;grid-template-columns:28px minmax(0,1fr) auto;
    grid-template-areas:"img img price" "pick text text";
    align-items:center;gap:8px 6px;padding:12px;box-sizing:border-box;max-width:100%}
  :root body #main_container .shipping_option > *{grid-column:1 / -1;min-width:0}
  :root body #main_container .shipping_option > .clear{display:none}
  :root body #main_container .shipping_option > .upgrade_img{grid-area:img;float:none;margin:0}
  :root body #main_container .shipping_option > .upgrade_img img{max-width:100%;max-height:64px;
    width:auto;height:auto;margin:0}
  :root body #main_container .shipping_option > .price{grid-area:price;float:none;display:block;
    margin:0;text-align:right;white-space:nowrap}
  :root body #main_container .shipping_option > input[type="radio"],
  :root body #main_container .shipping_option > input[type="checkbox"]{
    grid-area:pick;float:none;width:22px;height:22px;margin:0;align-self:start}
  :root body #main_container .shipping_option > label.form{grid-area:text;float:none;width:auto;
    display:block;margin:0;text-align:left;overflow-wrap:anywhere}
  :root body #main_container .shipping_option img{max-width:100%;height:auto}

  /* "Select Payment Method" and "Continue to Payment" table (width="700") */
  :root body #main_container table[width] img{max-width:100%;height:auto}
  :root body #main_container #payment_button{margin:20px 0}

  /* payment step: Groupon / coupon boxes carry inline pixel widths */
  :root body #main_container div.row[style*="width"]{width:auto!important;max-width:100%!important;
    box-sizing:border-box;padding-left:14px!important;padding-right:14px!important}
  :root body #main_container div.row label.form[style*="float"]{float:none!important;width:auto!important;
    display:block;margin-bottom:6px}
  :root body #main_container div.row input[style*="float"]{float:none!important;width:100%;
    min-height:44px;margin:0 0 8px}
  :root body #main_container div.row div[align="right"]{text-align:left;padding-left:0!important}
  :root body #main_container div.row input[type="submit"]{white-space:normal;max-width:100%}

  /* card / billing tables: CVC picture and helper text fit */
  :root body #main_container td.label img{max-width:100%;height:auto}
  :root body #main_container table{max-width:100%}
}


/* ================== THIS SITE'S EXTRA FIXED WIDTHS ==================
   affiliate.css: #template_container, #header, #navigation at 820px.
   chapters.css (course 2): .question-container 600px, #slide min-height 650px.
   ===================================================================== */
@media (max-width:960px){
  :root body #template_container,:root body #header,:root body #navigation{
    width:auto;max-width:100%;box-sizing:border-box}
  :root body .question-container{width:auto;max-width:100%;box-sizing:border-box}
  :root body #reviewbar{width:auto;box-sizing:border-box}
  :root body #slide video{max-width:100%;height:auto}
}
@media (max-width:640px){
  :root body #slide{min-height:0}
  :root body .question-container .image img{max-width:100%;height:auto}
  :root body #final_button_off{max-width:100%}
}
@media (max-width:640px){
  /* label/field forms: a text box with size="40" is wider than a phone, and
     a table cell grows to fit it. Fixed table layout + full-width fields
     keep the form on screen. */
  :root body table[width]{table-layout:fixed}
  :root body td.field input[type="text"],:root body td.field input[type="email"],
  :root body td.field input[type="password"],:root body td.field input[type="tel"],
  :root body td.field input:not([type]){width:100%;min-height:44px}
}


/* ======================= FIT THE SCREEN ON PHONES =======================
   Below 640px every form/layout table on the back-end pages stacks (label
   above field) and every field is as wide as the screen, never wider.
   Written so it works:
   - with or without the #content_container wrapper from the header,
   - in browsers without :has() (no :has in any selector list here: one
     unsupported selector would void the whole rule),
   - whatever widths, size="40", nowrap or inline styles the form uses.
   Nothing is clipped or hidden: text wraps instead.
   Data tables that should keep their columns are left alone: the student
   home progress table and the course-content tables (those scroll inside
   themselves, set further up).
   ========================================================================= */
@media (max-width:640px){

  /* 1. layout tables stack */
  :root body table:not(#menu_table):not(.response-table):not(#menu_container table):not(#course_content table):not(#content_containter table):not(.enq-chrome table),
  :root body table:not(#menu_table):not(.response-table):not(#menu_container table):not(#course_content table):not(#content_containter table):not(.enq-chrome table) > tbody,
  :root body table:not(#menu_table):not(.response-table):not(#menu_container table):not(#course_content table):not(#content_containter table):not(.enq-chrome table) > thead,
  :root body table:not(#menu_table):not(.response-table):not(#menu_container table):not(#course_content table):not(#content_containter table):not(.enq-chrome table) > tfoot,
  :root body table:not(#menu_table):not(.response-table):not(#menu_container table):not(#course_content table):not(#content_containter table):not(.enq-chrome table) > * > tr,
  :root body table:not(#menu_table):not(.response-table):not(#menu_container table):not(#course_content table):not(#content_containter table):not(.enq-chrome table) > * > tr > td,
  :root body table:not(#menu_table):not(.response-table):not(#menu_container table):not(#course_content table):not(#content_containter table):not(.enq-chrome table) > * > tr > th{
    display:block;width:auto!important;min-width:0;max-width:100%;height:auto!important;
    box-sizing:border-box;white-space:normal!important}
  :root body table:not(#menu_table):not(.response-table):not(#menu_container table):not(#course_content table):not(#content_containter table):not(.enq-chrome table) > * > tr > td{
    padding:2px 0!important;text-align:left!important}
  :root body table:not(#menu_table):not(.response-table):not(#menu_container table):not(#course_content table):not(#content_containter table):not(.enq-chrome table) > * > tr > td:first-child{
    padding-top:12px!important}
  :root body #continue-button{text-align:center!important}

  /* page edges: if the page isn't inside the header's wrapper, give the
     content 12px side margins so text doesn't touch the screen edge */
  :root body > :not(.enq-chrome):not(#template_container):not(#content_container):not(#enq-main):not(script):not(style):not(link):not(#chapreview):not(#notice){
    margin-left:12px!important;margin-right:12px!important;max-width:calc(100% - 24px)!important}

  /* student home: the three stoplight links are 350px wide in main.css */
  :root body #red_light,:root body #yellow_light,:root body #green_light{width:auto!important;max-width:100%}
  :root body #menu_header{overflow:visible!important}

  /* 2. every field fits: full width text boxes, selects no wider than the
        screen (a select's width otherwise comes from its longest option) */
  :root body input[type="text"],:root body input[type="email"],:root body input[type="tel"],
  :root body input[type="password"],:root body input[type="number"],:root body input:not([type]),
  :root body textarea{
    width:100%!important;max-width:100%!important;min-width:0!important;
    box-sizing:border-box;font-size:16px;min-height:44px}
  :root body select{max-width:100%!important;min-width:0!important;box-sizing:border-box;font-size:16px;min-height:44px}
  :root body td > select:only-child,:root body td > select:only-of-type{width:100%}

  /* 3. nothing else wider than the screen; long words and emails wrap */
  :root body img,:root body hr,:root body iframe,:root body video,:root body object,:root body embed{max-width:100%!important;box-sizing:border-box}
  :root body img{height:auto}
  :root body [style*="width"]:not(.enq-chrome *):not(.enq-chrome){max-width:100%!important;box-sizing:border-box}
  :root body [nowrap],:root body [style*="nowrap"]{white-space:normal!important}
  :root body #content_container,:root body #aff_content,:root body #template_container,:root body #content,:root body #main_container{overflow-wrap:anywhere;max-width:100%;box-sizing:border-box}
  :root body p,:root body font,:root body b,:root body span,:root body div:not(.enq-chrome *){overflow-wrap:anywhere}
}

/* tablets (641-960px): the content card is narrower than the 800px+ the old
   markup assumes (hr width="800", nowrap cells). Keep it inside the card. */
@media (max-width:960px){
  :root body hr{max-width:100%!important;box-sizing:border-box}
  /* a fixed hr width inside a table cell stretches the whole table; let the
     line follow the card width instead */
  :root body hr[width]{width:auto!important}
  :root body [nowrap],:root body [style*="nowrap"]{white-space:normal!important}
  :root body #aff_content,:root body #content_container{max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
  :root body #aff_content table{max-width:100%}
  :root body #aff_content img{max-width:100%;height:auto}
}
