/* =========================================================
   Book Units Teacher: shared novel study styles
   Used by every novel. Each page sets its own theme colors
   in a small <style> block at the top (see --nv-* below).
   Everything is scoped under .nv so the site's Bootstrap /
   Freelancer styles (nav and footer) are left alone.
   ========================================================= */

:root {
  /* Fallback theme. Each novel overrides these in its own page head. */
  --nv-theme: #1a7f6e;        /* main color: buttons, accents */
  --nv-theme-ink: #125c50;    /* darker main color for text on the tint */
  --nv-tint: #e3f1ee;         /* light tint: bands, card fronts */
  --nv-paper: #fbfcfb;        /* page background */
  --nv-ink: #26302e;          /* body text */
  --nv-display: 'Montserrat', Arial, sans-serif; /* title face */

  --nv-right: #2e7a4b;
  --nv-wrong: #b3261e;
  --nv-line: rgba(0, 0, 0, .14);
  --nv-nav-offset: 145px;     /* starting guess; novel.js measures the real menu height */
}

.nv {
  background: var(--nv-paper);
  color: var(--nv-ink);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  padding-top: var(--nv-nav-offset);
}
.nv h1, .nv h2, .nv h3, .nv h4 {
  font-family: 'Montserrat', Arial, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  color: var(--nv-ink);
  line-height: 1.15;
  margin: 0;
}
.nv p { margin: 0 0 1rem; }
.nv a { color: var(--nv-theme-ink); }
.nv img { max-width: 100%; height: auto; display: block; }

.nv-wrap { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.nv-narrow { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.nv-narrow > * { max-width: 820px; }
.nv-narrow > .nv-quiz[data-mode="one"] { max-width: none; }

section.nv-sec { padding: 3.5rem 0; }
.nv-sec > .nv-wrap > h2,
.nv-sec > .nv-narrow > h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .5rem; }
.nv-lede.is-center { text-align: center; margin-inline: auto; }
.nv-lede { color: color-mix(in srgb, var(--nv-ink) 80%, white); max-width: 60ch; }

/* ---------- focus + buttons ---------- */
.nv :focus-visible { outline: 3px solid var(--nv-theme); outline-offset: 3px; }

.nv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 700 1rem/1.2 'Montserrat', Arial, sans-serif;
  padding: .8rem 1.3rem; border-radius: 6px; border: 2px solid var(--nv-theme);
  background: var(--nv-theme); color: #fff; text-decoration: none; cursor: pointer;
}
.nv a.nv-btn { color: #fff; }
.nv-btn:hover { background: var(--nv-theme-ink); border-color: var(--nv-theme-ink); text-decoration: none; }
.nv-btn.is-quiet, .nv a.nv-btn.is-quiet { background: transparent; color: var(--nv-theme-ink); }
.nv-btn.is-quiet:hover { background: var(--nv-tint); }
.nv-btn[disabled] { opacity: .4; cursor: default; }

/* ---------- novel bar (breadcrumb under the site nav) ---------- */
.nv-bar { border-bottom: 1px solid var(--nv-line); background: #fff; font-size: .95rem; }
.nv-bar .nv-wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; padding: .7rem 0; }
.nv-bar ol { list-style: none; display: flex; gap: .4rem; margin: 0; padding: 0; }
.nv-bar li + li::before { content: "/"; margin-right: .4rem; color: #888; }
.nv-bar a { font-weight: 700; text-decoration: none; }
.nv-bar a:hover { text-decoration: underline; }
.nv-bar .nv-bar-links { display: flex; gap: 1.25rem; }

/* =========================================================
   Novel home page
   ========================================================= */
.nv-hero { background: var(--nv-tint); padding: 3rem 0 3.5rem; }
.nv-hero .nv-wrap { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .nv-hero .nv-wrap { grid-template-columns: 1.05fr 1fr; } }
.nv-hero h1 {
  font-family: var(--nv-display); font-weight: 400;
  font-size: clamp(4rem, 11vw, 8.5rem); line-height: .9; color: var(--nv-theme);
}
.nv-hero .nv-byline { font-size: 1.15rem; font-weight: 700; margin: .75rem 0 1.25rem; color: var(--nv-theme-ink); }
.nv-hero p.nv-intro { max-width: 52ch; }
.nv-hero .nv-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.nv-hero figure { margin: 0; }
.nv-hero figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; box-shadow: 10px 10px 0 var(--nv-theme); }

/* lesson grid: thumbnail + stenciled lesson number */
.nv-lessons { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 2rem 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.nv-lessons a { display: block; text-decoration: none; color: var(--nv-ink); }
.nv-lessons .nv-thumb { position: relative; }
.nv-lessons img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; transition: transform .15s ease; }
.nv-lessons .nv-num {
  position: absolute; left: -.35rem; bottom: -1.1rem;
  font-family: var(--nv-display); font-size: 2.6rem; line-height: 1; color: var(--nv-theme);
  background: var(--nv-paper); padding: .1rem .5rem .05rem; border-radius: 4px;
}
.nv-lessons .nv-ch { display: block; font-weight: 700; margin-top: 1.4rem; font-size: 1.05rem; }
.nv-lessons .nv-pg { display: block; font-size: .95rem; color: #5b5b5b; }
.nv-lessons a:hover .nv-ch { color: var(--nv-theme-ink); text-decoration: underline; }
.nv-lessons a:hover img { transform: translateY(-3px); }

/* vocabulary + unit links */
.nv-links { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 1.5rem; }
.nv-link { border-left: 6px solid var(--nv-theme); background: #fff; padding: 1.1rem 1.25rem; }
.nv-link h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.nv-link h3 a { text-decoration: none; }
.nv-link h3 a:hover { text-decoration: underline; }
.nv-link p { margin: 0; font-size: 1rem; }

/* =========================================================
   Lesson page
   ========================================================= */
.nv-lesson-head { background: var(--nv-tint); padding: 2.5rem 0 3rem; }
.nv-lesson-head .nv-wrap { display: grid; gap: 2rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .nv-lesson-head .nv-wrap { grid-template-columns: 1fr 1.15fr; } }
.nv-lesson-head h1 { display: flex; flex-direction: column; gap: .4rem; }
.nv-lesson-head .nv-h1-lesson {
  font-family: var(--nv-display); font-weight: 400;
  font-size: clamp(3.4rem, 8vw, 6rem); line-height: .9; color: var(--nv-theme);
}
.nv-lesson-head .nv-h1-ch { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; }
.nv-lesson-head .nv-h1-book { font-size: 1.1rem; font-weight: 700; color: var(--nv-theme-ink); order: -1; }
.nv-lesson-head .nv-pages { margin: .9rem 0 0; font-size: 1.1rem; }
.nv-lesson-head figure { margin: 0; }
.nv-lesson-head figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; box-shadow: 10px 10px 0 var(--nv-theme); }

/* ---------- key word flip cards ---------- */
.nv-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: 1.5rem; }
.nv-cards > .nv-flip { flex: 0 1 300px; }
.nv-flip {
  display: block; width: 100%; min-height: 300px; padding: 0; border: 0; background: none;
  perspective: 1200px; cursor: pointer; font: inherit; color: inherit; text-align: left;
}
.nv-flip-inner {
  display: grid; position: relative; min-height: 300px; transition: transform .5s ease; transform-style: preserve-3d;
}
.nv-flip[aria-pressed="true"] .nv-flip-inner { transform: rotateY(180deg); }
.nv-flip-front, .nv-flip-back {
  grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center;
  padding: 1.5rem 1.4rem; border-radius: 6px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.nv-flip-front { background: var(--nv-tint); border: 2px solid var(--nv-theme); align-items: center; text-align: center; }
.nv-flip-back { background: #fff; border: 2px solid var(--nv-theme); transform: rotateY(180deg); }
.nv-flip-word { display: block; font-size: 1.9rem; font-weight: 700; color: var(--nv-ink); }
.nv-flip-pos { display: block; font-style: italic; margin-top: .3rem; color: var(--nv-theme-ink); }
.nv-flip-hint { display: block; margin-top: 1.6rem; font-size: .9rem; color: #666; }
.nv-flip-def { display: block; font-size: 1.15rem; font-weight: 700; margin-bottom: .9rem; }
.nv-flip-ex { display: block; font-size: 1rem; border-left: 3px solid var(--nv-theme); padding-left: .8rem; }
.nv-flip-ex strong { color: var(--nv-theme-ink); }
.nv-flip-page { display: block; font-size: .85rem; margin-top: .6rem; color: #666; }
@media (prefers-reduced-motion: reduce) { .nv-flip-inner { transition: none; } }

/* ---------- prev / next ---------- */
.nv-pager { border-top: 1px solid var(--nv-line); padding: 2rem 0 3rem; }
.nv-pager .nv-wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.nv-pager a { display: flex; flex-direction: column; text-decoration: none; padding: .9rem 1.2rem; border: 2px solid var(--nv-theme); border-radius: 6px; min-width: 220px; }
.nv-pager a:hover { background: var(--nv-tint); }
.nv-pager .nv-pager-dir { font-size: .9rem; color: #5b5b5b; }
.nv-pager .nv-pager-title { font-weight: 700; color: var(--nv-theme-ink); }
.nv-pager .is-next { text-align: right; margin-left: auto; }

/* =========================================================
   Quiz (built by novel.js)
   ========================================================= */
.nv-quiz { margin-top: 1.5rem; scroll-margin-top: calc(var(--nv-nav-offset) + 1rem); }
.nv-qbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
.nv-toggle { display: inline-flex; border: 2px solid var(--nv-theme); border-radius: 6px; overflow: hidden; }
.nv-toggle button { font: 700 1rem 'Montserrat', Arial, sans-serif; padding: .65rem 1.1rem; border: 0; background: #fff; color: var(--nv-theme-ink); cursor: pointer; }
.nv-toggle button[aria-pressed="true"] { background: var(--nv-theme); color: #fff; }
.nv-qhint { font-size: .95rem; color: #5b5b5b; margin: 0; }

.nv-qlist { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.nv-q { padding: 1.5rem 0 1.75rem; border-top: 1px solid var(--nv-line); }
.nv-q-num { font-weight: 700; color: var(--nv-theme-ink); font-size: .95rem; margin-bottom: .35rem; }
.nv-q-prompt { font-size: 1.2rem; font-weight: 700; margin-bottom: .9rem; }
.nv-q-context { margin: 0 0 1rem; padding: .8rem 1rem; background: var(--nv-tint); border-radius: 4px; list-style: none; }
.nv-q-context li + li { margin-top: .35rem; }

.nv-opts { display: grid; gap: .6rem; }
.nv-opt {
  display: flex; gap: .75rem; align-items: flex-start; margin: 0;
  padding: .75rem 1rem; border: 2px solid var(--nv-line); border-radius: 6px; background: #fff; cursor: pointer; font-weight: 400;
}
.nv-opt:hover { border-color: var(--nv-theme); }
.nv-opt input { margin-top: .35rem; width: 1.1rem; height: 1.1rem; accent-color: var(--nv-theme); flex: none; }
.nv-opt:has(input:checked) { border-color: var(--nv-theme); background: var(--nv-tint); }

/* typed answers */
.nv-blanks { display: grid; gap: .7rem; }
.nv-blank { display: flex; gap: .8rem; align-items: center; margin: 0; font-weight: 400; }
.nv-blank input {
  width: 3.2rem; text-align: center; font: 700 1.2rem 'Montserrat', Arial, sans-serif; padding: .35rem;
  border: 2px solid var(--nv-theme); border-radius: 4px; flex: none;
}
.nv-key { display: none; font-weight: 700; color: var(--nv-right); margin-left: .25rem; }

/* tap-to-order, match, sort: shared chip style */
.nv-chip {
  display: flex; gap: .7rem; align-items: center; width: 100%; text-align: left;
  font: 400 1.05rem/1.4 'Montserrat', Arial, sans-serif; color: var(--nv-ink);
  padding: .7rem 1rem; border: 2px solid var(--nv-line); border-radius: 6px; background: #fff; cursor: pointer;
}
.nv-chip:hover { border-color: var(--nv-theme); }
.nv-chip.is-selected { border-color: var(--nv-theme); background: var(--nv-tint); box-shadow: inset 0 0 0 2px var(--nv-theme); }
.nv-badge {
  flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  border: 2px dashed var(--nv-line); font-weight: 700; color: #fff;
}
.nv-chip .nv-badge.is-set { background: var(--nv-theme); border: 2px solid var(--nv-theme); }
.nv-order { display: grid; gap: .55rem; }
.nv-tools { margin-top: .75rem; }
.nv-tools button { font: 700 .95rem 'Montserrat', Arial, sans-serif; background: none; border: 0; color: var(--nv-theme-ink); text-decoration: underline; cursor: pointer; padding: .25rem 0; }

.nv-match { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.nv-match-col { display: grid; gap: .55rem; align-content: start; }

.nv-sort-pool { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 3.2rem; padding: .6rem; border: 2px dashed var(--nv-line); border-radius: 6px; margin-bottom: .9rem; }
.nv-sort-pool .nv-chip, .nv-sort-box .nv-chip { width: auto; }
.nv-sort-boxes { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.nv-sort-box { border: 2px solid var(--nv-theme); border-radius: 6px; padding: .6rem; min-height: 8rem; background: #fff; }
.nv-sort-box > button.nv-sort-target {
  display: block; width: 100%; font: 700 1.05rem 'Montserrat', Arial, sans-serif; background: var(--nv-tint);
  color: var(--nv-theme-ink); border: 0; border-radius: 4px; padding: .5rem; margin-bottom: .5rem; cursor: pointer;
}
.nv-sort-box .nv-sort-items { display: flex; flex-wrap: wrap; gap: .5rem; }

/* marking after Check */
.nv-mark { display: none; margin-top: .9rem; font-weight: 700; }
.nv-q.is-right .nv-mark, .nv-q.is-wrong .nv-mark { display: block; }
.nv-q.is-right .nv-mark { color: var(--nv-right); }
.nv-q.is-wrong .nv-mark { color: var(--nv-wrong); }
.nv-q.is-wrong .nv-opt:has(input:checked) { border-color: var(--nv-wrong); background: #fbeceb; }
.nv-q.is-right .nv-opt:has(input:checked) { border-color: var(--nv-right); background: #e8f3ec; }
.nv-blank input.is-right { border-color: var(--nv-right); background: #e8f3ec; }
.nv-blank input.is-wrong { border-color: var(--nv-wrong); background: #fbeceb; }

/* reveal (one-at-a-time mode) */
.nv-reveal-btn { margin-top: 1.25rem; }
.nv-answer { display: none; margin-top: 1rem; padding: .9rem 1.1rem; border-left: 6px solid var(--nv-right); background: #e8f3ec; }
.nv-answer ol, .nv-answer ul { margin: .3rem 0 0; padding-left: 1.4rem; }
.nv-q.is-revealed .nv-answer { display: block; }
.nv-q.is-revealed .nv-answer:empty { display: none; }
.nv-q.is-revealed .nv-opt.is-answer > span::after { content: "  ✓"; color: var(--nv-right); font-weight: 700; }
.nv-q.is-revealed .nv-opt.is-answer { border-color: var(--nv-right); background: #e8f3ec; box-shadow: inset 0 0 0 2px var(--nv-right); }
.nv-q.is-revealed .nv-key { display: inline; }

.nv-qfoot { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; padding-top: 1.5rem; border-top: 1px solid var(--nv-line); }
.nv-score { font-size: 1.3rem; font-weight: 700; margin: 0; }

/* ---------- mode: all questions ---------- */
.nv-quiz[data-mode="all"] .nv-reveal-btn,
.nv-quiz[data-mode="all"] .nv-present-nav { display: none; }

/* ---------- mode: one at a time (SmartBoard) ---------- */
.nv-quiz[data-mode="one"] .nv-qfoot { display: none; }
.nv-quiz[data-mode="one"] .nv-q { display: none; border-top: 0; padding-top: 0; }
.nv-quiz[data-mode="one"] .nv-q.is-current { display: block; }
.nv-quiz[data-mode="one"] .nv-mark { display: none; }
.nv-quiz[data-mode="one"] .nv-q-prompt { font-size: clamp(1.5rem, 2.9vw, 2.6rem); line-height: 1.3; }
.nv-quiz[data-mode="one"] .nv-q-num { font-size: clamp(1rem, 1.6vw, 1.35rem); }
.nv-quiz[data-mode="one"] .nv-opt,
.nv-quiz[data-mode="one"] .nv-chip,
.nv-quiz[data-mode="one"] .nv-blank,
.nv-quiz[data-mode="one"] .nv-q-context,
.nv-quiz[data-mode="one"] .nv-answer { font-size: clamp(1.2rem, 2.3vw, 2rem); }
.nv-quiz[data-mode="one"] .nv-opt input { width: 1.5rem; height: 1.5rem; margin-top: .4em; }
.nv-quiz[data-mode="one"] .nv-blank input { font-size: clamp(1.3rem, 2.3vw, 2rem); width: 4.5rem; }
.nv-quiz[data-mode="one"] .nv-stage { min-height: 60vh; padding: 1.5rem 0; }

.nv-present-nav { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding-top: 1.25rem; border-top: 1px solid var(--nv-line); }
.nv-present-nav .nv-count { font-weight: 700; font-size: 1.15rem; }
.nv-present-nav .nv-group { display: flex; gap: .75rem; }

/* full screen for the SmartBoard */
.nv-quiz:fullscreen { background: var(--nv-paper); padding: 2.5rem 4vw; overflow: auto; }
.nv-quiz:fullscreen .nv-stage { min-height: 72vh; }
.nv-quiz:fullscreen .nv-present-nav { position: sticky; bottom: 0; background: var(--nv-paper); padding-bottom: 1rem; }

@media (max-width: 600px) {
  .nv { font-size: 1.05rem; }
  .nv-match { grid-template-columns: 1fr; }
  .nv-pager a { min-width: 0; width: 100%; }
  .nv-pager .is-next { text-align: left; }
}

/* key words heading centered over the centered cards */
.nv-words h2, .nv-words .nv-lede { text-align: center; margin-inline: auto; }

/* lists inside a question (graphic organizers, recipes) */
.nv-inline-list { font-weight: 400; margin: .6rem 0; padding-left: 1.5rem; }
.nv-inline-list li + li { margin-top: .2rem; }

/* placeholder text Gay needs to replace before publishing */
.nv-paste { background: #fff3a8; color: #6b4e00; padding: 0 .3rem; }

/* vocabulary game pages: title beside the how-to-play box */
.nv-games-head .nv-howto { background: #fff; border-left: 6px solid var(--nv-theme); padding: 1.25rem 1.5rem; font-size: 1rem; }
.nv-games-head .nv-howto p, .nv-games-head .nv-howto li { font-size: 1rem !important; line-height: 1.55 !important; text-align: left; }
.nv-games-head .nv-howto ul { margin: .4rem 0 .8rem; padding-left: 1.2rem; }
.nv-games-head .nv-howto h4 { font-size: 1.05rem; margin: .4rem 0 .2rem; text-align: left; }
.nv-games-head .nv-h1-lesson { font-size: clamp(2.8rem, 6vw, 4.5rem); }

/* =========================================================
   Site footer (copied from /styles/site.css, section 16, so
   the shared footer include looks the same on these pages)
   ========================================================= */
.site-footer {
  background-color: #323a49; color: #ffffff;
  font-family: 'Montserrat', sans-serif; font-size: 1rem; padding: 4rem 0 2rem;
}
.footer-heading {
  font-family: 'Montserrat', sans-serif; font-weight: 700; text-transform: uppercase;
  margin-bottom: 1.25rem; color: #ffffff; font-size: 1.5rem;
}
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 0.4rem; }
.footer-list a { color: #ffffff; text-decoration: none; transition: color 0.2s; }
.footer-list a:hover { color: #1dbb9d; }
.footer-search .input-group { flex-wrap: nowrap; }
.footer-search .form-control { background-color: transparent; border-color: rgba(255,255,255,0.4); color: #ffffff; }
.footer-search .form-control::placeholder { color: rgba(255,255,255,0.55); }
.footer-search .btn { border: 1px solid rgba(255,255,255,0.4); color: #ffffff; background-color: transparent; padding: 0.375rem 0.75rem; }
.footer-search .btn:hover { background-color: #ffffff; color: #323a49; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 0.5rem; justify-content: center; }
.footer-social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5); color: #ffffff; font-size: 1.1rem;
  text-decoration: none; transition: border-color 0.2s, color 0.2s;
}
.footer-social-icon:hover { border-color: #1dbb9d; color: #1dbb9d; text-decoration: none; }
.footer-logo { max-height: 80px; width: auto; }
.copyright-bar {
  background-color: #1a252f; color: #ffffff; font-family: 'Montserrat', sans-serif;
  text-align: center; padding: 1rem 0; font-size: 0.95rem;
}

/* attempt number + date/time under the score (for screenshot grading) */
.nv-score .nv-attempt { display: block; font-size: .95rem; font-weight: 400; color: #5b5b5b; margin-top: .2rem; }
