/* ============================================================================
   Fun and Cheap Online (New Jersey, aid 69) - ONE stylesheet for the school
   File: fnc-course-v1.css
   BUILD: 2026-11-18-A
   Replaces affimg/funandcheaponline/style.css (v1.0, October 2026). Keep that
   file on the server as the fallback; to undo, point the link back at style.css.
   PART 1 header + footer (same as style.css v1.0)
   PART 2 registration + login on phones (same as style.css v1.0)
   PART 3 student home, change profile, chapter pages, timer bar (new)
   Version rule: any change gets a new BUILD letter (B, C...) on line 4;
   a new file name (v2) only when Luis says so.
   ========================================================================= */

/* ============================================================================
   Fun & Cheap Affiliate - v1.0 - October 2026
   Header, footer and mobile registration layout for the affiliate pages.
   ----------------------------------------------------------------------------
   PART 1  header + footer ("Sunday Comics", ported from site.css)
   PART 2  registration / login flow re-flowed for phones (max-width 900px)

   LOAD ORDER: after the legacy sheets (style.css, affiliate.css).

   ISOLATION
   - Part 1: every selector starts with .fc-chrome and every class is fc-*.
     Nothing targets a bare element, a legacy id, or a site.css class
     (.head, .nav, .mk, .btn, .foot, .wrap), so the chrome can't restyle the
     course and site.css can load beside it. Variables are --fcc-*.
   - Part 1 also neutralises the legacy globals that leak in (style.css
     *{margin:0}, body 12px Arial, a{color}, img{margin}, p{margin-bottom};
     chapters.css bare "ul" margin; #content_container text-align:center).
   - Part 2 only re-flows existing legacy ids/classes, inside a media query.
     Desktop is unchanged.
   - Keep the chrome outside #course_content: chapters.css uses !important there.
   ========================================================================= */

/* =========================== PART 1: CHROME =========================== */
.fc-chrome{
  --fcc-news:#f4efe2; --fcc-paper:#ffffff; --fcc-ink:#17161a;
  --fcc-red:#e8352e;  --fcc-cyan:#0aa6d8;  --fcc-yellow:#ffd400;
  --fcc-muted:#5b5762;
  --fcc-display:"Bricolage Grotesque",ui-sans-serif,system-ui,Arial,sans-serif;
  --fcc-body:"DM Sans",ui-sans-serif,system-ui,Arial,sans-serif;
  --fcc-mono:"Space Grotesk",ui-monospace,monospace;
  --fcc-wrap:1080px; --fcc-edge:3px;

  display:block;position:relative;width:100%;margin:0;padding:0;
  font:400 17px/1.62 var(--fcc-body);color:var(--fcc-ink);
  text-align:left;letter-spacing:normal;
  -webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-size-adjust:100%;
}
.fc-chrome *,.fc-chrome *::before,.fc-chrome *::after{box-sizing:border-box}
.fc-chrome ul,.fc-chrome ol{margin:0;padding:0;list-style:none}
.fc-chrome p,.fc-chrome h4{margin:0;padding:0}
.fc-chrome img,.fc-chrome svg{display:block;margin:0;border:0;max-width:100%}
.fc-chrome a{color:inherit}

.fc-chrome .fc-wrap{max-width:var(--fcc-wrap);margin:0 auto;padding:0 26px}
.fc-chrome .fc-skip{position:absolute;left:-9999px}
.fc-chrome .fc-skip:focus{left:16px;top:16px;z-index:99;background:var(--fcc-ink);color:#fff;padding:12px 18px}
.fc-chrome :focus-visible{outline:3px solid var(--fcc-red);outline-offset:3px}

/* ---- utility bar ---- */
.fc-chrome.fc-util{background:var(--fcc-ink);color:#e9e5dc}
.fc-chrome.fc-util .fc-wrap{display:flex;align-items:center;gap:16px;min-height:40px;flex-wrap:wrap;
  font:500 13px/1 var(--fcc-mono)}
.fc-chrome.fc-util a{color:#fff;text-decoration:none}
.fc-chrome.fc-util a:hover{color:var(--fcc-yellow)}
.fc-chrome .fc-sep{color:#565260}
.fc-chrome .fc-right{margin-left:auto;color:var(--fcc-yellow);letter-spacing:.12em;font-size:11.5px;
  text-transform:uppercase}

/* ---- header ---- */
.fc-chrome.fc-head{background:var(--fcc-news);border-bottom:var(--fcc-edge) solid var(--fcc-ink);
  position:sticky;top:0;z-index:20}
.fc-chrome.fc-head .fc-wrap{display:flex;align-items:center;gap:24px;min-height:84px;flex-wrap:wrap}

/* logo plate */
.fc-chrome .fc-mk{display:inline-flex;flex-direction:column;text-decoration:none;
  border:var(--fcc-edge) solid var(--fcc-ink);background:var(--fcc-news);
  box-shadow:5px 5px 0 var(--fcc-ink);padding:9px 14px 8px;
  transition:transform .1s ease,box-shadow .1s ease}
.fc-chrome a.fc-mk:hover{transform:translate(2px,2px);box-shadow:2px 2px 0 var(--fcc-ink)}
.fc-chrome .fc-mk-word{display:flex;align-items:baseline;gap:6px;
  font-family:var(--fcc-display);font-weight:800;font-size:26px;letter-spacing:-.045em;
  color:var(--fcc-ink);line-height:1}
.fc-chrome .fc-amp{color:var(--fcc-red)}
.fc-chrome .fc-dot{width:9px;height:9px;background:var(--fcc-cyan);border:2px solid var(--fcc-ink);
  border-radius:50%;align-self:center;flex:none}
.fc-chrome .fc-mk-rule{display:block;height:2px;background:var(--fcc-ink);margin:6px 0 5px}
.fc-chrome .fc-mk-sub{font:700 8px/1 var(--fcc-mono);letter-spacing:.2em;text-transform:uppercase;
  color:var(--fcc-ink);white-space:nowrap}

/* nav */
.fc-chrome .fc-nav{display:flex;align-items:center;gap:22px;margin-left:auto;flex-wrap:wrap}
.fc-chrome .fc-nav a{font:600 14.5px/1 var(--fcc-body);text-decoration:none;padding:8px 0}
.fc-chrome .fc-nav a:hover{color:var(--fcc-red)}
.fc-chrome .fc-nav a[aria-current="page"]{box-shadow:inset 0 -3px 0 var(--fcc-red)}

/* Start button - cyan is ACTION ONLY */
.fc-chrome .fc-nav .fc-btn{display:inline-block;background:var(--fcc-cyan);color:#fff;
  border:var(--fcc-edge) solid var(--fcc-ink);padding:11px 18px;
  font:700 14.5px/1 var(--fcc-display);box-shadow:4px 4px 0 var(--fcc-ink);
  transition:transform .1s ease,box-shadow .1s ease}
.fc-chrome .fc-nav .fc-btn:hover{color:#fff;transform:translate(2px,2px);box-shadow:2px 2px 0 var(--fcc-ink)}
.fc-chrome .fc-nav .fc-btn:active{transform:translate(4px,4px);box-shadow:0 0 0 var(--fcc-ink)}

/* ---- footer ---- */
.fc-chrome.fc-foot{clear:both;background:var(--fcc-ink);color:#e9e5dc;padding:52px 0 36px;
  border-top:var(--fcc-edge) solid var(--fcc-ink)}
.fc-chrome .fc-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:32px}
.fc-chrome.fc-foot h4{font:700 11px/1 var(--fcc-mono);letter-spacing:.2em;text-transform:uppercase;
  color:var(--fcc-yellow);margin:0 0 14px}
.fc-chrome.fc-foot p{margin:0 0 9px;font-size:15px;line-height:1.5;color:#bdb8b2}
.fc-chrome.fc-foot p.fc-tag{margin-top:14px}
.fc-chrome.fc-foot a{color:#bdb8b2;overflow-wrap:anywhere}
.fc-chrome.fc-foot a:hover{color:#fff}
/* logo reversed for the ink ground */
.fc-chrome.fc-foot .fc-mk{background:transparent;border-color:var(--fcc-news);box-shadow:5px 5px 0 var(--fcc-red)}
.fc-chrome.fc-foot .fc-mk-word{color:var(--fcc-news);font-size:24px}
.fc-chrome.fc-foot .fc-mk-rule{background:var(--fcc-news)}
.fc-chrome.fc-foot .fc-mk-sub{color:var(--fcc-news)}
.fc-chrome .fc-legal{border-top:2px solid #34313a;margin-top:34px;padding-top:22px}
.fc-chrome.fc-foot .fc-legal p{font-size:13.5px;color:#8d8892}

@media (max-width:620px){
  .fc-chrome .fc-wrap{padding:0 18px}
  .fc-chrome.fc-util .fc-wrap{min-height:0;padding-top:9px;padding-bottom:9px;gap:6px 12px;font-size:12.5px}
  .fc-chrome .fc-right{display:none}
  /* on a form page a two-row sticky header eats a third of the screen */
  .fc-chrome.fc-head{position:relative}
  .fc-chrome.fc-head .fc-wrap{min-height:0;padding-top:14px;padding-bottom:14px;gap:12px}
  .fc-chrome .fc-nav{gap:6px 16px;width:100%;margin-left:0}
  .fc-chrome .fc-nav a{min-height:44px;display:flex;align-items:center}
  .fc-chrome .fc-nav .fc-btn{display:flex;flex:1 0 auto;justify-content:center}
  /* "Fun & Cheap" plate: one size down so the nav fits beside it */
  .fc-chrome .fc-mk-word{font-size:22px}
}
@media (prefers-reduced-motion:reduce){.fc-chrome *{transition:none!important}}


/* ================= PART 2: REGISTRATION FLOW ON PHONES ================= */
@media (max-width:900px){

  /* ---- page frame ---- */
  #content_container,
  #content_container #aff_content,
  #content_container #content{
    width:auto;max-width:100%;min-width:0;margin:0;float:none;overflow:visible;
    box-sizing:border-box}
  #content_container{padding:0 16px 40px;background:#f4efe2;text-align:left}
  #content_container #aff_content{padding-top:24px!important} /* overrides inline 60px */

  #content_container #left_panel,
  #content_container #right_panel,
  #content_container #wide_panel{
    float:none;clear:both;width:auto;max-width:100%;margin:0;padding:0;border:0;
    box-sizing:border-box}

  /* ---- title + four-step bar ---- */
  #content_container #left_panel{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
    gap:6px;padding-bottom:18px;margin-bottom:22px;border-bottom:3px solid #17161a}
  #content_container #left_panel > *{grid-column:1 / -1}
  #content_container #left_panel > br{display:none}
  #content_container #left_panel h1{font:800 28px/1.05 "Bricolage Grotesque",Arial,sans-serif;
    letter-spacing:-.028em;color:#17161a;margin:0 0 4px}
  #content_container #left_panel p{margin:0 0 10px;font:400 15px/1.5 "DM Sans",Arial,sans-serif;color:#5b5762}
  #content_container #left_panel > .reg_bread,
  #content_container #left_panel > #reg_bread{grid-column:auto;margin:0;padding:0;
    background:#ffffff;border:2px solid #17161a;
    font:700 9.5px/1 "Space Grotesk",monospace;letter-spacing:.04em;color:#5b5762}
  #content_container #left_panel .bread_container,
  #content_container #left_panel #bread_container{border:0;padding:8px 0;text-align:center;
    white-space:nowrap;overflow:hidden}
  /* current step */
  #content_container #left_panel > #reg_bread{background:#ffd400;color:#17161a;box-shadow:3px 3px 0 #17161a}

  #content_container #welcome h2{font:800 22px/1.15 "Bricolage Grotesque",Arial,sans-serif;
    letter-spacing:-.02em;color:#17161a}
  #content_container #right_panel > p,
  #content_container #welcome p{font:400 15.5px/1.55 "DM Sans",Arial,sans-serif;color:#17161a}

  /* ---- form: each row is a comic panel ---- */
  #content_container #registration_container{width:auto;max-width:100%;margin:0}

  #content_container #registration_container .row,
  #content_container #registration_container .row_err{
    display:flex;flex-wrap:wrap;align-items:center;gap:8px;
    margin:0 0 12px;padding:14px;text-align:left;box-sizing:border-box;
    background:#ffffff;border:3px solid #17161a;border-bottom-width:3px;
    font:400 15px/1.4 "DM Sans",Arial,sans-serif;color:#17161a}
  #content_container #registration_container .row_err{background:#e8352e;color:#ffffff}

  #content_container #registration_container label{
    float:none;display:block;flex:0 0 100%;padding:0;
    font:700 15px/1.3 "DM Sans",Arial,sans-serif;color:inherit}
  #content_container #registration_container .desc{font-size:12px;font-weight:400;color:#5b5762}

  #content_container #registration_container .contact_field,
  #content_container .form_entry .contact_field{
    flex:1 1 100%;width:100%;max-width:100%;height:auto;min-height:46px;
    padding:10px 12px;font:400 16px/1.2 "DM Sans",Arial,sans-serif; /* 16px: no iOS zoom */
    color:#17161a;background:#ffffff;border:2px solid #17161a;border-radius:0;
    box-sizing:border-box;-webkit-appearance:none;appearance:none}

  #content_container #registration_container select{
    flex:1 1 0;min-width:0;max-width:100%;min-height:46px;padding:8px;
    font:400 16px/1.2 "DM Sans",Arial,sans-serif;color:#17161a;
    background-color:#ffffff;border:2px solid #17161a;border-radius:0;box-sizing:border-box}
  #content_container #registration_container .row select:only-of-type{flex-basis:100%}

  #content_container #registration_container .contact_field:focus,
  #content_container #registration_container select:focus{
    outline:3px solid #0aa6d8;outline-offset:1px}

  #content_container #registration_container input[type="radio"]{
    width:22px;height:22px;margin:0 4px 0 0;flex:none;accent-color:#0aa6d8}

  #content_container #registration_container #refer{flex:0 0 100%;padding:0;background:none}
  #content_container #registration_container #refer input{width:100%;min-height:46px;
    font-size:16px;border:2px solid #17161a;box-sizing:border-box}

  #content_container #registration_container .divider{height:0;margin:6px 0 18px;
    border:0;border-top:3px dashed #17161a;background:none}

  /* ---- Next: the site's cyan action button ---- */
  #content_container #registration_container input[type="submit"]{
    display:block;width:100%;min-height:54px;margin:18px 0 6px;
    background:#0aa6d8;color:#ffffff;border:3px solid #17161a;border-radius:0;
    box-shadow:6px 6px 0 #17161a;
    font:700 18px/1 "Bricolage Grotesque",Arial,sans-serif;cursor:pointer;
    -webkit-appearance:none;appearance:none}
  #content_container #registration_container input[type="submit"]:active{
    transform:translate(6px,6px);box-shadow:0 0 0 #17161a}

  /* ---- other steps in the same flow ---- */
  #content_container #registration_container .price_row,
  #content_container .row .form_entry,
  #content_container .row #forgot,
  #content_container .security_entry,
  #content_container .shipping_option,
  #content_container .shipping_option_existing{width:auto;max-width:100%;box-sizing:border-box}
  #content_container .form_entry input{max-width:100%}
  #content_container .shipping_option{background:#ffffff;border:3px solid #17161a;margin:0 0 12px}
  #content_container .shipping_option_existing{font-size:16px}
  #content_container #receipt{width:auto}
  #content_container #receipt_container{padding:10px 0}
  #content_container #right_panel h3{padding-top:20px}
}

@media (max-width:380px){
  #content_container #registration_container select[name$="Month"]{flex-basis:100%}
  #content_container #left_panel > .reg_bread,
  #content_container #left_panel > #reg_bread{font-size:8.5px;letter-spacing:0}
}

/* =================== LOGIN + SECURITY QUESTIONS (login.php) ===================
   login.php prints its own <style> block in the page body:
     #login_form 500px   .row .form_entry 500px   .form_entry input 300px
     .security_entry 500px   .row #forgot 500px
   That block loads AFTER this sheet, so every rule here is anchored on
   #login_container (an id login.php always outputs) to out-rank it. It does
   not depend on #content_container, so it works whatever wrapper the
   affiliate header record supplies. Desktop is unchanged.
   ========================================================================= */
@media (max-width:900px){
  #login_container{width:auto;max-width:100%;margin:0 auto;padding:8px 0 24px;
    box-sizing:border-box;text-align:left;overflow-wrap:anywhere}
  #login_container #login_form{width:auto;max-width:460px;margin:0 auto;box-sizing:border-box}
  /* the two spacer <br>s login.php opens the form with (the intro text
     further down uses <br>s as line breaks, so only these two go) */
  #login_container #login_form > br:nth-child(-n+2){display:none}

  #login_container .row{margin:0 0 12px;padding:0;background:none;border:0;width:auto}
  #login_container .row .form_entry{width:auto;max-width:100%;margin:0;padding:14px;
    text-align:left;box-sizing:border-box;background:#ffffff;border:3px solid #17161a}
  #login_container .form_entry label{display:block;float:none;margin:0 0 6px;padding:0;
    font-size:15px;line-height:1.3;font-family:"DM Sans",Arial,sans-serif;font-weight:700;color:#17161a}
  #login_container .form_entry input,
  #login_container .form_entry .contact_field{display:block;width:100%;max-width:100%;
    height:auto;min-height:46px;margin:0;padding:10px 12px;font-size:16px; /* no iOS zoom */
    box-sizing:border-box;border:2px solid #17161a;border-radius:0;background:#ffffff;color:#17161a;font-family:"DM Sans",Arial,sans-serif;-webkit-appearance:none;appearance:none}

  /* security questions (markup comes from getsecurityquestions.inc) */
  #login_container .security_entry{width:auto;max-width:100%;margin:12px 0 0;
    text-align:left;box-sizing:border-box}
  #login_container .security_entry .entry{margin:0;padding:12px 0;font-size:15px;line-height:1.45;
    font-family:"DM Sans",Arial,sans-serif;border-bottom:2px solid #d8d0bd}
  #login_container .security_entry input[type="radio"]{width:22px;height:22px;margin:0 4px 0 10px;
    vertical-align:middle}

  #login_container .row #forgot{width:auto;max-width:100%;box-sizing:border-box}
  #login_container .note{margin:10px 0;box-sizing:border-box}
  #login_container > p{font-size:14px;line-height:1.5}

  #login_container input[type="submit"]{display:block;width:100%;min-height:52px;margin:18px 0 6px;
    cursor:pointer;-webkit-appearance:none;appearance:none;background:#0aa6d8;color:#ffffff;border:3px solid #17161a;border-radius:0;box-shadow:6px 6px 0 #17161a;font:700 18px/1 "Bricolage Grotesque",Arial,sans-serif}
  #login_container input[type="submit"]:active{transform:translate(6px,6px);box-shadow:0 0 0 #17161a}
}

/* ============================================================================
   PART 3: STUDENT PAGES  (student home, change profile, chapter pages, timer)
   ----------------------------------------------------------------------------
   Built from the real page source of home.php, page.php?template=change_reg
   and show.php, with the real global.css, menu.css and chapters.css.

   WHY THE SELECTORS ARE LONG: this file is linked in the head BEFORE
   global.css, and menu.css / chapters.css are linked inside the page body, so
   all three load after it. Every rule below starts with #content_container
   (or body:has) so it out-ranks them wherever the link sits.

   NOTHING HERE HIDES OR SHOWS THE CONTINUE LINK. The page script does that.
   ========================================================================= */

/* ------------------------------ page frame ------------------------------ */
#content_container #aff_content{max-width:100%;box-sizing:border-box;
  padding-top:28px!important}                       /* inline 60px gap */
@media (max-width:900px){
  #content_container #aff_content{padding-top:22px!important;background:transparent;border:0}
}

/* =============================== TIMER BAR =============================== */
/* Old browsers: the bar is pinned to the bottom of the screen. */
#content_container #Timer{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:45;
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 8px;
  width:auto;min-height:46px;margin:0;padding:6px 14px;box-sizing:border-box;
  background:#ffd400;color:#17161a;
  border-top:3px solid #17161a;border-bottom:3px solid #17161a;
  font:700 17px/1.25 "Space Grotesk","DM Sans",Arial,sans-serif;letter-spacing:.02em;
  text-align:center;font-variant-numeric:tabular-nums}
#content_container #Timer #TimerText{color:#17161a;font-size:inherit}

/* Current browsers: compact header pinned on top, timer bar right under it. */
@supports selector(:has(*)){
  html:has(#Timer){scroll-padding-top:130px}
  body:has(#Timer) .fc-chrome.fc-util{display:none}
  body:has(#Timer) .fc-chrome.fc-head{position:fixed;top:0;left:0;right:0;z-index:50}
  body:has(#Timer) .fc-chrome.fc-head .fc-wrap{height:64px;min-height:0;
    padding-top:0;padding-bottom:0;flex-wrap:nowrap;gap:16px}
  body:has(#Timer) .fc-chrome.fc-head .fc-mk{padding:6px 11px 5px;box-shadow:3px 3px 0 #17161a}
  body:has(#Timer) .fc-chrome.fc-head .fc-mk-word{font-size:20px}
  body:has(#Timer) .fc-chrome.fc-head .fc-mk-rule{margin:4px 0 3px}
  body:has(#Timer) .fc-chrome.fc-head .fc-mk-sub{font-size:7px}
  body:has(#Timer) .fc-chrome.fc-head .fc-nav{width:auto;margin-left:auto;flex-wrap:nowrap;gap:20px}
  /* a student inside a chapter is already signed in and registered */
  body:has(#Timer) .fc-chrome.fc-head .fc-nav a[href*="register.php"],
  body:has(#Timer) .fc-chrome.fc-head .fc-nav a[href*="login.php"]{display:none}

  body:has(#Timer) #content_container #Timer{top:67px;bottom:auto;border-top:0}
  body:has(#Timer) #content_container{padding-top:113px}
  body:has(#Timer) #content_container #aff_content{padding-top:18px!important}

  /* time is up: the script replaces the countdown with its own sentence */
  #content_container #Timer:not(:has(#TimerText)){background:#bfe8c6}
  #content_container #Timer:not(:has(#TimerText))::after{
    content:"Scroll down and click Continue.";font-weight:500}

  @media (max-width:620px){
    body:has(#Timer) .fc-chrome.fc-head .fc-wrap{height:54px;gap:10px}
    body:has(#Timer) .fc-chrome.fc-head .fc-mk-rule,
    body:has(#Timer) .fc-chrome.fc-head .fc-mk-sub{display:none}
    body:has(#Timer) .fc-chrome.fc-head .fc-mk{padding:6px 10px}
    body:has(#Timer) .fc-chrome.fc-head .fc-nav{gap:16px}
    body:has(#Timer) .fc-chrome.fc-head .fc-nav a{min-height:44px}
    body:has(#Timer) #content_container #Timer{top:57px;font-size:16px}
    body:has(#Timer) #content_container{padding-top:103px}
    #content_container #Timer:not(:has(#TimerText)){font-size:14.5px}
  }
}

/* ============================ CHAPTER PAGES ============================ */
/* the notice (printed above and below the chapter) */
#content_container #course_note{max-width:760px;margin:0 auto 16px;padding:14px 16px;
  box-sizing:border-box;background:#ffffff;color:#17161a;
  border:2px solid #17161a;border-left:10px solid #ffd400;
  font:400 15px/1.55 "DM Sans",Arial,sans-serif;text-align:left}
#content_container #course_note strong{color:#c8201a}

/* Continue (shown by the page script when the time is up) */
#content_container #course_note #Continue{margin:6px auto 4px!important;text-align:center}
#content_container #course_note #Continue br{display:none}
#content_container #course_note #Continue a,
#content_container #course_note #Continue a:visited{display:block;max-width:420px;margin:0 auto;
  padding:16px 18px;background:#0aa6d8;color:#ffffff;
  border:3px solid #17161a;box-shadow:6px 6px 0 #17161a;
  font:700 20px/1 "Bricolage Grotesque",Arial,sans-serif;text-decoration:none}
#content_container #course_note #Continue a:hover{background:#0889b3;color:#ffffff}
#content_container #course_note #Continue a:active{transform:translate(6px,6px);box-shadow:0 0 0 #17161a}

/* section name + text-size buttons */
#content_container #dock{display:flex;flex-wrap:wrap;align-items:center;
  justify-content:space-between;gap:6px 16px;width:auto;max-width:760px;height:auto;
  margin:0 auto 18px;padding:8px 14px;box-sizing:border-box;
  background:#ffffff;border:2px solid #17161a}
#content_container #dock .dock_content{float:none;width:auto;padding:0;
  font:600 14px/1.3 "DM Sans",Arial,sans-serif;color:#17161a;text-align:left}
#content_container #dock .dock_content a{display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;margin:0 0 0 6px;vertical-align:middle;
  background:#f4efe2;border:2px solid #17161a;color:#17161a;text-decoration:none}
#content_container #dock .dock_content a:hover{background:#ffd400}
#content_container #dock .dock_content a:nth-of-type(1) span{font-size:13px!important}
#content_container #dock .dock_content a:nth-of-type(2) span{font-size:17px!important}
#content_container #dock .dock_content a:nth-of-type(3) span{font-size:21px!important}

/* the chapter itself */
#content_container #main_chapter_container{max-width:760px;margin:0 auto}
#content_container #content_chapter_container{padding:0;background:transparent;
  font-family:"DM Sans",Arial,sans-serif;line-height:1.65;color:#17161a;
  overflow-wrap:break-word}
#content_container #content_chapter_container p,
#content_container #content_chapter_container p.content{margin:0 0 16px;padding:0;
  font-family:"DM Sans",Arial,sans-serif;line-height:1.65;color:#17161a}
#content_container #content_chapter_container li{line-height:1.6}

#content_container .chapter_title{width:auto;height:auto;margin:8px 0 18px;padding:0 0 10px;
  background:none;border-bottom:3px solid #17161a;
  font:800 30px/1.1 "Bricolage Grotesque",Arial,sans-serif;letter-spacing:-.02em;color:#17161a}
#content_container .section_title{margin:30px 0 12px;padding:0;
  font:800 23px/1.2 "Bricolage Grotesque",Arial,sans-serif;letter-spacing:-.015em;color:#17161a}
#content_container .section_sub{margin:26px 0 10px;padding:0;
  font:700 19px/1.25 "Bricolage Grotesque",Arial,sans-serif;color:#17161a}

/* pictures and video never wider than the column */
#content_container #content_chapter_container img,
#content_container #content_chapter_container video{max-width:100%;height:auto}
#content_container #content_chapter_container .img{padding:14px 0}
#content_container #content_chapter_container .img_lt{padding:6px 20px 10px 0;max-width:46%}
#content_container #content_chapter_container .img_rt{padding:6px 0 10px 20px;max-width:46%}
#content_container #content_chapter_container .img_txt{font-size:14px;line-height:1.4;color:#5b5762}

/* lists */
#content_container #content_chapter_container ul,
#content_container #content_chapter_container ol{margin:0 0 16px;padding:0 0 0 26px}
#content_container #content_chapter_container .chapter_list,
#content_container #content_chapter_container .numbered_list{list-style-position:outside;
  font-family:"DM Sans",Arial,sans-serif}
#content_container #content_chapter_container li{margin:0 0 8px;padding:0}
#content_container #content_chapter_container li > ul,
#content_container #content_chapter_container ol > ul{margin:8px 0 8px}

/* joke / one-liner / vanity plate boxes: same colours, readable size */
#content_container #content_chapter_container .one_liner,
#content_container #content_chapter_container .joke,
#content_container #content_chapter_container .vanity,
#content_container #content_chapter_container .silly_signs,
#content_container #content_chapter_container .bumper_snickers,
#content_container #content_chapter_container .collision{padding:14px 16px;
  font:600 15px/1.5 "DM Sans",Arial,sans-serif}
#content_container #content_chapter_container #chapter_tag{padding:14px 16px;
  font:500 15px/1.5 "DM Sans",Arial,sans-serif}
#content_container #content_chapter_container #chapter_tag ol{margin:0;padding:0 0 0 28px}
#content_container #content_chapter_container #chapter_tag li{padding:0;margin:0 0 8px}

/* Student Center | Log Off */
#content_container #course-footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;
  margin:6px 0 0;font-size:0}                              /* hides the " | " */
#content_container #course-footer-links a{display:inline-block;padding:13px 20px;
  background:#ffffff;color:#17161a;border:3px solid #17161a;
  font:700 16px/1 "DM Sans",Arial,sans-serif;text-decoration:none}
#content_container #course-footer-links a:hover{background:#ffd400}

@media (max-width:620px){
  #content_container .chapter_title{font-size:24px}
  #content_container .section_title{font-size:21px}
  #content_container .section_sub{font-size:18px}
  #content_container #content_chapter_container .img_lt,
  #content_container #content_chapter_container .img_rt{float:none;max-width:100%;
    padding:14px 0;text-align:center}
  #content_container #content_chapter_container .img_txt br{display:none}
  #content_container #dock{padding:8px 10px}
  #content_container #dock .dock_content{font-size:13.5px}
  #content_container #course-footer-links a{flex:1 1 140px;text-align:center}
}

/* ============================= STUDENT HOME ============================= */
#content_container #menu_container{max-width:760px;margin:0 auto 18px}
#content_container #menu_header{display:flex;flex-wrap:wrap;align-items:flex-start;
  justify-content:space-between;gap:16px 20px;min-height:0;padding:18px;box-sizing:border-box;
  background:#ffffff;border:3px solid #17161a;box-shadow:6px 6px 0 #17161a;text-align:left}

/* traffic light: lamps inside the dark box, labels beside it */
#content_container #stoplight_container{float:none;flex:1 1 280px;height:auto;padding:0}
#content_container #stoplight_container table,
#content_container #stoplight_container tbody,
#content_container #stoplight_container tr,
#content_container #stoplight_container td{display:block;width:auto;height:auto}
#content_container #stoplight_container table{position:relative;padding:8px 0}
#content_container #stoplight_container table::before{content:"";position:absolute;
  left:0;top:0;bottom:0;width:60px;background:#17161a;border-radius:16px}
#content_container #stoplight_container td{background:none}
#content_container #stoplight_container td a,
#content_container #stoplight_container td a:hover{position:relative;display:flex;align-items:center;
  gap:22px;height:auto;min-height:52px;padding:0!important;background:none;text-decoration:none}
#content_container #stoplight_container td a::before{content:"";flex:none;
  width:38px;height:38px;margin-left:11px;border-radius:50%;
  box-shadow:inset 0 -5px 9px rgba(0,0,0,.32),0 0 0 2px #000}
#content_container #stoplight_container #red_light a::before{background:#e8352e}
#content_container #stoplight_container #yellow_light a::before{background:#ffd400}
#content_container #stoplight_container #green_light a::before{background:#2fb344}
#content_container #stoplight_container .light_text{margin:0;
  font:700 17px/1.25 "DM Sans",Arial,sans-serif;color:#17161a}
#content_container #stoplight_container a:hover .light_text{color:#17161a;text-decoration:underline}

#content_container #profile_container{float:none;flex:0 1 240px;height:auto;padding:12px 14px;
  box-sizing:border-box;background:#f4efe2;border:2px solid #17161a;
  font:400 14px/1.5 "DM Sans",Arial,sans-serif;color:#17161a;overflow-wrap:anywhere}

/* the layout table that holds the progress bar and chapter list */
#content_container #aff_content > div[align="center"] > table,
#content_container #aff_content > div[align="center"] > table > tbody,
#content_container #aff_content > div[align="center"] > table > tbody > tr,
#content_container #aff_content > div[align="center"] > table > tbody > tr > td{
  display:block;width:auto;height:auto;padding:0}
#content_container #aff_content > div[align="center"] > table{max-width:760px;margin:0 auto}
#content_container #aff_content > div[align="center"] > table > tbody > tr > td:empty,
#content_container #aff_content > div[align="center"] > table > tbody > tr > td[width="174"]{display:none}

/* progress */
#content_container #prog_per{margin:8px 0 6px;text-align:center;
  font:800 24px/1.1 "Bricolage Grotesque",Arial,sans-serif;color:#17161a}
#content_container #prog_per::after{content:" complete";
  font:600 14px/1 "DM Sans",Arial,sans-serif;color:#5b5762}
#content_container #prog_bar{width:606px;max-width:100%;margin:0 auto 16px;padding:0;
  overflow:hidden;background:#ffffff;border:2px solid #17161a}
#content_container #prog_bar > div{margin:0!important;background:#e8352e!important} /* was centred */
@media (max-width:680px){
  /* the page prints the bar in fixed pixels; on a narrow screen the number is the honest reading */
  #content_container #prog_bar{display:none}
  #content_container #prog_per{margin-bottom:14px}
}

/* chapter list */
#content_container #menu_table{width:100%!important;border-collapse:collapse;
  background:#ffffff;border:3px solid #17161a;font-family:"DM Sans",Arial,sans-serif}
#content_container #menu_table td{width:auto;padding:11px 12px!important;
  font-size:15px!important;line-height:1.35;color:#17161a!important;text-align:left;
  vertical-align:middle;background:#ffffff;border:0;border-bottom:1px solid #d8d0bd}
#content_container #menu_table tr:nth-child(odd) td{background:#faf7ee}
#content_container #menu_table tr.menu_header td{padding:10px 12px!important;
  background:#17161a;color:#ffffff!important;border:0;
  font:700 12px/1 "Space Grotesk","DM Sans",Arial,sans-serif!important;
  letter-spacing:.12em;text-transform:uppercase}
#content_container #menu_table td:nth-child(1){white-space:nowrap;font-weight:700}
#content_container #menu_table td:nth-child(3),
#content_container #menu_table td:nth-child(4){text-align:center;white-space:nowrap}
#content_container #menu_table font{font-size:inherit;color:inherit}
#content_container #menu_table ul{margin:0;padding:0;list-style:none}
#content_container #menu_table .sections{font-size:15px;color:#17161a;font-weight:400}
#content_container #menu_table .sections b{font-weight:600}
#content_container #menu_table .sections a{display:inline-block;padding:3px 0;
  color:#17161a;text-decoration:underline}
#content_container #menu_table .sections a:hover{color:#0889b3}
#content_container #menu_table img{max-width:100%;height:auto;margin:0}

/* status: a plain label in place of the stamp picture */
@supports selector(:has(*)){
  #content_container #menu_table td:nth-child(3):has(img) img{display:none}
  #content_container #menu_table td:nth-child(3):has(img)::after{display:inline-block;
    padding:5px 9px;border:2px solid #17161a;background:#ffffff;
    font:700 11px/1 "Space Grotesk","DM Sans",Arial,sans-serif;letter-spacing:.08em;
    text-transform:uppercase;color:#17161a;content:"Incomplete"}
  #content_container #menu_table td:nth-child(3):has(img[src$="/complete.jpg"])::after{
    content:"Done";background:#bfe8c6}
}

/* Final Test row */
#content_container #aff_content .menu_footer{width:100%!important;border-collapse:collapse;
  background:#f4efe2;border:3px solid #17161a;border-top:0}
#content_container #aff_content .menu_footer td{padding:13px 12px!important;border:0;
  font:700 16px/1.2 "DM Sans",Arial,sans-serif}
#content_container #aff_content .menu_footer a{color:#17161a;text-decoration:underline}

@media (max-width:620px){
  #content_container #menu_header{padding:14px;box-shadow:4px 4px 0 #17161a}
  #content_container #profile_container{flex:1 1 100%}
  #content_container #menu_table td{padding:10px 6px!important;font-size:14px!important}
  #content_container #menu_table tr.menu_header td{padding:9px 6px!important;
    font-size:10px!important;letter-spacing:.06em}
  #content_container #menu_table td:nth-child(1){white-space:normal}
  #content_container #menu_table .sections{font-size:14px}
}

/* chapter review pop-up: fills the screen instead of a fixed 890px box */
@media (max-width:940px){
  #content_container #chapreview{position:fixed;top:0;left:0;right:0;bottom:0;z-index:60;
    width:auto;height:auto;margin:0;background:#ffffff}
  #content_container #chapreview #reviewbar{width:auto;height:46px;padding:0 16px;
    box-sizing:border-box;font-size:22px;line-height:44px;background:#17161a;border:0}
  #content_container #chapreview #reviewbar a{display:inline-block;min-width:44px;
    color:#ffffff;text-align:center}
  #content_container #chapreview iframe{display:block;width:100%;height:calc(100% - 46px);border:0}
}

/* ============================ CHANGE PROFILE ============================ */
/* page.php?template=change_reg has no ids; its wrapper is the 575px inline div */
#content_container #aff_content div[style*="575px"]{float:none!important;width:auto!important;
  max-width:575px;margin:0 auto;font-family:"DM Sans",Arial,sans-serif;color:#17161a}
#content_container #aff_content div[style*="575px"] table{width:100%;border-collapse:collapse}
#content_container #aff_content div[style*="575px"] tr{height:auto}
#content_container #aff_content div[style*="575px"] td{padding:7px 10px 7px 0;
  vertical-align:middle;text-align:left}
#content_container #aff_content div[style*="575px"] td p{margin:0;line-height:1.3;font-size:15px}
#content_container #aff_content div[style*="575px"] font{font-family:"DM Sans",Arial,sans-serif}
#content_container #aff_content div[style*="575px"] font[size="3"]{font-size:15px}
#content_container #aff_content div[style*="575px"] font[size="2"]{font-size:16px;color:#17161a}
#content_container #aff_content div[style*="575px"] font[size="1"]{font-size:12px;color:#5b5762}
#content_container #aff_content div[style*="575px"] input[type="text"],
#content_container #aff_content div[style*="575px"] select{min-height:44px;max-width:100%;
  padding:8px 10px;box-sizing:border-box;background:#ffffff;color:#17161a;
  border:2px solid #17161a;border-radius:0;
  font:400 16px/1.2 "DM Sans",Arial,sans-serif}                    /* 16px: no iOS zoom */
#content_container #aff_content div[style*="575px"] input[type="text"]{width:100%}
#content_container #aff_content div[style*="575px"] input[type="text"]:focus,
#content_container #aff_content div[style*="575px"] select:focus{outline:3px solid #0aa6d8;outline-offset:1px}
#content_container #aff_content div[style*="575px"] input[type="submit"],
#content_container #aff_content div[style*="575px"] input[type="button"]{min-height:50px;
  margin:10px 8px 0 0;padding:0 26px;cursor:pointer;border:3px solid #17161a;border-radius:0;
  font:700 17px/1 "Bricolage Grotesque",Arial,sans-serif;-webkit-appearance:none;appearance:none}
#content_container #aff_content div[style*="575px"] input[type="submit"]{background:#0aa6d8;
  color:#ffffff;box-shadow:5px 5px 0 #17161a}
#content_container #aff_content div[style*="575px"] input[type="button"]{background:#ffffff;color:#17161a}
#content_container #aff_content div[style*="575px"] a[href="home.php"]{display:inline-block;
  padding:10px 16px;background:#ffffff;color:#17161a;border:2px solid #17161a;
  font:700 15px/1 "DM Sans",Arial,sans-serif;text-decoration:none}
#content_container #aff_content div[style*="575px"] a[href="home.php"]::before{content:"\2190\00a0"}
#content_container #aff_content div[style*="575px"] td > br{display:none}

@media (max-width:620px){
  /* each row: label on its own line, fields under it */
  #content_container #aff_content div[style*="575px"] table,
  #content_container #aff_content div[style*="575px"] tbody{display:block;width:auto}
  #content_container #aff_content div[style*="575px"] tr{display:flex;flex-wrap:wrap;
    gap:4px 10px;margin:0 0 14px}
  #content_container #aff_content div[style*="575px"] tr:first-child{display:none}   /* spacer row */
  #content_container #aff_content div[style*="575px"] td{display:block;flex:1 1 0;min-width:0;padding:0}
  #content_container #aff_content div[style*="575px"] td:first-of-type{flex:0 0 100%}
  #content_container #aff_content div[style*="575px"] select{width:100%}
  #content_container #aff_content div[style*="575px"] input[type="submit"],
  #content_container #aff_content div[style*="575px"] input[type="button"]{width:100%;margin:10px 0 0}
}

/* ---- fixes found in testing (BUILD B) ---- */
/* global.css gives every .content a fixed 860px width; chapter paragraphs carry that class */
#content_container #content_chapter_container p.content,
#content_container #content_chapter_container .content{width:auto;max-width:100%;
  background:none;border:0}
/* chapters.css (loaded later) removes the side padding of the page on chapter pages */
@media (max-width:900px){
  html body #content_container{padding-left:16px;padding-right:16px;box-sizing:border-box;text-align:left}
}
/* tables inside a chapter (for example the alcohol chart) */
#content_container #content_chapter_container table{max-width:100%;border-collapse:collapse}
#content_container #content_chapter_container table td{width:auto;padding:7px 9px;
  font:400 15px/1.4 "DM Sans",Arial,sans-serif;text-align:left}
@media (max-width:620px){
  #content_container #content_chapter_container div[align="center"] > table{display:block;overflow-x:auto}
  #content_container #content_chapter_container table td{padding:6px 6px;font-size:14px}
}
/* small phones: each chapter becomes a two-line row (chapter / status / minutes, then sections) */
@media (max-width:480px){
  #content_container #menu_table,
  #content_container #menu_table tbody{display:block}
  #content_container #menu_table tr{display:grid;grid-template-columns:1fr auto auto;
    align-items:center;border-bottom:1px solid #d8d0bd}
  #content_container #menu_table td{display:block;border:0;padding:9px 8px 3px!important}
  #content_container #menu_table td:nth-child(1){grid-column:1;grid-row:1;white-space:nowrap}
  #content_container #menu_table td:nth-child(3){grid-column:2;grid-row:1}
  #content_container #menu_table td:nth-child(4){grid-column:3;grid-row:1;min-width:76px}
  #content_container #menu_table td:nth-child(2){grid-column:1 / -1;grid-row:2;
    padding:0 8px 10px!important}
  #content_container #menu_table tr.menu_header td{padding:9px 8px!important}
  #content_container #menu_table tr.menu_header td:nth-child(2){display:none}
}
/* the countdown text arrives one second after the page opens; show a placeholder until then */
#content_container #Timer #TimerText:empty::before{content:"Time Left: --:--"}
/* keep the three text-size buttons together on one line */
#content_container #dock .dock_content:last-child{display:flex;align-items:center;gap:6px;text-align:left}
#content_container #dock .dock_content:last-child a{flex:none;margin:0}
/* global.css centres every element with auto margins; keep the two end-of-chapter buttons together */
#content_container #course-footer-links a{margin:0;box-sizing:border-box}
