/* ============================================================================
   EG Traffic School (aid 463) course sheet - eg-course.css
   BUILD CA-AFF-2026-11-27-R3 (California affiliate master in this school's colours, steps bar on top)
   Registration, login, Student Center, course chapters, quizzes, final
   exam, tracker step and payment, for every California affiliate school.
   Built from the California corporate master (cs-chrome-v2 build J), the
   same look the corporate schools already have, in each affiliate's own
   colours. Styling only: no words, prices, links or form fields change.

   HOW TO USE
   1. Upload to: create /payments/affimg/egtraffic/ (its header images load from relative paths).
   2. In the aid 463 header record (registration side AND course side), add the link
      to it as the last line before </head>. global.css and the school's own files are not touched.
   3. This header record has no phone viewport line. Add it inside <head>:
      <meta name="viewport" content="width=device-width, initial-scale=1">
   The school's header, footer, name and logo keep their own look.
   Undo: remove the one link line.
   ========================================================================= */
/* ==================== PART 2: PLATFORM PAGES ON PHONES ====================
   Foundation 5 breakpoints: small <= 40em (640px), medium <= 64em (1024px).
   ========================================================================= */

/* ---- everything: no page wider than the screen ---- */
@media only screen and (max-width:64em){
  :root body img{max-width:100%;height:auto}
  :root body table[width]{max-width:100%}

  /* chapter-review pop-up and notice box: positioned for a ~900px window */
  :root body #chapreview{left:8px;right:8px;width:auto;margin-left:0;height:80vh;max-width:none}
  :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;max-width:none;box-sizing:border-box}
}

@media only screen and (max-width:40em){
  /* any text field or select: fits, and 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}

  /* fixed-width tables (width="600" etc.) fill the screen instead */
  :root body table[width]{width:100%}
  :root body td[width]{width:auto}

  /* Foundation rows/columns: keep inside the screen */
  :root body .row{max-width:100%}
}


/* ================================ REGISTER ================================ */
@media only screen and (max-width:40em){
  :root body #registration_left_panel,
  :root body #registration_panel,
  :root body #registration_container{
    float:none;clear:both;width:auto;max-width:100%;margin-left:0;margin-right:0;box-sizing:border-box}
  :root body #registration_panel{padding-left:0;padding-right:0}

  /* left panel: title, then the steps in one row */
  :root body #registration_left_panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;margin-bottom:16px}
  :root body #registration_left_panel > *{grid-column:1 / -1}
  :root body #registration_left_panel > br{display:none}
  :root body #registration_left_panel > #reg_bread,
  :root body #registration_left_panel > .reg_bread{grid-column:auto;width:auto;margin:0;min-width:0;overflow:hidden}
  :root body #registration_left_panel #bread_container,
  :root body #registration_left_panel .bread_container{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  :root body #registration_container .registration_subdivision{width:auto;max-width:100%;
    box-sizing:border-box;margin-left:0;margin-right:0}
  :root body #registration_container .registration_subdivision table{width:100%}

  /* each row: label on top, field full width */
  :root body #registration_container .frm_row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;
    width:auto;max-width:100%;height:auto;box-sizing:border-box;text-align:left}
  :root body #registration_container .frm_row > br{display:none}
  :root body #registration_container .frm_row label.form{float:none;display:block;flex:0 0 100%;
    width:auto;margin:0;text-align:left}
  :root body #registration_container .frm_row .desc{flex:0 0 100%}
  :root body #registration_container .frm_row .contact_field{flex:1 1 100%;width:100%;max-width:100%;
    height:auto;min-height:44px;margin:0;font-size:16px;box-sizing:border-box}
  :root body #registration_container .frm_row select{flex:1 1 0;min-width:0;width:auto;max-width:100%;
    min-height:44px;margin:0;font-size:16px;box-sizing:border-box}
  :root body #registration_container .frm_row select:only-of-type{flex-basis:100%}
  :root body #registration_container .frm_row label.form input[type="checkbox"]{width:22px;height:22px;
    margin:0 0 0 6px;vertical-align:middle}
  :root body #registration_container input[type="radio"]{width:20px;height:20px;vertical-align:middle}

  /* "Other (please specify)" */
  :root body #registration_container #refer{flex:0 0 100%;max-width:100%}
  :root body #registration_container #refer input{display:block;width:100%;max-width:100%;
    min-height:44px;margin:6px 0 0;font-size:16px;box-sizing:border-box}

  /* Next button: its own style, only kept inside the screen */
  :root body #registration_container .button,
  :root body #registration_container input[type="submit"]{max-width:100%;box-sizing:border-box}
}
@media only screen and (max-width:23.75em){ /* 380px: month gets its own line */
  :root body #registration_container .frm_row select[name="dobMonth"]{flex-basis:100%}
}


/* ============================ LOGIN (login.php) ============================
   The login page's inline <style> sets #login_panel to 350px over a 350x250
   background and its inputs to 240px: ~20px off a 360px phone.
   ========================================================================= */
@media only screen and (max-width:25em){
  :root body #login_container{margin-top:20px}
  :root body #login_container #login_panel{width:100%;max-width:350px;height:auto;min-height:250px;
    padding-bottom:16px;background-size:100% 100%;box-sizing:border-box}
  /* inputs are 70% wide and centred, so labels start 15% in to line up */
  :root body #login_container #login_panel .label{padding-left:15%}
  :root body #login_container #login_panel .login_form{width:70%;max-width:240px;margin:0 auto 10px;
    font-size:16px;min-height:44px;box-sizing:border-box}
  /* sized to its label: short and wide, not a tall square */
  :root body #login_container #login_panel input[type="submit"]{min-height:0;height:auto;width:auto;
    padding:8px 22px;line-height:1.2}
}


/* ======================== STUDENT HOME (home.php) ======================== */
@media only screen and (max-width:40em){
  :root body #menu_container,:root body #menu_header,:root body #change_reg{
    width:auto;max-width:100%;box-sizing:border-box}
  :root body #menu_header{min-height:0;height:auto;overflow:hidden}
  :root body #menu_header #stoplight_container,
  :root body #menu_header #profile_container{float:none;width:auto;height:auto;max-width:100%;box-sizing:border-box}
  :root body #menu_header #profile_container{margin-top:10px}
  :root body #red_light,:root body #yellow_light,:root body #green_light{width:auto;max-width:100%}
  /* chapter/status table: scroll sideways inside itself, never the page */
  :root body #menu_table,:root body #menu_container table{display:block;max-width:100%;
    overflow-x:auto;-webkit-overflow-scrolling:touch}
  :root body #prog_bar,:root body #prog_bar img{max-width:100%}
  :root body .change_label{text-align:left}
}


/* ========================= CHAPTER VIEW (show.php) ========================= */
@media only screen and (max-width:40em){
  :root body #content_container,:root body #template_container,
  :root body #course_content,:root body #content_chapter_container{
    max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
  :root body #course_content,:root body #content_chapter_container{padding-left:6px;padding-right:6px}

  :root body #course_content iframe,:root body #course_content video,
  :root body #course_content embed,:root body #course_content object{max-width:100%}
  :root body #course_content video{height:auto}
  :root body #course_content iframe[src*="youtube"],:root body #course_content iframe[src*="youtu.be"],
  :root body #course_content iframe[src*="vimeo"]{width:100%;height:auto;aspect-ratio:16 / 9}

  /* floated images drop above their text instead of squeezing it */
  :root body #course_content .img_lt,:root body #course_content .img_rt,
  :root body #course_content .left,:root body #course_content .right,
  :root body #course_content .img_l,:root body #course_content .img_r{
    float:none;display:block;margin-left:auto;margin-right:auto;padding-left:0;padding-right:0}

  /* content tables keep their layout and scroll inside themselves */
  :root body #course_content table{display:block;max-width:100%;overflow-x:auto;
    -webkit-overflow-scrolling:touch;overflow-wrap:normal}

  /* fixed-width 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{
    width:auto;max-width:100%;box-sizing:border-box}
  :root body .one_liners,:root body .insurance_claims,:root body .real_jokes{
    float:none;width:auto;max-width:100%;box-sizing:border-box}
  :root body div.joke_container{width:auto;max-width:100%;margin-left:0;margin-right:0}
  :root body .movie_container,:root body .movie_label,:root body .movie_sub{width:auto;max-width:100%}
  :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 #course_content ul,:root body #course_content ol{margin-left:22px}

  /* bottom dock (back / next) */
  :root body #dock{width:auto;height:auto;padding:6px 10px;overflow:hidden;box-sizing:border-box}
  :root body .dock_content{width:auto;float:none;padding:4px 0}
  :root body .dock_content a{display:inline-block;min-height:44px;line-height:44px;margin:0 15px 0 0}

  /* quiz answers: bigger radio targets */
  :root body .answer input[type="radio"]{width:20px;height:20px;vertical-align:middle}
}


/* =============================== PAYMENT ===============================
   The payment pages are label/field tables and fixed-width boxes; some
   widths are written inline in the HTML, which only !important overrides.
   ========================================================================= */
@media only screen and (max-width:40em){
  /* label / field table rows 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}

  /* boxes with an inline pixel width (coupon / voucher rows) */
  :root body div[style*="width"][style*="px"]{
    width:auto!important;max-width:100%!important;box-sizing:border-box}
  :root body label.form[style*="float"],:root body input[style*="float"]{float:none!important}
  :root body label.form[style*="width"]{width:auto!important;display:block}

  /* upgrade / shipping options: image + price, then choice + description */
  :root body .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;
    max-width:100%;box-sizing:border-box}
  :root body .shipping_option > *{grid-column:1 / -1;min-width:0}
  :root body .shipping_option > .clear{display:none}
  :root body .shipping_option > .upgrade_img{grid-area:img;float:none;margin:0}
  :root body .shipping_option > .upgrade_img img{max-height:64px;width:auto;margin:0}
  :root body .shipping_option > .price{grid-area:price;float:none;margin:0;text-align:right;white-space:nowrap}
  :root body .shipping_option > input[type="radio"],
  :root body .shipping_option > input[type="checkbox"]{grid-area:pick;float:none;width:22px;height:22px;
    margin:0;align-self:start}
  :root body .shipping_option > label.form{grid-area:text;float:none;width:auto;display:block;margin:0;
    text-align:left;overflow-wrap:anywhere}

  :root body .payment_panel,:root body .pricing_panel,:root body #receipt,
  :root body #fax_email_container,:root body #discount_container,
  :root body #option_container,:root body #cert_header,:root body #lite_payment_container{
    width:auto;max-width:100%;margin-left:0;margin-right:0;box-sizing:border-box}
  :root body .title,:root body .text_form{float:none}
  :root body .text_form input,:root body .text_form select{width:100%;min-height:44px}
  :root body #payment_container{position:static;width:auto;height:auto}
}


/* =====================================================================
   PART 3: THE NEW LOOK FOR THE PAGES THEMSELVES (added in v2)
   Course pages, Student Center, registration, DMV notice, tracker
   step and payment. Styling only: no page text, form field, price or
   payment step changes.

   WHY SOME RULES SAY !important
   - global.css (shared by every state, never edited) forces padding 0,
     border none and fixed widths on phones with !important. The only way
     to win over it is !important on a stronger selector.
   - Some boxes have their size written into the page itself
     (style="padding-top:60px", style="width:175px", font sizes on table
     cells). Those also need !important.
   Everything else wins on the ":root body" prefix alone, because the
   page sheets (register.css, chapters.css, menu.css) load after this one.

   California has no seat timer: the leftover timer line is hidden.
   ===================================================================== */

/* colours: every affiliate block below sets the --aff-* values */
:root body{
  --aff-brand:#1745ac; --aff-brand-rgb:23,69,172; --aff-head:#125470;
  --aff-act:#a51f1f; --aff-act-dark:#861818; --aff-act-rgb:165,31,31;
  --aff-tint:#f4f7fc; --aff-tint2:#e8eefb; --aff-line:#d6dff2; --aff-line2:#c6d0e6; --aff-mid:#9db0dc;
}
:root body{
  --cs-blue:var(--aff-brand); --cs-blue-tint:var(--aff-tint); --cs-blue-line:var(--aff-line);
  --cs-red:var(--aff-act);  --cs-red-dark:var(--aff-act-dark);
  --cs-teal:var(--aff-head); --cs-green:#1a7f37;
  --cs-ink:#212529;  --cs-text:#344054; --cs-mute:#5b6470;
  --cs-line:#dee2e6; --cs-soft-line:#edf0f4; --cs-zebra:#f8fafc;
  --cs-head:"Montserrat",-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --cs-read:"Source Sans 3",-apple-system,"Segoe UI",Roboto,Arial,Helvetica,sans-serif;
}

/* ------------------------------------------------------------------
   3.1 PAGE FRAME (every page)
   Fixes: 60px gap under the header (written into the page), the 860px
   box that scrolls sideways on tablets, and text touching the screen
   edge on phones.
   ------------------------------------------------------------------ */
:root body :is(#aff_content,.content){width:900px;max-width:100%;box-sizing:border-box;border:0;
  margin:0 auto;padding:28px 20px 48px!important;background:#fff}
@media only screen and (max-width:40em){
  :root body :is(#aff_content,.content){width:100%!important;padding:16px 14px 36px!important}
}

/* buttons at the bottom of every form: main action red, Back quiet */
:root body :is(#aff_content,.content) .button input[type="submit"],
:root body :is(#aff_content,.content) .button input[type="button"]{
  -webkit-appearance:none;appearance:none;display:inline-block;box-sizing:border-box;max-width:100%;
  min-height:48px;margin:6px 4px;padding:12px 28px;border-radius:8px;cursor:pointer;
  font:700 17px/1.2 var(--cs-head);letter-spacing:.02em}
:root body :is(#aff_content,.content) .button input[type="submit"]{background:var(--cs-red);color:#fff;
  border:2px solid var(--cs-red);box-shadow:0 2px 8px rgba(var(--aff-act-rgb),.25)}
:root body :is(#aff_content,.content) .button input[type="submit"]:hover{background:var(--cs-red-dark);border-color:var(--cs-red-dark)}
:root body :is(#aff_content,.content) .button input[type="submit"]:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
:root body :is(#aff_content,.content) .button input[type="button"]{background:#fff;color:var(--cs-blue);border:2px solid var(--aff-line2)}
:root body :is(#aff_content,.content) .button input[type="button"]:hover{border-color:var(--cs-blue)}
:root body :is(#aff_content,.content) input:focus-visible,:root body :is(#aff_content,.content) select:focus-visible,
:root body :is(#aff_content,.content) a:focus-visible{outline:3px solid rgba(var(--aff-brand-rgb),.4);outline-offset:2px}


/* ------------------------------------------------------------------
   3.2 COURSE CHAPTER PAGES (show.php)
   ------------------------------------------------------------------ */

/* "Section" bar with the text-size buttons */
:root body #dock{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;
  box-sizing:border-box;width:auto;max-width:820px;height:auto;margin:0 auto 20px;padding:10px 16px;
  background:var(--cs-blue-tint);border:1px solid var(--cs-blue-line);border-radius:10px;
  text-align:left;overflow:visible}
:root body #dock .dock_content{float:none;width:auto;padding:0;
  font:600 15px/1.4 var(--cs-head);color:var(--cs-teal)}
/* the page's own "change the text size" words stay (any language); the A buttons get bigger */
:root body #dock .dock_content:last-child{display:flex;flex-wrap:wrap;align-items:center;gap:6px;
  font:400 14px/1.3 var(--cs-read);color:var(--cs-text)}
:root body #dock .dock_content a{display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;min-height:0;margin:0;line-height:1;border:1px solid var(--aff-line2);border-radius:8px;
  background:#fff;color:var(--cs-blue);text-decoration:none}
:root body #dock .dock_content a:hover{border-color:var(--cs-blue)}
:root body #dock .dock_content a span{font-family:var(--cs-head);font-weight:700}
:root body #dock .dock_content a:nth-of-type(1) span{font-size:13px!important}
:root body #dock .dock_content a:nth-of-type(2) span{font-size:17px!important}
:root body #dock .dock_content a:nth-of-type(3) span{font-size:21px!important}

/* the reading column */
:root body #course_content{box-sizing:border-box;max-width:820px;margin:0 auto;padding:36px 44px 28px;
  background:#fff;border:1px solid #e5e9f0;border-radius:12px;color:var(--cs-ink)}
:root body #course_content p,:root body #course_content li{font:400 17px/1.7 var(--cs-read);color:var(--cs-ink)}
:root body #course_content p{margin:0 0 18px;padding:0}
:root body #course_content a{color:var(--cs-blue)}
:root body #course_content p a{font-size:inherit}
:root body #course_content h1,:root body #course_content h2{padding:0;margin:8px 0 18px;
  font:700 28px/1.25 var(--cs-head);letter-spacing:-.01em;color:var(--cs-teal);text-align:left}
:root body #course_content h3{padding:0;margin:34px 0 12px;font:700 22px/1.3 var(--cs-head);color:var(--cs-blue)}
:root body #course_content h4{padding:0;margin:26px 0 10px;font:700 18px/1.35 var(--cs-head);color:var(--cs-ink)}
:root body #course_content ul,:root body #course_content ol{margin:0 0 18px;padding-left:26px}
:root body #course_content li{padding:3px 0}
:root body #course_content > div[align="center"]:first-child img{border-radius:10px}

/* pictures beside the text */
:root body #course_content .img_r,:root body #course_content .img_l{padding:0;max-width:45%}
:root body #course_content .img_r{float:right;margin:4px 0 14px 24px}
:root body #course_content .img_l{float:left;margin:4px 24px 14px 0}
:root body #course_content .img_r img,:root body #course_content .img_l img{max-width:100%;height:auto;border-radius:8px;margin:0}
:root body #course_content img{max-width:100%;height:auto;box-sizing:border-box}
:root body #course_content .caption{padding:6px 0 0;font:400 14px/1.45 var(--cs-read);color:var(--cs-mute)}

/* joke boxes: same colours, softer corners, no fixed 555px width */
:root body #course_content .joke_time{display:flex;align-items:flex-start;gap:14px;
  width:auto;margin:26px 0 30px;padding:0}
:root body #course_content .joke_time > .clear{display:none}
:root body #course_content .joke_guy{float:none;flex:0 0 auto;width:auto;padding:0}
:root body #course_content .joke_guy img{width:80px;height:auto;margin:0}
:root body #course_content .one_liners,:root body #course_content .insurance_claims,
:root body #course_content .real_jokes{float:none;flex:1 1 auto;min-width:0;width:auto;box-sizing:border-box;
  margin:0;padding:16px 20px;border-width:3px;border-radius:12px}
:root body #course_content .joke_title{margin:0 0 6px;font:700 17px/1.3 var(--cs-head)}
:root body #course_content .joke_text p{margin:0 0 8px;font-size:16px;line-height:1.6}
:root body #course_content .joke_text p:last-child{margin-bottom:0}

/* tables, videos and the old animations inside chapters */
:root body #course_content table{margin:10px 0 24px;max-width:100%}
:root body #course_content td{padding:12px;font-size:15px;line-height:1.5}
:root body #course_content video{max-width:100%;height:auto;border-radius:10px}
:root body #course_content .course_video{margin:28px 0}
:root body #swiffycontainer{max-width:100%!important}

/* California has no seat timer: hide the leftover "You can move on now!" line */
:root body #Timer{display:none!important}

/* Continue: a real button instead of a red box with a small link inside.
   display is left alone on purpose: the page script still decides when it shows. */
:root body div#Continue,:root body #Continue_disabled{box-sizing:border-box;width:auto;max-width:360px;
  margin:28px auto 12px;line-height:1.2;font-size:inherit}
:root body div#Continue{padding:0;background:none;border:0}
:root body #Continue br,:root body #Continue_disabled br{display:none}
:root body #Continue a{display:block;padding:16px 28px;border-radius:10px;background:var(--cs-red);
  color:#fff;font:700 19px/1.2 var(--cs-head);text-align:center;text-decoration:none;
  box-shadow:0 3px 10px rgba(var(--aff-act-rgb),.28)}
:root body #Continue a:hover{background:var(--cs-red-dark)}
:root body #Continue a::after{content:"\00a0\2192"}
:root body #Continue_disabled{padding:16px 28px;background:#eef0f3;border:0;border-radius:10px;
  color:#98a2b3;font:700 19px/1.2 var(--cs-head);text-align:center}

/* "Student Center | Log Off" under the chapter */
:root body #dock ~ div[align="center"]:last-of-type{margin:6px auto 0;font:600 15px/1.6 var(--cs-head);color:#98a2b3}
:root body #dock ~ div[align="center"]:last-of-type a{display:inline-block;padding:8px 10px;color:var(--cs-blue)}

@media only screen and (max-width:40em){
  :root body #dock{padding:8px 12px;margin-bottom:14px}
  :root body #dock .dock_content:first-child{flex:1 1 100%}
  :root body #course_content{padding:0 0 8px!important;border:0!important;border-radius:0}
  :root body #course_content h1,:root body #course_content h2{font-size:24px}
  :root body #course_content h3{font-size:20px;margin-top:28px}
  :root body #course_content h4{font-size:17px}
  :root body #course_content .img_r,:root body #course_content .img_l{float:none;max-width:100%;
    margin:10px auto 18px;text-align:center}
  :root body #course_content .joke_time{gap:10px}
  :root body #course_content .joke_guy img{width:52px}
  :root body #course_content .one_liners,:root body #course_content .insurance_claims,
  :root body #course_content .real_jokes{padding:12px 14px}
  :root body #course_content td{padding:8px}
  :root body #swiffycontainer{width:100%!important;height:auto!important;aspect-ratio:4 / 3}
  :root body div#Continue,:root body #Continue_disabled{max-width:none}
}


/* ------------------------------------------------------------------
   3.3 STUDENT CENTER (home.php)
   ------------------------------------------------------------------ */
:root body #menu_container{max-width:760px;margin:0 auto 18px;text-align:left}
:root body #menu_header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;
  margin:0;padding:18px 20px;background:var(--cs-blue-tint);border:1px solid var(--cs-blue-line);border-radius:12px}
:root body #menu_header > .clear{display:none}
:root body #welcome{float:none;font:400 16px/1.5 var(--cs-read);color:var(--cs-text)}
:root body #welcome > b{font:700 20px/1.3 var(--cs-head);color:var(--cs-teal)}
:root body #due{width:auto;margin-top:4px;font-size:15px}
:root body #due br{display:none}
:root body #menu_header ul{float:none;display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:0}
:root body #menu_header ul li{float:none;margin:0;padding:0;list-style:none!important;font:inherit}
:root body #menu_header ul li a{display:block;box-sizing:border-box;min-height:46px;padding:13px 18px;
  border:2px solid transparent;border-radius:8px;font:700 15px/1.2 var(--cs-head);text-align:center}
:root body #menu_header #link_continue a{background:var(--cs-green);color:#fff}
:root body #link_continue a:hover{background:#156b2e}
:root body #menu_header #link_edit a{background:#fff;color:var(--cs-blue);border-color:var(--aff-line2)}
:root body #menu_header #link_logout a{background:#fff;color:var(--cs-red);border-color:#ecc8c8}

/* progress bar */
:root body #progress_meter{width:100%;max-width:760px;height:auto;margin:0 auto 18px}
:root body #progress_meter td{padding:0!important;text-align:left}
:root body #prog_per{margin:0 0 6px;font:700 15px/1.3 var(--cs-head);color:var(--cs-teal)}
:root body #prog_per::before{content:"Course progress: "}
/* Spanish pages: switches on once the Spanish pages carry <html lang="es"> (Virgil) */
:root:lang(es) body #prog_per::before{content:"Progreso del curso: "}
:root body #prog_bar{height:14px!important;margin:0;padding:0;border:0;border-radius:999px;background:#e4e8ef;overflow:hidden}
/* the bar keeps its width from the page; the old gif is swapped for a solid colour */
:root body #prog_bar img{display:block;height:14px!important;max-width:100%;margin:0;border-radius:999px;
  background:var(--cs-green);object-position:-9999px 0}

/* chapter list */
:root body #menu_table{display:table;width:100%!important;max-width:760px;margin:0 auto;
  border-collapse:separate!important;border-spacing:0;border:1px solid var(--cs-blue-line);border-radius:12px;overflow:hidden}
:root body #menu_table .menu_header td{padding:12px 10px;background:var(--cs-teal);color:#fff;
  font:700 13px/1.2 var(--cs-head);letter-spacing:.06em;text-transform:uppercase}
:root body #menu_table .menu_header .br{border-right:1px solid rgba(255,255,255,.18)}
:root body #menu_table #menu_chapter{width:96px}
:root body #menu_table #menu_status{width:110px}
:root body #menu_table td.light,:root body #menu_table td.dark{padding:12px 10px;background:#fff;
  border:0;border-bottom:1px solid var(--cs-soft-line);font-size:15px!important;vertical-align:middle}
:root body #menu_table tr:nth-child(odd) td.light,:root body #menu_table tr:nth-child(odd) td.dark{background:var(--cs-zebra)}
:root body #menu_table tr:last-child td{border-bottom:0}
:root body #menu_table td.light b{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;
  border-radius:50%;background:var(--aff-tint2);color:var(--cs-blue);font:700 15px/1 var(--cs-head)}
:root body #menu_table td.light b:empty{display:none}
:root body #menu_table ul{margin:0;padding:0}
:root body #menu_table .sections{padding:0;font:600 16px/1.4 var(--cs-read);color:var(--cs-ink)}
:root body #menu_table .sections div{float:none!important;margin:0!important}
:root body #menu_table .sections a{color:var(--cs-blue)}
:root body #menu_table img{margin:0;vertical-align:middle}

/* "Final Test: 2 Attempts Remain" */
:root body .menu_footer{width:100%!important;max-width:760px;margin:14px auto 0;border:1px solid var(--cs-blue-line)!important;
  border-collapse:separate!important;border-radius:10px;background:var(--cs-blue-tint)}
:root body .menu_footer td{padding:12px 16px;border:0!important;font:700 15px/1.3 var(--cs-head)}
:root body .menu_footer td:first-child{text-align:left;color:var(--cs-teal)!important}
:root body .menu_footer td:last-child{text-align:right;color:var(--cs-red)!important}

@media only screen and (max-width:40em){
  :root body #menu_header{padding:16px}
  :root body #menu_header > div:not(#welcome){width:100%}
  :root body #menu_header ul{flex-direction:column}
  :root body #menu_table{display:table;overflow:hidden}
  :root body #menu_table #menu_chapter{width:22%!important}
  :root body #menu_table #menu_sections{width:56%!important}
  :root body #menu_table #menu_status{width:22%!important}
  :root body #menu_table .menu_header td{padding:10px 6px;font-size:11px}
  :root body #menu_table td.light,:root body #menu_table td.dark{padding:10px 6px}
  :root body #menu_table .sections{font-size:15px}
}


/* ------------------------------------------------------------------
   3.4 REGISTRATION PAGES (register.php, username, tracker, payment)
   ------------------------------------------------------------------ */

/* left column: title and the three steps */
:root body #registration_left_panel{counter-reset:csstep}
:root body #registration_left_panel h1,:root body #registration_left_panel h2{margin:0 0 8px;
  font:700 24px/1.2 var(--cs-head);letter-spacing:-.01em;color:var(--cs-teal)}
:root body #registration_left_panel p{margin:0 0 16px;padding:0;font:400 15px/1.5 var(--cs-read);color:var(--cs-mute)}
:root body #registration_left_panel .reg_bread,:root body #registration_left_panel #reg_bread{
  margin:0 0 8px;padding:0;border:1px solid var(--cs-line);border-radius:8px;background:#fff;color:#6b7280;
  font:700 13px/1.2 var(--cs-head);letter-spacing:.08em;text-transform:uppercase;text-align:left}
:root body #registration_left_panel .bread_container,:root body #registration_left_panel #bread_container{
  padding:12px 14px;border:0}
:root body #registration_left_panel .bread_container::before,
:root body #registration_left_panel #bread_container::before{counter-increment:csstep;content:counter(csstep) ". "}
/* the step the student is on */
:root body #registration_left_panel #reg_bread{background:var(--cs-blue);border-color:var(--cs-blue);color:#fff;
  box-shadow:0 2px 8px rgba(var(--aff-brand-rgb),.25)}

/* right column */
:root body #registration_panel > p{font:400 16px/1.5 var(--cs-read);color:var(--cs-text);margin:0 0 6px}
:root body #registration_container .registration_subdivision{box-sizing:border-box;width:auto;margin:0 0 20px;
  padding:18px 20px;background:#fff;border:1px solid var(--cs-line);border-radius:10px;box-shadow:0 1px 3px rgba(16,24,40,.05)}
:root body #registration_container .subdivision_title{margin:0 0 12px;font:700 14px/1.3 var(--cs-head);
  letter-spacing:.06em;text-transform:uppercase;color:var(--cs-teal)}
:root body #registration_container .frm_row,:root body #registration_container .row{
  margin:0;padding:12px 0;background:#fff;border:0;border-bottom:1px solid var(--cs-soft-line)}
:root body #registration_container .frm_row:last-child,:root body #registration_container .row:last-child{border-bottom:0}
:root body #registration_container label.form{padding:10px 12px 0 0;font:700 15px/1.3 var(--cs-read);color:var(--cs-text)}
:root body #registration_container .desc{font-size:13px;line-height:1.45;color:var(--cs-mute)}
:root body #registration_panel .note{display:inline-block;margin:4px 0 0;font:400 13px/1.45 var(--cs-read);
  font-style:normal;color:var(--cs-mute)}

/* text boxes and drop-downs */
:root body #registration_container .contact_field:not(.check),
:root body #registration_container .row form input[type="text"],
:root body #registration_container select{box-sizing:border-box;min-height:44px;max-width:100%;
  padding:9px 12px;border:1px solid #b9c2cf;border-radius:6px;background-color:#fff;
  font:400 16px/1.3 var(--cs-read);color:var(--cs-ink)}
:root body #registration_container .contact_field:not(.check){width:280px}
:root body #registration_container .contact_field:disabled{background:#f2f4f7!important;color:var(--cs-mute)}
:root body #registration_container .card-number{width:280px!important}
:root body #registration_container .card-cvc{width:96px!important}
:root body #registration_container .row form input[type="text"]{width:200px}
:root body #registration_container input[type="radio"],:root body #registration_container input[type="checkbox"]{
  width:20px;height:20px;vertical-align:middle;accent-color:var(--cs-blue)}
:root body #registration_container .contact_field:focus,:root body #registration_container select:focus{
  border-color:var(--cs-blue);outline:3px solid rgba(var(--aff-brand-rgb),.2);outline-offset:0}
/* small buttons inside a row (Apply coupon, Groupon) */
:root body #registration_container .row input[type="submit"]{-webkit-appearance:none;appearance:none;min-height:44px;
  margin:6px 0 0 6px;padding:9px 16px;border:2px solid var(--cs-blue);border-radius:6px;background:#fff;
  color:var(--cs-blue);font:700 14px/1.2 var(--cs-head);cursor:pointer}

/* course type choice on the first page */
:root body #registration_container .reg_row{padding:10px 12px;background:var(--cs-zebra);border:0;border-radius:8px}
:root body #registration_container ul.course_desc li{font-size:14px;line-height:1.5}

/* red error messages become one clear box */
:root body :is(#aff_content,.content) > div[align="center"][style*="color:red"],
:root body #registration_panel > div[style*="color:red"]{box-sizing:border-box;margin:0 0 20px;padding:14px 16px 14px 18px;
  background:#fdf0f0;border:1px solid #f1c4c4;border-left:5px solid var(--cs-red);border-radius:8px;
  text-align:left;color:#8a1515!important;font:700 15px/1.55 var(--cs-read)}
:root body #registration_panel > div[style*="color:red"] a{color:var(--cs-blue)}
:root body #registration_panel > p.error:empty{display:none}

/* payment page */
:root body #registration_container .price_row{box-sizing:border-box;width:auto;margin:0 0 20px!important;
  padding:16px 20px;background:var(--cs-blue-tint);border:1px solid var(--cs-blue-line);border-radius:10px;text-align:left}
:root body #registration_container label.price{float:none;display:block;text-align:left;
  font:600 15px/1.65 var(--cs-read);color:var(--cs-ink)}
:root body #registration_container .divider{margin:28px 0 8px;padding:0 0 8px;background:none;border:0;
  border-bottom:2px solid var(--cs-teal);text-align:left;font:700 14px/1.2 var(--cs-head);letter-spacing:.08em;color:var(--cs-teal)}
/* "Billing address must match credit card address": a note, not an alarm */
:root body #registration_container .divider + div[style*="color:red"]{margin:0 0 4px;text-align:left!important;
  font:400 14px/1.5 var(--cs-read);color:var(--cs-mute)!important}
:root body #payment-form > br{display:none}
:root body #registration_container .payment-errors:empty{display:none}

/* user name page: Yes / No answers become big buttons; the whole button is tappable */
:root body #registration_container form > table{width:100%;margin:12px 0 18px;border-collapse:collapse}
:root body #registration_container form > table td{position:relative;padding:10px 4px!important;border-bottom:1px solid var(--cs-soft-line);
  text-align:left;font:400 15px/1.4 var(--cs-read);color:var(--cs-ink)}
:root body #registration_container form > table td:not(:first-child){width:1%;white-space:nowrap}
:root body #registration_container input[type="radio"][id^="q"]{position:absolute;left:8px;top:50%;opacity:0;margin:0}
:root body #registration_container input[type="radio"][id^="q"] + label{float:none;display:inline-block;width:auto;min-width:64px;box-sizing:border-box;
  padding:9px 14px;border:2px solid var(--aff-line2);border-radius:999px;background:#fff;color:var(--cs-blue);
  text-align:center;font:700 15px/1.2 var(--cs-head);cursor:pointer}
:root body #registration_container input[type="radio"][id^="q"]:checked + label{background:var(--cs-blue);border-color:var(--cs-blue);color:#fff}
:root body #registration_container input[type="radio"][id^="q"]:focus-visible + label{outline:3px solid rgba(var(--aff-brand-rgb),.4);outline-offset:2px}

/* desktop and tablet: title column on the left, form beside it (no empty gap in the middle) */
@media only screen and (min-width:40.0625em){
  :root body #registration_left_panel{box-sizing:border-box;width:210px;margin:0;padding:0 22px 0 0;border-right:1px solid var(--cs-line)}
  :root body #registration_panel{float:right;box-sizing:border-box;width:calc(100% - 240px);max-width:620px;margin:0;padding:0}
  :root body #registration_container{width:auto;max-width:620px;margin:0}
}

/* phones */
@media only screen and (max-width:40em){
  :root body #registration_left_panel{padding:0 0 12px!important;margin:0 0 18px!important;border:0;border-bottom:1px solid var(--cs-line)}
  :root body #registration_left_panel h1,:root body #registration_left_panel h2{font-size:21px}
  :root body #registration_left_panel p{font-size:14px;margin-bottom:10px}
  :root body #registration_left_panel .reg_bread,:root body #registration_left_panel #reg_bread{margin:0;text-align:center;
    font-size:11px;letter-spacing:.03em}
  :root body #registration_left_panel .bread_container,:root body #registration_left_panel #bread_container{padding:10px 4px}
  :root body #registration_container .registration_subdivision{padding:14px}
  /* user name and payment rows stack like the first page: label on top, box full width */
  :root body #registration_container .row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;text-align:left}
  :root body #registration_container .row > label.form{flex:0 0 100%;float:none;width:auto;padding:0;text-align:left}
  :root body #registration_container .contact_field:not(.check),
  :root body #registration_container .card-number{width:100%!important}
  :root body #registration_container .card-cvc{width:110px!important}
  :root body #registration_container .row > form{flex:0 0 100%}
  :root body #registration_container .row form input[type="text"]{width:calc(100% - 96px)}
  :root body #registration_container .frm_row input.check{flex:0 0 auto!important;width:22px!important;min-height:0!important;height:22px}
  :root body #registration_container label.form{padding:0}
  :root body :is(#aff_content,.content) .button input[type="submit"],:root body :is(#aff_content,.content) .button input[type="button"]{padding:12px 22px}
}


/* ------------------------------------------------------------------
   3.5 TRACKER OFFER STEP (first payment.php screen)
   The whole card is tappable. The DMV filing text and prices are untouched.
   ------------------------------------------------------------------ */
:root body #shipping_header{margin:0 0 12px;padding:0 0 4px;background:#fff;border:0;text-align:left}
:root body #shipping_header h1{margin:0 0 6px;font:700 26px/1.2 var(--cs-head);color:var(--cs-teal)}
:root body #shipping_header p{margin:0 0 10px;padding:0;font:400 15px/1.55 var(--cs-read)!important;
  color:var(--cs-text);text-align:left!important}
:root body #shipping_header h1 + p{font:700 17px/1.4 var(--cs-head)!important;color:var(--cs-ink)}
:root body .postage_panel{margin:0 0 12px;padding:0;background:none}
:root body .postage_panel .option{position:relative;box-sizing:border-box;min-height:72px;margin:0;
  padding:16px 16px 16px 54px;background:#fff!important;border:2px solid var(--cs-line);border-radius:12px;
  font:700 17px/1.35 var(--cs-head);color:var(--cs-ink);cursor:pointer;transition:border-color .15s,box-shadow .15s}
:root body .postage_panel .option:hover{border-color:var(--aff-mid)}
:root body .postage_panel .option .envelope{float:left;margin:0 14px 6px 0}
:root body .postage_panel .option .envelope img{display:block;max-height:56px;width:auto}
:root body .postage_panel .option .price{float:right;position:static;margin:0 0 4px 12px;
  font:700 20px/1.2 var(--cs-head);color:var(--cs-red)}
:root body .postage_panel .option .note{display:block;margin:8px 0 0;font:400 14px/1.5 var(--cs-read);color:#475467}
/* the radio button covers the whole card, invisible; a drawn circle shows the choice */
:root body .postage_panel .option input[type="radio"]{position:absolute;inset:0;z-index:2;width:100%;height:100%;
  margin:0;opacity:0;cursor:pointer;float:none}
:root body .postage_panel .option::before{content:"";position:absolute;left:18px;top:20px;width:20px;height:20px;
  box-sizing:border-box;border:2px solid #98a2b3;border-radius:50%;background:#fff}
:root body .postage_panel .option:has(input:checked){border-color:var(--cs-blue);background:var(--cs-blue-tint)!important;
  box-shadow:0 0 0 3px rgba(var(--aff-brand-rgb),.15)}
:root body .postage_panel .option:has(input:checked)::before{border:6px solid var(--cs-blue)}
:root body .postage_panel .option:has(input:focus-visible){outline:3px solid rgba(var(--aff-brand-rgb),.4);outline-offset:2px}
/* older browsers that cannot show the selected card: keep the normal radio button */
@supports not selector(:has(*)){
  :root body .postage_panel .option input[type="radio"]{inset:auto;left:18px;top:20px;width:20px;height:20px;opacity:1}
  :root body .postage_panel .option::before{display:none}
}
:root body .postage_panel > .note{display:block;font-size:13px!important}
@media only screen and (max-width:40em){
  :root body #shipping_header h1{font-size:22px}
  :root body .postage_panel .option{padding:14px 14px 14px 48px;font-size:16px}
  :root body .postage_panel .option::before{left:14px;top:18px}
  :root body .postage_panel .option .envelope img{max-height:44px}
}


/* ------------------------------------------------------------------
   3.6 DMV LEGAL NOTICE (disclaimer.php)
   The DMV text is not changed. Proceed moves to the top and stays in view.
   - Computer with a mouse: the notice reads inside a scroll box, with
     Proceed pinned at the top of the box.
   - Phones and tablets: NO inner scroll box (a box inside a page traps
     the finger, which is why it was dropped on Oct 21). The notice reads
     normally and Proceed stays pinned at the top of the screen.
   ------------------------------------------------------------------ */
:root body #tvs_disclaimer{display:flex;flex-direction:column;box-sizing:border-box;max-width:760px;margin:0 auto;padding:0}
:root body #tvs_disclaimer > *{order:1}
:root body #tvs_disclaimer p,:root body #tvs_disclaimer li{font:400 15px/1.6 var(--cs-read);letter-spacing:0;color:var(--cs-text)}
:root body #tvs_disclaimer p{margin:0 0 14px;padding:0}
:root body #tvs_disclaimer > div[align="center"]:first-child p{margin:16px 0;font:700 17px/1.4 var(--cs-head);color:var(--cs-teal)}
:root body #tvs_disclaimer ul#disclaimer_list{margin:0 0 18px;padding-left:22px}
:root body #tvs_disclaimer ul#disclaimer_list li{margin:0;padding:0 0 8px}
:root body #tvs_disclaimer > #proceed_container{order:0;position:sticky;top:0;z-index:5;
  margin:0!important;padding:12px 0;background:#fff;border-bottom:1px solid var(--cs-line);text-align:center}
:root body #proceed_link{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
  min-height:52px;max-width:100%;padding:14px 32px;border-radius:8px;background:var(--cs-red);color:#fff;
  font:700 18px/1.2 var(--cs-head);text-decoration:none;box-shadow:0 3px 10px rgba(var(--aff-act-rgb),.28)}
:root body #proceed_link:hover{background:var(--cs-red-dark)}
:root body #proceed_link::after{content:"Proceed to Payment\00a0\2192"}
/* Spanish pages: needs <html lang="es"> on the Spanish pages (Virgil); until then the English label shows */
:root:lang(es) body #proceed_link::after{content:"Continuar al pago\00a0\2192"}
:root body #proceed_img{display:none}
@media only screen and (min-width:48em) and (hover:hover) and (pointer:fine){
  :root body #tvs_disclaimer{max-height:min(64vh,600px);overflow-y:auto;padding:0 26px 10px!important;
    border:1px solid #cfd6e2;border-radius:10px}
  :root body #tvs_disclaimer > #proceed_container{margin:0 -26px 6px!important;padding:14px 26px}
}
@media only screen and (max-width:40em){
  :root body #tvs_disclaimer > #proceed_container{padding:10px 0}
  :root body #proceed_link{display:flex;width:100%}
}


/* ------------------------------------------------------------------
   3.7 QUIZZES, FINAL EXAM STEPS AND RESULTS
   Chapter quiz (show.php "Think Safety!"), security check before the
   exam (start-test.php), the sworn statement, the final exam
   (finaltest.php) and the results page. No question, answer or scoring
   changes: every answer row becomes one big tappable box.
   ------------------------------------------------------------------ */
:root body .mainbox,:root body #the_finaltest,:root body #finaltest_review_container,
:root body #achtung,:root body #acknowledgement,:root body form[action="start-test.php"],
:root body .final,:root body .final + div[align="left"]{box-sizing:border-box;max-width:760px;margin-left:auto;margin-right:auto}
:root body .mainbox h3{margin:26px 0 8px;font:700 20px/1.3 var(--cs-head);color:var(--cs-teal)}
:root body .mainbox p{font:400 16px/1.6 var(--cs-read);color:var(--cs-text);margin:0 0 14px}
:root body .mainbox .question,:root body #the_finaltest .question,:root body .final + div[align="left"] .question{
  margin:26px 0 10px;font:700 17px/1.45 var(--cs-head);color:var(--cs-ink)}

/* answer boxes: the radio button covers the whole box (invisible); a drawn circle shows the pick */
:root body .mainbox .answer,:root body #the_finaltest .answer{position:relative;box-sizing:border-box;margin:0 0 8px;
  padding:12px 14px 12px 46px;background:#fff;border:2px solid var(--cs-line);border-radius:10px;
  font:400 16px/1.45 var(--cs-read);color:var(--cs-ink);cursor:pointer}
:root body .mainbox .answer:hover,:root body #the_finaltest .answer:hover{border-color:var(--aff-mid)}
:root body .mainbox .answer input[type="radio"],:root body #the_finaltest .answer input[type="radio"]{
  position:absolute;inset:0;z-index:2;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
:root body .mainbox .answer::before,:root body #the_finaltest .answer::before{content:"";position:absolute;left:14px;top:13px;
  width:20px;height:20px;box-sizing:border-box;border:2px solid #98a2b3;border-radius:50%;background:#fff}
:root body .mainbox .answer:has(input:checked),:root body #the_finaltest .answer:has(input:checked){
  border-color:var(--cs-blue);background:var(--cs-blue-tint);box-shadow:0 0 0 3px rgba(var(--aff-brand-rgb),.12)}
:root body .mainbox .answer:has(input:checked)::before,:root body #the_finaltest .answer:has(input:checked)::before{border:6px solid var(--cs-blue)}
:root body .mainbox .answer:has(input:focus-visible),:root body #the_finaltest .answer:has(input:focus-visible){outline:3px solid rgba(var(--aff-brand-rgb),.4);outline-offset:2px}
:root body #the_finaltest .answer label{cursor:pointer}
@supports not selector(:has(*)){
  :root body .mainbox .answer input[type="radio"],:root body #the_finaltest .answer input[type="radio"]{
    inset:auto;left:14px;top:13px;width:20px;height:20px;opacity:1}
  :root body .mainbox .answer::before,:root body #the_finaltest .answer::before{display:none}
}

/* Yes / No identity questions (quiz page and the check before the exam) become big buttons */
:root body .mainbox .question input[type="radio"],
:root body form[action="start-test.php"] input[type="radio"]{position:absolute;opacity:0;width:1px;height:1px;margin:0}
:root body .mainbox .question input[type="radio"] + label,
:root body form[action="start-test.php"] input[type="radio"] + label{display:inline-block;box-sizing:border-box;min-width:64px;
  margin:4px 0 0 8px;padding:9px 14px;border:2px solid var(--aff-line2);border-radius:999px;background:#fff;color:var(--cs-blue);
  text-align:center;font:700 15px/1.2 var(--cs-head);cursor:pointer;vertical-align:middle}
:root body .mainbox .question input[type="radio"]:checked + label,
:root body form[action="start-test.php"] input[type="radio"]:checked + label{background:var(--cs-blue);border-color:var(--cs-blue);color:#fff}
:root body .mainbox .question input[type="radio"]:focus-visible + label,
:root body form[action="start-test.php"] input[type="radio"]:focus-visible + label{outline:3px solid rgba(var(--aff-brand-rgb),.4);outline-offset:2px}

/* security check before the exam */
:root body form[action="start-test.php"]{text-align:left;font:600 17px/1.5 var(--cs-head);color:var(--cs-teal)}
:root body form[action="start-test.php"] table{width:100%;margin:14px 0 18px;border-collapse:collapse;font-size:15px!important}
:root body form[action="start-test.php"] td{padding:10px 4px!important;border-bottom:1px solid var(--cs-soft-line);text-align:left;
  font:400 15px/1.4 var(--cs-read);color:var(--cs-ink)}
:root body form[action="start-test.php"] td:not(:first-child){width:1%;white-space:nowrap}

/* all the main buttons on these pages: red, big */
:root body .mainbox input[type="submit"],:root body form[action="start-test.php"] input[type="submit"],
:root body #ack_result input[type="submit"],:root body #submit_container input[type="submit"]{
  -webkit-appearance:none;appearance:none;box-sizing:border-box;max-width:100%;min-height:52px;margin:20px 0!important;
  padding:14px 34px!important;border:0;border-radius:10px;background:var(--cs-red);color:#fff;cursor:pointer;
  font:700 18px/1.2 var(--cs-head)!important;box-shadow:0 3px 10px rgba(var(--aff-act-rgb),.25)}
:root body .mainbox input[type="submit"]:hover,:root body form[action="start-test.php"] input[type="submit"]:hover,
:root body #ack_result input[type="submit"]:hover,:root body #submit_container input[type="submit"]:hover{background:var(--cs-red-dark)}
:root body #ack_result input[type="submit"]:disabled{background:#d0d5dd;color:#667085;box-shadow:none;cursor:not-allowed}

/* "Please Note" and the sworn statement */
:root body :is(#aff_content,.content) > div[align="center"] > p:first-child{font:600 17px/1.5 var(--cs-head);color:var(--cs-teal)}
:root body #achtung,:root body #acknowledgement{margin-bottom:16px;padding:20px 24px!important;border-radius:12px;text-align:left}
:root body #achtung{background:#fff8e6;border:1px solid #f3d58a}
:root body #acknowledgement{background:#fff;border:1px solid var(--cs-line)}
:root body #achtung h2,:root body #acknowledgement h2{margin:0 0 10px;font:700 20px/1.3 var(--cs-head);color:var(--cs-teal)}
:root body #achtung p,:root body #acknowledgement p{margin:0 0 12px;font:400 16px/1.6 var(--cs-read);color:var(--cs-text)}
/* "I ... understand and agree": the whole box ticks the checkbox */
:root body #ack_check{position:relative;box-sizing:border-box;margin:6px 0 0;padding:14px 16px 14px 50px;text-align:left;
  background:var(--cs-blue-tint);border:2px solid var(--cs-blue-line);border-radius:10px;font:600 16px/1.45 var(--cs-read);color:var(--cs-ink);cursor:pointer}
:root body #ack_check input[type="checkbox"]{position:absolute;inset:0;z-index:2;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
:root body #ack_check::before{content:"";position:absolute;left:16px;top:50%;width:22px;height:22px;margin-top:-11px;box-sizing:border-box;
  border:2px solid #98a2b3;border-radius:5px;background:#fff}
:root body #ack_check:has(input:checked){border-color:var(--cs-blue)}
:root body #ack_check:has(input:checked)::before{content:"\2713";border-color:var(--cs-blue);background:var(--cs-blue);color:#fff;
  font:700 15px/18px var(--cs-head);text-align:center}
@supports not selector(:has(*)){
  :root body #ack_check input[type="checkbox"]{inset:auto;left:16px;top:50%;width:22px;height:22px;margin-top:-11px;opacity:1}
  :root body #ack_check::before{display:none}
}

/* final exam: chapter review links become a tidy grid */
:root body #finaltest_review_container{margin-bottom:24px}
:root body #finaltest_review_container > p{margin:0 0 12px;font:400 15px/1.55 var(--cs-read)}
:root body #finaltest_review_container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
:root body #finaltest_review_container > p,:root body #finaltest_review_container > .clear{grid-column:1 / -1}
:root body #finaltest_review_container > .clear{display:none}
:root body #finaltest_review_container > a{text-decoration:none}
:root body .finaltest_review{float:none;box-sizing:border-box;width:auto;height:100%;padding:10px 12px;border:1px solid var(--cs-blue-line);
  border-radius:8px;background:var(--cs-blue-tint);color:var(--cs-blue);font:600 14px/1.35 var(--cs-read)}
:root body .finaltest_review:hover{background:var(--aff-tint2)}
:root body #the_finaltest > div[align="center"]{margin:0 0 8px;font:400 16px/1.6 var(--cs-read);color:var(--cs-text)}
:root body #final_note{box-sizing:border-box;width:auto;max-width:100%;margin:14px 0 0;padding:12px 16px;text-align:left;
  background:#fdf0f0;border-left:5px solid var(--cs-red);border-radius:8px;color:#8a1515;font:700 15px/1.5 var(--cs-read)}
:root body #the_finaltest > div[style*="margin-left:20px"]{margin-left:0!important}
:root body #the_finaltest > br{display:none}

/* results page after the exam */
:root body .final p{padding:0 0 10px!important;font:400 16px/1.55 var(--cs-read)}
:root body .final > p:first-child{font:700 22px/1.3 var(--cs-head);color:var(--cs-red)}
:root body .final + div[align="left"] .answer{margin:0 0 6px;padding:8px 12px;border-radius:8px;background:var(--cs-zebra);
  font:400 15px/1.5 var(--cs-read)}
:root body .final + div[align="left"] .explanation{margin:8px 0 22px;padding:12px 14px;border-left:4px solid var(--cs-teal);
  background:var(--cs-blue-tint);border-radius:0 8px 8px 0;font:400 15px/1.55 var(--cs-read)}
:root body .final + div[align="left"] .example{font-weight:700}
:root body .final + div[align="left"] + div{max-width:760px;margin:20px auto 0;padding:16px!important;border-radius:10px;box-sizing:border-box}
:root body .final + div[align="left"] + div a{display:block;padding:12px;color:#fff;text-decoration:none;font:700 16px/1.2 var(--cs-head)}
:root body .final + div[align="left"] + div div{max-width:100%!important;border:0!important;border-radius:8px}

@media only screen and (max-width:40em){
  :root body #finaltest_review_container{grid-template-columns:1fr}
  :root body #the_finaltest > div[align="center"] br{display:none}
  :root body #achtung,:root body #acknowledgement{padding:16px!important}
  :root body .mainbox input[type="submit"],:root body form[action="start-test.php"] input[type="submit"],
  :root body #ack_result input[type="submit"],:root body #submit_container input[type="submit"]{width:100%}
}


/* ------------------------------------------------------------------
   3.8 STUDENT LOGIN (login.php)
   The page's own style block draws a 350x250 picture behind the box.
   ------------------------------------------------------------------ */
:root body #login_container{margin:20px auto 0!important}
:root body #login_container > form > br{display:none}
:root body #login_panel{box-sizing:border-box;width:100%!important;max-width:400px;height:auto!important;margin:0 auto;
  padding:28px 28px 20px!important;background:#fff!important;border:1px solid var(--cs-line);border-radius:12px;
  box-shadow:0 4px 18px rgba(16,24,40,.08);text-align:left}
:root:not(:lang(es)) body #login_panel::before{content:"Student Login";display:block;margin:0 0 16px;font:700 22px/1.2 var(--cs-head);color:var(--cs-teal)}
:root body #login_panel .label{padding:0 0 6px!important;font:700 15px/1.3 var(--cs-read)!important;color:var(--cs-text);text-align:left!important}
:root body #login_panel .login_form{box-sizing:border-box;width:100%!important;max-width:none!important;min-height:48px;margin:0 0 16px!important;
  padding:10px 12px!important;border:1px solid #b9c2cf!important;border-radius:6px;font:400 17px/1.3 var(--cs-read)!important}
:root body #login_panel .login_form:focus{border-color:var(--cs-blue)!important;outline:3px solid rgba(var(--aff-brand-rgb),.2)}
:root body #login_panel > div[align="right"]{padding:4px 0 0!important;text-align:center}
:root body #login_panel input[type="submit"]{-webkit-appearance:none;appearance:none;width:100%!important;min-height:50px;height:auto!important;
  padding:12px!important;border:0;border-radius:8px;background:var(--cs-red);color:#fff;cursor:pointer;font:700 18px/1.2 var(--cs-head)}
:root body #login_panel input[type="submit"]:hover{background:var(--cs-red-dark)}

/* footer columns: global.css centres every box (margin:0 auto), which pushed the columns off line */



/* ------------------------------------------------------------------
   3.9 QUIZ RESULTS, EDIT PROFILE, "NOT QUITE DONE YET"
   ------------------------------------------------------------------ */
/* quiz result: the 3-column table becomes one card per question */
:root body .mainbox > table[border]{width:100%;max-width:760px;margin:16px auto 20px;border:0;border-collapse:separate;border-spacing:0 10px}
:root body .mainbox > table[border] td{padding:10px 12px;border:1px solid var(--cs-line);background:#fff;vertical-align:top;
  text-align:left;font:400 15px/1.55 var(--cs-read);color:var(--cs-ink)}
:root body .mainbox > table[border] tr:first-child td{border:0;background:none;padding:0 12px;
  font:700 12px/1.2 var(--cs-head);letter-spacing:.06em;text-transform:uppercase;color:var(--cs-mute)}
:root body .mainbox > table[border] td:first-child{font-weight:700;border-radius:8px 0 0 8px}
:root body .mainbox > table[border] td:last-child{border-radius:0 8px 8px 0;background:var(--cs-blue-tint)}
:root body .mainbox > span[style*="bold"]{display:block;max-width:760px;margin:0 auto;padding:14px 16px;border-radius:10px;
  background:#ecf8f0;border-left:5px solid var(--cs-green);text-align:left;font:700 16px/1.5 var(--cs-read);color:#14532d}
/* the quiz-result Continue is a link with its own red box */
:root body a#Continue{display:block!important;box-sizing:border-box;width:auto!important;max-width:360px;margin:24px auto 12px;
  padding:16px 28px;border:0;border-radius:10px;background:var(--cs-red);color:#fff;text-align:center;text-decoration:none;
  font:700 19px/1.2 var(--cs-head);box-shadow:0 3px 10px rgba(var(--aff-act-rgb),.28)}
:root body a#Continue:hover{background:var(--cs-red-dark)}
:root body a#Continue::after{content:"\00a0\2192"}
:root body .mainbox > br{display:none}

/* Edit Profile */
:root body #change_reg{box-sizing:border-box;width:auto;max-width:640px;margin:0 auto;padding:0}
:root body #change_reg > form > table{width:100%;max-width:640px;border-collapse:collapse;background:#fff;border:1px solid var(--cs-line);border-radius:12px}
:root body #change_reg > form > table > tbody > tr > td{padding:10px 14px;border-bottom:1px solid var(--cs-soft-line);
  text-align:left;vertical-align:middle;font:400 15px/1.4 var(--cs-read);color:var(--cs-text)}
:root body #change_reg strong{font-weight:700;color:var(--cs-ink)}
:root body #change_reg input[type="text"],:root body #change_reg select{box-sizing:border-box;min-height:44px;max-width:100%;
  padding:8px 10px;border:1px solid #b9c2cf;border-radius:6px;font:400 16px/1.3 var(--cs-read)}
:root body #change_reg input[type="text"]{width:100%}
:root body #change_reg td table td{padding:0 6px 0 0;border:0}
:root body #change_reg input[type="submit"],:root body #change_reg input[type="button"]{-webkit-appearance:none;appearance:none;
  min-height:48px;margin:6px 6px 0 0;padding:12px 26px;border-radius:8px;cursor:pointer;font:700 16px/1.2 var(--cs-head)}
:root body #change_reg input[type="submit"]{background:var(--cs-red);border:2px solid var(--cs-red);color:#fff}
:root body #change_reg input[type="button"]{background:#fff;border:2px solid var(--aff-line2);color:var(--cs-blue)}

/* "You're not quite done yet!" (unpaid student): fixed 741px table */
:root body :is(#aff_content,.content) > div[align="center"] > table#table1{width:100%!important;max-width:640px;margin:0 auto;padding:22px;
  box-sizing:border-box;border:1px solid var(--cs-line);border-radius:12px;background:#fff;text-align:left}
:root body table#table1 td{font:400 16px/1.6 var(--cs-read)!important;color:var(--cs-text)}
:root body table#table1 font{font-family:inherit!important}
:root body table#table1 a{color:var(--cs-red)!important;text-decoration:underline;text-underline-offset:3px;font:700 19px/1.5 var(--cs-head)}
:root body table#table1 a img{display:inline-block;height:22px;width:auto;margin:6px 4px 0 0;vertical-align:middle;background:#fff;border-radius:3px}

@media only screen and (max-width:40em){
  :root body .mainbox > table[border],:root body .mainbox > table[border] tbody,:root body .mainbox > table[border] tr,
  :root body .mainbox > table[border] td{display:block;width:auto!important}
  :root body .mainbox > table[border] tr:first-child{display:none}
  :root body .mainbox > table[border] tr{margin:0 0 12px;border:1px solid var(--cs-line);border-radius:10px;overflow:hidden}
  :root body .mainbox > table[border] td{border:0;border-radius:0!important}
  /* the student's answer: bold with a blue edge (no inserted words, so it works in Spanish too) */
  :root body .mainbox > table[border] td:nth-child(2){font-weight:700;color:var(--cs-ink);border-left:4px solid var(--cs-blue)!important}
  /* Edit Profile: label above field */
  :root body #change_reg > form > table,:root body #change_reg > form > table > tbody,
  :root body #change_reg > form > table > tbody > tr,:root body #change_reg > form > table > tbody > tr > td{display:block;width:auto!important}
  :root body #change_reg > form > table > tbody > tr > td{border:0;padding:4px 14px}
  :root body #change_reg > form > table > tbody > tr{padding:8px 0;border-bottom:1px solid var(--cs-soft-line)}
  :root body #change_reg > form > table > tbody > tr > td:empty{display:none}
  :root body #change_reg input[type="submit"],:root body #change_reg input[type="button"]{width:100%}
}


/* ======================================================================
   BUILD F (2026-11-20): fixes from Luis's review of the installed sheet
   1 security questions: a real table on every screen, at login and
     before the exam (any form holding security[] answers)
   2 "Remind me of my answers": a button
   3 footer: compact
   4 chapter text: Source Sans 3, darker and larger, so it reads crisp
   5 text-size control: one line
   6 Edit Profile: tighter
   ====================================================================== */

/* 1 security questions */
:root body form:has(input[name^="security["]){box-sizing:border-box;max-width:680px;margin:0 auto;padding:22px 24px;
  background:#fff;border:1px solid var(--cs-line);border-radius:12px;text-align:left;
  font:600 17px/1.45 var(--cs-head)!important;color:var(--cs-teal)}
:root body form:has(input[name^="security["]) table{width:100%;margin:16px 0 18px;border-collapse:separate;border-spacing:0;
  border:1px solid var(--cs-line);border-radius:10px;overflow:hidden;font-size:16px!important}
:root body form:has(input[name^="security["]) td{padding:10px 14px!important;border:0;border-bottom:1px solid var(--cs-soft-line);
  text-align:left!important;vertical-align:middle;font:400 16px/1.35 var(--cs-read)!important;color:var(--cs-ink)}
:root body form:has(input[name^="security["]) tr:last-child td{border-bottom:0}
:root body form:has(input[name^="security["]) tr:nth-child(even) td{background:var(--cs-zebra)}
:root body form:has(input[name^="security["]) td:not(:first-child){width:1%;padding-left:4px!important;white-space:nowrap;text-align:center!important}
:root body form:has(input[name^="security["]) input[type="radio"]{position:absolute;opacity:0;width:1px;height:1px;margin:0}
:root body form:has(input[name^="security["]) input[type="radio"] + label{display:inline-block;box-sizing:border-box;min-width:64px;
  margin:0;padding:8px 14px;border:2px solid var(--aff-line2);border-radius:999px;background:#fff;color:var(--cs-blue);
  text-align:center;font:700 15px/1.2 var(--cs-head);cursor:pointer}
:root body form:has(input[name^="security["]) input[type="radio"]:checked + label{background:var(--cs-blue);border-color:var(--cs-blue);color:#fff}
:root body form:has(input[name^="security["]) input[type="radio"]:focus-visible + label{outline:3px solid rgba(var(--aff-brand-rgb),.4);outline-offset:2px}
:root body form:has(input[name^="security["]) input[type="submit"]{-webkit-appearance:none;appearance:none;box-sizing:border-box;
  min-height:50px;margin:0 10px 0 0!important;padding:13px 34px!important;border:0;border-radius:10px;background:var(--cs-red);
  color:#fff;cursor:pointer;vertical-align:middle;font:700 18px/1.2 var(--cs-head)!important;box-shadow:0 3px 10px rgba(var(--aff-act-rgb),.25)}
:root body form:has(input[name^="security["]) input[type="submit"]:hover{background:var(--cs-red-dark)}

/* 2 "Remind me of my answers" (opens the page's own pop-up) */
:root body a:is([onclick*="reminder.php"],[href*="reminder.php"]){display:inline-flex;align-items:center;justify-content:center;
  box-sizing:border-box;min-height:50px;margin:10px 0;padding:12px 22px;border:2px solid var(--aff-line2);border-radius:10px;
  background:#fff;color:var(--cs-blue)!important;text-decoration:none;vertical-align:middle;font:700 16px/1.2 var(--cs-head)}
:root body a:is([onclick*="reminder.php"],[href*="reminder.php"]) span{font-size:inherit!important}
:root body a:is([onclick*="reminder.php"],[href*="reminder.php"]):hover{border-color:var(--cs-blue);background:var(--cs-blue-tint)}

/* 3 footer: compact */
.cs-chrome.cs-foot{padding:22px 0 16px;font-size:14px;line-height:1.45}
.cs-chrome .cs-foot-grid{gap:14px}
.cs-chrome .cs-foot-grid b{margin:0 0 3px;font-size:12px}
.cs-chrome.cs-foot a{padding:5px 0 1px}
.cs-chrome .cs-foot-counties{margin-top:14px;padding-top:10px;font-size:12px;line-height:1.45}
.cs-chrome .cs-copy{margin-top:4px;font-size:12px}
@media (min-width:600px){
  .cs-chrome.cs-foot{padding:24px 0 18px}
  .cs-chrome .cs-foot-grid{gap:16px 28px}
  .cs-chrome.cs-foot a{padding:0}
}

/* 4 chapter text: crisp and readable */
:root body #course_content p,:root body #course_content li{font:400 18px/1.65 var(--cs-read);color:#1b2430;
  text-rendering:optimizeLegibility;-webkit-font-smoothing:auto}
:root body #course_content .joke_text p{font-size:17px}
:root body #course_content td{font-family:var(--cs-read);font-size:16px;color:#1b2430}
:root body #course_content strong,:root body #course_content b{font-weight:700;color:#10171f}

/* 5 text-size control: one line. Phones show only the three A buttons;
   bigger screens keep the page's own words in front of them. */
:root body #dock{flex-wrap:nowrap}
:root body #dock .dock_content:first-child{flex:1 1 auto;min-width:0}
:root body #dock .dock_content:last-child{flex:0 0 auto;flex-wrap:nowrap;white-space:nowrap}
@media only screen and (max-width:599px){
  :root body #dock{padding:8px 10px 8px 14px;gap:10px}
  :root body #dock .dock_content:first-child{font-size:14px}
  :root body #dock .dock_content:last-child{font-size:0;gap:4px}
  :root body #dock .dock_content a{width:36px;height:36px}
}

/* 6 Edit Profile: tighter */
:root body #change_reg > form > table > tbody > tr > td{padding:7px 14px}
:root body #change_reg > form > table > tbody > tr:first-child br{display:none}
:root body #change_reg input[type="text"],:root body #change_reg select{min-height:40px;padding:6px 10px}
@media only screen and (max-width:40em){
  :root body #change_reg > form > table > tbody > tr{padding:6px 0}
  :root body #change_reg > form > table > tbody > tr > td{padding:2px 14px}
  :root body #change_reg > form > table > tbody > tr > td:first-child{padding-bottom:4px}
  :root body #change_reg > form > table > tbody > tr > td:nth-child(3):not(:has(*)),
  :root body #change_reg > form > table > tbody > tr:first-child > td[colspan]:not(:has(*)){display:none}
  :root body #change_reg > form > table > tbody > tr > td:nth-child(3):has(input){padding-top:6px}
}
@media only screen and (max-width:40em){
  :root body form:has(input[name^="security["]){padding:16px 14px}
  :root body form:has(input[name^="security["]) td{padding:9px 10px!important;font-size:15px!important}
  :root body form:has(input[name^="security["]) input[type="radio"] + label{min-width:52px;padding:7px 10px}
  :root body form:has(input[name^="security["]) input[type="submit"],
  :root body a:is([onclick*="reminder.php"],[href*="reminder.php"]){display:flex;width:100%;margin:0 0 10px!important}
}

/* 7 chapter review links (final exam, and the retake after a fail):
   one even list, every box full width and left aligned, wherever the page puts them */
:root body a:has(> .finaltest_review){display:block;box-sizing:border-box;width:100%;max-width:760px;margin:0 auto 8px;text-decoration:none}
:root body #finaltest_review_container > a:has(> .finaltest_review){margin:0}
:root body .finaltest_review{display:flex;align-items:center;width:100%;min-height:48px;text-align:left!important;
  font:600 15px/1.35 var(--cs-read)}
:root body p:has(+ a > .finaltest_review){box-sizing:border-box;max-width:760px;margin:0 auto 14px;text-align:left}

/* 8 "All court fines must be paid..." on the final exam: a warning box that stops the eye.
   Matches the page's own red notice wherever it sits; the sign is a symbol, so no words are added. */
:root body #the_finaltest strong[style*="red"]:first-child,
:root body form[name="finaltest"] strong[style*="red"]:first-child{position:relative;display:block;box-sizing:border-box;
  margin:6px 0 18px;padding:16px 18px 16px 64px;background:#fff6e0;border:2px solid #e0a100;border-left-width:8px;
  border-radius:12px;box-shadow:0 4px 14px rgba(224,161,0,.22);text-align:left;color:#7a1010!important;
  font:700 17px/1.5 var(--cs-read)}
:root body #the_finaltest strong[style*="red"]:first-child em,
:root body form[name="finaltest"] strong[style*="red"]:first-child em{font-style:normal}
:root body #the_finaltest strong[style*="red"]:first-child::before,
:root body form[name="finaltest"] strong[style*="red"]:first-child::before{content:"\26A0";position:absolute;left:16px;top:50%;
  transform:translateY(-50%);font:400 34px/1 "Segoe UI Symbol","Apple Color Emoji",sans-serif;color:#c27c00}
:root body #the_finaltest strong[style*="red"]:first-child + br,
:root body #the_finaltest strong[style*="red"]:first-child + br + br{display:none}
:root body #the_finaltest > div[align="center"]{text-align:left}
@media only screen and (max-width:40em){
  :root body #the_finaltest strong[style*="red"]:first-child,
  :root body form[name="finaltest"] strong[style*="red"]:first-child{padding:14px 14px 14px 54px;font-size:16px}
  :root body #the_finaltest strong[style*="red"]:first-child::before,
  :root body form[name="finaltest"] strong[style*="red"]:first-child::before{left:12px;font-size:30px}
}

/* 9 explanation boxes on the results page: soft green, easy on the eye */
:root body .final + div[align="left"] .explanation,:root body .explanation{background:#ecf7ef!important;
  border-left:5px solid #1a7f37!important;border-radius:0 10px 10px 0;color:#16351f!important;
  font:400 16px/1.6 var(--cs-read)}
:root body .final + div[align="left"] .explanation strong,:root body .explanation strong,
:root body .explanation b{color:#11612a!important}


/* ======================================================================
   BUILD G (2026-11-20): court-balance warning (Jennifer, 11/19)
   Students are passing the exam before paying their court balance, and the
   court then won't process the completion. The same warning box now sits on
   BOTH screens before the exam, in English and Spanish:
   - the pre-exam page ("Please Note" + sworn statement), above Please Note
   - the final exam page, at the top (replaces the old red ** line on English;
     Spanish had no warning at all)
   Language is read from the page's own button ("Take The Test!" / "Tomar la
   Prueba!", "Submit Answers" / "Presentar Respuestas"), so it works even
   though the Spanish pages are marked lang="en".
   The words live here until Virgil puts them in the page code.
   ====================================================================== */
:root body p:has(+ #achtung)::after,
:root body #the_finaltest strong[style*="red"]:first-child::after,
:root body #the_finaltest:has(input[value="Presentar Respuestas"]) > div[align="center"]:first-of-type::before{
  display:block;box-sizing:border-box;margin:16px 0 18px;padding:16px 18px 16px 66px;white-space:pre-line;text-align:left;
  background:#fff6e0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23d97706' d='M12 1.5 0.8 21.5h22.4z'/%3E%3Cpath fill='%23fff' d='M11 8.5h2v7h-2zm0 8.8h2v2.2h-2z'/%3E%3C/svg%3E") no-repeat 16px 16px / 36px 36px;
  border:2px solid #e0a100;border-left-width:8px;border-radius:12px;box-shadow:0 4px 14px rgba(224,161,0,.22);
  color:#7a1010;font:700 16px/1.5 var(--cs-read);letter-spacing:0;text-transform:none}
/* English words */
:root body:has(#ack_result input[value*="Take The Test"]) p:has(+ #achtung)::after,
:root body #the_finaltest strong[style*="red"]:first-child::after{
  content:"PAY YOUR COURT BALANCE FIRST\A Pay your court balance in full before you take the final exam. If you pass the exam while you still owe the court, the court may not process your completion."}
/* Spanish words */
:root body:has(#ack_result input[value*="Tomar"]) p:has(+ #achtung)::after,
:root body #the_finaltest:has(input[value="Presentar Respuestas"]) > div[align="center"]:first-of-type::before{
  content:"PAGUE PRIMERO SU SALDO DEL TRIBUNAL\A Pague el saldo completo del tribunal antes de tomar el examen final. Si aprueba el examen mientras a\00fan le debe al tribunal, es posible que el tribunal no procese su finalizaci\00f3n."}
/* the pre-exam box only shows when the page says which language it is */
:root body:not(:has(#ack_result input[value*="Take The Test"], #ack_result input[value*="Tomar"])) p:has(+ #achtung)::after{content:none}
/* exam page (English): the old "**All court fines...**" line is replaced by the box above
   (screen readers still read the page's own words) */
:root body #the_finaltest strong[style*="red"]:first-child,
:root body form[name="finaltest"] strong[style*="red"]:first-child{position:static;display:block;margin:0;padding:0;
  background:none;border:0;box-shadow:none;font-size:0!important;line-height:0}
:root body #the_finaltest strong[style*="red"]:first-child em{font-size:0}
:root body #the_finaltest strong[style*="red"]:first-child::before,
:root body form[name="finaltest"] strong[style*="red"]:first-child::before{content:none}
:root body #the_finaltest strong[style*="red"]:first-child::after{margin-top:0}
:root body p:has(+ #achtung){text-align:left}
@media only screen and (max-width:40em){
  :root body p:has(+ #achtung)::after,
  :root body #the_finaltest strong[style*="red"]:first-child::after,
  :root body #the_finaltest:has(input[value="Presentar Respuestas"]) > div[align="center"]:first-of-type::before{
    padding:14px 14px 14px 56px;background-position:12px 14px;background-size:32px 32px;font-size:15px}
  /* Edit Profile: date drop-downs wrap instead of pushing the page wider */
  :root body #change_reg td table,:root body #change_reg td table > tbody{display:block;width:100%}
  :root body #change_reg td table tr{display:flex;flex-wrap:wrap;gap:6px}
  :root body #change_reg td table td{display:block;padding:0}
  :root body #change_reg select{max-width:100%}
}


/* ======================================================================
   BUILD H (2026-11-20)
   - Court-balance wording polished to Jennifer's ask (both pre-exam screens,
     English + Spanish): "PAY YOUR COURT BALANCE FIRST ..."
   - Quiz result after a missed quiz ("You missed this one..."): the page
     paints the whole table and message red. Text goes back to dark ink;
     rows the page marks red get a red edge; the "did not correctly answer"
     message becomes one red box. Built from the screenshot; confirm on the
     test copy.
   ====================================================================== */
:root body p:has(+ #achtung)::after,
:root body #the_finaltest strong[style*="red"]:first-child::after,
:root body #the_finaltest:has(input[value="Presentar Respuestas"]) > div[align="center"]:first-of-type::before{
  font-weight:600;line-height:1.55}
/* missed quiz */
:root body .mainbox > table[border]:is([style*="red" i],:has([style*="red" i],font[color])) td,
:root body .mainbox > table[border] :is(td,tr,font)[style*="red" i],:root body .mainbox > table[border] font[color]{
  color:var(--cs-ink)!important;border-color:var(--cs-line)!important}
:root body .mainbox > table[border]:is([style*="red" i],:has(tr[style*="red" i],td[style*="red" i],font[color])) tr:not(:first-child) td:first-child{
  border-left:4px solid #c42030!important}
:root body .mainbox span[style*="red" i],:root body .mainbox font[color="red" i],:root body .mainbox font[color="#ff0000" i]{
  display:block;box-sizing:border-box;margin:18px 0;padding:14px 16px;background:#fdf0f0;border:1px solid #f1c4c4;
  border-left:5px solid #c42030;border-radius:8px;color:#8a1515!important;text-align:left;font:700 16px/1.5 var(--cs-read)}
:root body .mainbox ~ a#Continue,:root body .mainbox a#Continue{line-height:1.25!important;white-space:normal}

/* ==========================================================================
   BUILD I (2026-11-20): Student Center after the last chapter (Luis)
   Every chapter done but the final exam not taken: students thought they
   were finished. Shows a "final exam still required" box under the
   Take the Final Exam button, and swaps the old stamped DONE graphic for a
   clean check. The page has no language marker, so the box is bilingual and
   the status marks use no words.
   ========================================================================== */
/* status column: done = green check, not done = empty ring */
:root body #menu_table td:has(> img[src*="/images/"]) > img{display:none}
:root body #menu_table td:has(> img[src*="/images/"])::before{content:"";display:inline-block;box-sizing:border-box;
  width:30px;height:30px;border-radius:50%;border:2px solid #c9d2e3;background:#fff;vertical-align:middle}
:root body #menu_table td:has(> img[src*="/images/"]:not([src*="incomplete" i]))::before{
  border:0;background:var(--cs-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat}
/* every chapter done, no certificate link yet: the final exam is still required */
:root body:has(#menu_table td > img[src*="/images/"]):not(:has(#menu_table td > img[src*="incomplete" i])):not(:has(a[href*="cert" i])) #menu_header::after{
  content:"FINAL EXAM STILL REQUIRED\A You finished every chapter, but your course is not complete until you pass the final exam. Click Take the Final Exam above.\A\A EXAMEN FINAL PENDIENTE\A Termin\00f3  todos los cap\00edtulos, pero su curso no est\00e1  completo hasta que apruebe el examen final.";
  flex:1 1 100%;order:99;display:block;box-sizing:border-box;margin:4px 0 0;padding:14px 16px 14px 54px;
  white-space:pre-line;text-align:left;font:600 15px/1.45 var(--cs-read);color:#5c3a00;
  background:#fff4d6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 1 21h22z' fill='%23d98e04'/%3E%3Cpath d='M12 9v5' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17.3' r='1.4' fill='%23fff'/%3E%3C/svg%3E") 16px 15px/26px no-repeat;
  border:1px solid #f0c25a;border-left:6px solid #d98e04;border-radius:10px}

/* ==========================================================================
   BUILD J (2026-11-23): phone fixes from Luis's checks, for every school
   1. Continue after a chapter quiz: on that page the button is the link
      itself (a#Continue). It is always a solid, visible button.
   2. Videos and video transcripts never wider than the screen.
   3. Final exam identity question (Yes / No): the question gets its own
      line and Yes / No sit side by side under it, on every screen.
   4. Chapter pop-up (opened from the Student Center or the final-exam review
      list): on phones it fills the screen inside the page, so the page no
      longer slides sideways and the close button is always reachable.
      NOTE: the chapter text inside the pop-up is a separate page
      (viewchap.php) that does not load this sheet - see the ticket.
   ========================================================================== */
/* 1 */
:root body a#Continue{display:block!important;visibility:visible!important;opacity:1!important;box-sizing:border-box;
  width:100%!important;max-width:340px;margin:24px auto 28px!important;padding:16px 20px!important;border:0!important;border-radius:12px;
  background:var(--cs-red)!important;color:#fff!important;font:700 18px/1.2 var(--cs-head)!important;text-align:center;
  text-decoration:none!important;box-shadow:0 6px 16px rgba(0,0,0,.14)}
:root body a#Continue::after{content:" \2192"}
:root body .mainbox:has(> a#Continue) > br,:root body a#Continue ~ br{display:none}
/* 2 */
:root body #course_content :is(video,iframe,embed,object),:root body :is(.movie,.movie_container,.movie_label,.movie_sub,.course_video),
:root body div[id^="transcript"],:root body div[id^="transcript"] p.content{max-width:100%!important;box-sizing:border-box}
:root body #course_content :is(video,embed,object){height:auto!important}
:root body #course_content iframe{width:100%!important;height:auto!important;aspect-ratio:16/9}
/* 3 */
:root body .question:has(> input[type="radio"] + label) > input[type="radio"]:first-of-type{position:static!important;display:block!important;
  width:100%!important;height:0!important;margin:12px 0 0!important;padding:0;border:0;opacity:0}
:root body .question:has(> input[type="radio"] + label) > label{margin:0 8px 0 0!important;vertical-align:middle}
/* 4 */
@media only screen and (max-width:899px){
  :root body #lbMain{position:fixed!important;inset:0!important;width:100%!important;height:100%!important;padding:0!important;margin:0!important}
  :root body #lbOuterContainer{box-sizing:border-box;width:100%!important;height:100%!important;max-width:100vw;margin:0!important;
    padding:52px 0 0!important;border-radius:0!important;overflow:hidden}
  :root body :is(#lbIframeContainer,#lbImageContainer){width:100%!important;height:100%!important;padding:0!important}
  :root body #lbIframe{display:block;width:100%!important;max-width:100vw;height:100%!important}
  :root body :is(#lbTopContainer,#lbDetailsContainer){position:absolute!important;top:0;left:0;right:0;width:auto!important;height:52px;
    margin:0!important;padding:0 8px!important;background:#fff;border-bottom:1px solid var(--cs-line);z-index:2}
  :root body #lbClose{position:absolute!important;top:6px;right:8px;width:40px!important;height:40px!important}
  :root body:has(#lbMain[style*="block"]){overflow:hidden}
}


/* ==================== PART 4: AFFILIATE TEMPLATES ====================
   Each affiliate's header record wraps these pages in its own header and
   footer. Some of those were built for a 800-923px desktop window. These
   rules only let those wrappers shrink to the screen; colours, logos and
   wording of the affiliate's header are not touched.
   ===================================================================== */
/* the page box on old templates is written into the page (width:828px) */
:root body #aff_content[style*="width"]{max-width:100%!important;box-sizing:border-box}

@media only screen and (max-width:64em){
  /* A Plus style template: #wrapper / .header / .content_main / .nav */
  :root body #wrapper,:root body > .header,:root body > .b,:root body #site_info{width:auto!important;max-width:100%;box-sizing:border-box}
  :root body #wrapper{overflow:visible}
  :root body .content_main{padding-left:8px;padding-right:8px;background-size:100% auto}
  :root body .content_main > ul.nav{float:none;width:auto!important;height:auto!important;margin:0 0 12px;padding:0}
  :root body.subPage .content_main > ul.nav li{float:left;min-width:0;width:auto;padding:0 10px}
  :root body .content_main > ul.nav::after{content:"";display:block;clear:both}
  :root body #site_info .footerLink,:root body #site_info p.copyright{float:none;width:auto;margin:6px 0}
  /* TSC 800px template: #main_container / #header / #footer */
  :root body #main_container #header,:root body #main_container #footer,:root body #main_container #bottom_shadow{width:auto!important;max-width:100%}
  :root body #login_container_wrapper{right:8px!important}
  :root body #logo_container img,:root body #header_title img{max-width:100%;height:auto}
}
/* boxes kept invisible by the template must not push the page sideways */
:root body .contactInfo[style*="hidden"],:root body .content_sub[style*="hidden"]{display:none}


/* ==================== EG TRAFFIC SCHOOL COLOURS ==================== */
/* EG Traffic School (aid 463): the school's own colours: red #AB0A0A from its header bar; headings one step darker */
:root body{--aff-brand:#AB0A0A;--aff-brand-rgb:171,10,10;--aff-head:#7E0808;
  --aff-act:#AB0A0A;--aff-act-dark:#8A0808;--aff-act-rgb:171,10,10;
  --aff-tint:#fcf5f5;--aff-tint2:#f7e6e6;--aff-line:#f0d3d3;--aff-line2:#eac2c2;--aff-mid:#d99191}

/* ==================== EG TRAFFIC SCHOOL PAGE FRAME ==================== */
:root body #wrapper,:root body #site_wrapper,:root body #body_content,:root body #body_layer,:root body #header,:root body #content_container,:root body #content,:root body #footer_nav,:root body #aff_content,:root body .aff_content,:root body .container.content{max-width:100%!important;box-sizing:border-box}
:root body #wrapper img,:root body #site_wrapper img,:root body #header img,:root body #header_layer img{max-width:100%;height:auto}
@media only screen and (max-width:64em){ :root body #wrapper,:root body #site_wrapper,:root body #body_content,:root body #body_layer,:root body #header,:root body #content_container,:root body #content,:root body #aff_content,:root body .aff_content,:root body .container.content{width:auto!important} :root body #header.row,:root body #footer_nav.row{margin-left:0!important;margin-right:0!important} }

/* Student Center: Start the Course in the school's own button colour */
:root body #menu_header #link_continue a{background:var(--aff-act)!important;color:var(--aff-act-ink,#fff)!important}
:root body #menu_header #link_continue a:hover{background:var(--aff-act-dark)!important}

/* ==================== REGISTRATION: STEPS BAR ON TOP (R3, Luis 11/27) ====================
   One centred column at every screen size. The three steps sit in a bar above the form,
   so the form uses the full width and never has to squeeze beside a side column.
   Same words, same fields, same buttons: layout and colour only. */
:root body #registration_left_panel,
:root body #registration_panel,
:root body #registration_container{float:none!important;clear:both;box-sizing:border-box;
  width:auto!important;max-width:720px!important;margin-left:auto!important;margin-right:auto!important}
:root body #registration_panel{padding:0!important}

/* the steps card */
:root body #registration_left_panel{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0!important;margin-top:4px!important;margin-bottom:22px!important;padding:22px 22px 18px!important;
  background:#fff;border:1px solid var(--cs-line)!important;border-top:5px solid var(--aff-act)!important;
  border-radius:14px;box-shadow:0 4px 18px rgba(16,24,40,.07);text-align:center;counter-reset:csstep}
:root body #registration_left_panel > *{grid-column:1 / -1}
:root body #registration_left_panel > br{display:none}
:root body #registration_left_panel h1,:root body #registration_left_panel h2{margin:0 0 4px!important;
  font:800 26px/1.2 var(--cs-head)!important;letter-spacing:-.01em;color:var(--cs-teal);text-align:center}
:root body #registration_left_panel > p{margin:0 0 18px!important;font:400 15px/1.5 var(--cs-read)!important;
  color:var(--cs-mute);text-align:center}
:root body #registration_left_panel > p:last-of-type{margin:16px 0 0!important;padding-top:12px;
  border-top:1px solid var(--cs-soft-line);font-size:14px!important}

/* each step: a numbered circle on a line, its name underneath */
:root body #registration_left_panel > #reg_bread,
:root body #registration_left_panel > .reg_bread{grid-column:auto;position:relative;min-width:0;width:auto!important;
  margin:0!important;padding:0!important;background:none!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;overflow:visible!important;text-align:center!important;color:#6b7280;
  font:700 12px/1.25 var(--cs-head)!important;letter-spacing:.06em;text-transform:uppercase}
:root body #registration_left_panel > .reg_bread::after,
:root body #registration_left_panel > #reg_bread::after{content:"";position:absolute;top:17px;left:calc(50% + 24px);
  right:calc(-50% + 24px);height:3px;border-radius:3px;background:#e3e7ee}
:root body #registration_left_panel > :is(#reg_bread,.reg_bread):nth-last-child(1 of :is(#reg_bread,.reg_bread))::after{display:none}
:root body #registration_left_panel #bread_container,
:root body #registration_left_panel .bread_container{display:flex;flex-direction:column;align-items:center;gap:8px;
  padding:0 2px!important;border:0!important;white-space:normal!important;overflow:visible!important;
  text-overflow:clip!important;background:none!important;color:inherit!important}
:root body #registration_left_panel #bread_container::before,
:root body #registration_left_panel .bread_container::before{counter-increment:csstep;content:counter(csstep);
  display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:36px;height:36px;
  border:2px solid #d5dbe5;border-radius:50%;background:#fff;color:#6b7280;
  font:700 15px/1 var(--cs-head);letter-spacing:0}
/* the step the student is on */
:root body #registration_left_panel > #reg_bread{color:var(--cs-teal)}
:root body #registration_left_panel #reg_bread #bread_container::before{background:var(--cs-blue);border-color:var(--cs-blue);
  color:#fff;box-shadow:0 0 0 5px rgba(var(--aff-brand-rgb),.15)}
/* steps already done (before the current one): ticked, line filled */
:root body #registration_left_panel > .reg_bread:has(~ #reg_bread){color:var(--cs-teal)}
:root body #registration_left_panel > .reg_bread:has(~ #reg_bread)::after{background:var(--cs-blue)}
:root body #registration_left_panel > .reg_bread:has(~ #reg_bread) .bread_container::before{content:"\2713";
  background:var(--aff-tint2);border-color:var(--cs-blue);color:var(--cs-blue)}

/* the form under it: one column of cards, the Next button big and centred */
:root body #registration_panel > p{text-align:left}
:root body #registration_container .registration_subdivision{margin-left:0!important;margin-right:0!important}
:root body #registration_panel .button{margin:8px 0 10px;text-align:center!important}
:root body #registration_panel .button input[type="submit"],
:root body #registration_panel .button input[type="button"]{min-width:min(100%,320px);min-height:52px;font-size:18px!important}

/* phones: smaller circles, labels never cut */
@media only screen and (max-width:40em){
  :root body #registration_left_panel{padding:16px 10px 14px!important;margin-bottom:16px!important;border-radius:12px}
  :root body #registration_left_panel h1,:root body #registration_left_panel h2{font-size:21px!important}
  :root body #registration_left_panel > p{font-size:14px!important;margin-bottom:14px!important}
  :root body #registration_left_panel > #reg_bread,
  :root body #registration_left_panel > .reg_bread{font-size:10.5px!important;letter-spacing:.02em}
  :root body #registration_left_panel #bread_container::before,
  :root body #registration_left_panel .bread_container::before{width:30px;height:30px;font-size:13px}
  :root body #registration_left_panel > .reg_bread::after,
  :root body #registration_left_panel > #reg_bread::after{top:14px;left:calc(50% + 20px);right:calc(-50% + 20px)}
  :root body #registration_panel .button input[type="submit"],
  :root body #registration_panel .button input[type="button"]{width:100%}
}
@media only screen and (min-width:40.0625em){
  :root body #registration_container .contact_field:not(.check){width:340px}
}
