/* ==========================================================================
   Teach me mode (the guide beside the mock exam).
   Everything is scoped to .tg- classes, so nothing here can change the look
   of the page, the practice computer or the mock exam.

   Made to be calm and easy to read: a cream background instead of white,
   dark grey instead of black, large text with room between the lines, text
   lined up on the left, no italics, no capitals for emphasis, no red.
   ========================================================================== */
.tg-root, .tg-sidewrap, .tg-ring, .tg-ghost {
  --tg-bg: #fbf6e9; --tg-card: #fffdf7; --tg-ink: #1f2933; --tg-soft: #4a5565; --tg-line: #d8cfb8;
  --tg-blue: #2e6db4; --tg-blue-wash: #e3eefa; --tg-good: #2e7d4f; --tg-good-wash: #dcedd9;
  --tg-notyet: #8f5200; --tg-notyet-wash: #fce9d2; --tg-point: #7c3aed; --tg-read: #fff1a8;
  color-scheme: light;
}
.tg-full, .tg-side { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 17px; line-height: 1.65; letter-spacing: .01em; word-spacing: .05em; color: var(--tg-ink); text-align: left; }
.tg-full.tg-big, .tg-side.tg-big { font-size: 20px; }
.tg-full *, .tg-side * { box-sizing: border-box; }
.tg-full p, .tg-side p { margin: 0 0 12px; }
.tg-grow { flex: 1 1 auto; }

/* ---- Whole-screen pages: the menu and the questions --------------------- */
.tg-full { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--tg-bg); }
.tg-top { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 18px; background: #24415f; color: #fff; }
.tg-top b { font-size: 16px; }
.tg-scrollpage { flex: 1 1 auto; min-height: 0; overflow: auto; }
.tg-main { max-width: 780px; margin: 0 auto; padding: 26px 22px 60px; }
.tg-main h1 { font-size: 1.55em; line-height: 1.3; margin: 0 0 10px; }
.tg-main h2 { font-size: 1.15em; margin: 30px 0 4px; }
.tg-lede { font-size: 1.05em; }
.tg-small { font-size: .88em; color: var(--tg-soft); }
.tg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; }
.tg-nav { margin-top: 26px; justify-content: space-between; }

/* buttons */
.tg-btn { font: inherit; font-weight: bold; color: #fff; background: var(--tg-blue); border: 2px solid var(--tg-blue); border-radius: 10px; padding: 9px 18px; min-height: 46px; cursor: pointer; text-align: center; }
.tg-btn:hover { background: #245a96; border-color: #245a96; }
.tg-btn.quiet { background: var(--tg-card); color: var(--tg-blue); }
.tg-btn.quiet:hover { background: var(--tg-blue-wash); }
.tg-btn.small { min-height: 38px; padding: 5px 12px; font-size: .88em; }
.tg-btn.bar { background: transparent; border-color: #fff; color: #fff; min-height: 36px; padding: 4px 14px; font-size: 14px; }
.tg-btn.bar:hover { background: rgba(255, 255, 255, .16); }
.tg-btn:disabled { opacity: .4; cursor: default; }
.tg-btn:focus-visible, .tg-tool:focus-visible, .tg-opt:focus-visible, .tg-part:focus-visible, .tg-answer:focus-visible, .tg-select:focus-visible { outline: 3px solid var(--tg-point); outline-offset: 2px; }
.tg-select { font: inherit; font-size: .92em; color: var(--tg-ink); background: var(--tg-card); border: 2px solid var(--tg-line); border-radius: 8px; padding: 6px 8px; min-height: 40px; max-width: 100%; }

/* voice and text tools */
.tg-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tg-tool { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .82em; font-weight: bold; color: var(--tg-ink); background: var(--tg-card); border: 2px solid var(--tg-line); border-radius: 999px; padding: 4px 12px; min-height: 38px; cursor: pointer; }
.tg-tool svg { flex: 0 0 auto; }
.tg-tool:hover { border-color: var(--tg-blue); }
.tg-tool[aria-pressed="true"] { background: var(--tg-blue-wash); border-color: var(--tg-blue); }

/* choices on the menu */
.tg-opts, .tg-parts { display: grid; gap: 10px; margin: 10px 0 0; }
.tg-opt, .tg-part { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--tg-card); border: 2px solid var(--tg-line); border-radius: 12px; padding: 13px 16px; cursor: pointer; }
.tg-opt:hover, .tg-part:hover { border-color: var(--tg-blue); }
.tg-opt b, .tg-part b { display: block; }
.tg-opt span span, .tg-part span span { display: block; font-size: .9em; color: var(--tg-soft); }
.tg-opt[aria-pressed="true"] { border-color: var(--tg-blue); background: var(--tg-blue-wash); }
.tg-dot { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 4px; border-radius: 50%; border: 2px solid #8a8f98; background: #fff; }
.tg-opt[aria-pressed="true"] .tg-dot { border-color: var(--tg-blue); background: var(--tg-blue); box-shadow: inset 0 0 0 3px #fff; }
.tg-part > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.tg-part em { flex: 0 0 auto; font-style: normal; font-size: .85em; color: var(--tg-soft); align-self: center; text-align: right; max-width: 34%; }
.tg-tick { flex: 0 0 auto; width: 28px; height: 28px; margin-top: 2px; border-radius: 50%; border: 2px solid #8a8f98; background: #fff; display: grid; place-items: center; color: #fff; }
.tg-part.done .tg-tick { background: var(--tg-good); border-color: var(--tg-good); }
.tg-part.done { border-color: #a9cfa4; }
.tg-part.cur { border-color: var(--tg-blue); background: var(--tg-blue-wash); }
.tg-parts.small .tg-part { padding: 9px 12px; gap: 10px; }

/* what the marker would see */
.tg-marks { margin-top: 14px; }
.tg-mark { display: flex; gap: 12px; align-items: flex-start; padding: 8px 12px; border-left: 5px solid var(--tg-line); background: var(--tg-card); margin-bottom: 6px; border-radius: 0 8px 8px 0; font-size: .92em; }
.tg-mark .m { flex: 0 0 auto; min-width: 38px; font-weight: bold; }
.tg-mark.yes { border-left-color: var(--tg-good); }
.tg-mark.no, .tg-mark.part { border-left-color: #d9962f; }
.tg-mark .why { display: block; color: var(--tg-notyet); margin-top: 2px; }

/* ---- The questions ------------------------------------------------------- */
.tg-count { font-size: .88em; font-weight: bold; color: var(--tg-soft); margin: 18px 0 6px !important; }
.tg-pre { font-size: 1.05em; }
.tg-quest { font-size: 1.25em; font-weight: bold; line-height: 1.45; }
.tg-how { color: var(--tg-soft); }
.tg-answers { display: grid; gap: 12px; margin: 4px 0 0; }
.tg-answer { font: inherit; font-size: 1.05em; text-align: left; color: var(--tg-ink); background: var(--tg-card); border: 2px solid var(--tg-line); border-radius: 12px; padding: 12px 18px; min-height: 54px; cursor: pointer; }
.tg-answer:hover:not(:disabled) { border-color: var(--tg-blue); background: var(--tg-blue-wash); }
.tg-answer:disabled { cursor: default; color: var(--tg-soft); }
.tg-answer.tg-right, .tg-fig .hs.tg-right { border-color: var(--tg-good) !important; background: var(--tg-good-wash) !important; color: var(--tg-ink) !important; font-weight: bold; }
.tg-answer.tg-tried, .tg-fig .hs.tg-tried { border-color: #d9962f !important; background: var(--tg-notyet-wash) !important; }
.tg-fig { margin: 4px 0 0 !important; background: #fff; border: 2px solid var(--tg-line); border-radius: 12px; padding: 12px; color: #111; font-family: Arial, Helvetica, sans-serif; font-size: 15px; letter-spacing: 0; word-spacing: 0; line-height: 1.35; }
.tg-fig .hs:disabled { cursor: default; }
.tg-clue, .tg-fb { margin-top: 16px; border-radius: 12px; padding: 12px 16px; border: 2px solid var(--tg-line); background: var(--tg-card); }
.tg-clue b, .tg-fb b { display: block; margin-bottom: 2px; }
.tg-clue p, .tg-fb p { margin: 0; }
.tg-clue { border-color: #b8c7dd; background: var(--tg-blue-wash); }
.tg-fb.good { border-color: var(--tg-good); background: var(--tg-good-wash); }
.tg-fb.notyet { border-color: #d9962f; background: var(--tg-notyet-wash); }

/* ---- Words: what is being read, and what to type ------------------------- */
.tg-s { border-radius: 4px; }
.tg-reading { background: var(--tg-read); box-shadow: 0 0 0 3px var(--tg-read); }
.tg-answer .tg-reading { background: none; box-shadow: none; }
.tg-answer:has(.tg-reading) { border-color: #c9a400; background: var(--tg-read); }
.tg-type { font-family: Consolas, "Courier New", monospace; font-size: 1em; font-weight: bold; letter-spacing: .02em; word-spacing: 0; color: #12263f; background: #eef3fb; border: 1px solid #9fb3d1; border-radius: 6px; padding: 1px 7px; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }

/* ---- The guide beside the practice computer ------------------------------ */
.w11side.tg-sidewrap { flex-basis: 430px; }
@media (max-width: 1100px) { .w11side.tg-sidewrap { flex-basis: 350px; } }
.tg-side { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; background: var(--tg-bg); font-size: 16px; }
.tg-side.tg-big { font-size: 19px; }
.tg-head { flex: 0 0 auto; padding: 10px 14px 8px; border-bottom: 1px solid var(--tg-line); background: var(--tg-card); }
.tg-where b { display: block; font-size: 1.02em; }
.tg-where span { display: block; font-size: .84em; color: var(--tg-soft); }
.tg-dots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tg-dots i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #8a8f98; background: #fff; }
.tg-dots i.done { background: var(--tg-good); border-color: var(--tg-good); }
.tg-dots i.cur { box-shadow: 0 0 0 2px var(--tg-card), 0 0 0 4px var(--tg-blue); }
.tg-toolwrap { flex: 0 0 auto; padding: 7px 12px; border-bottom: 1px solid var(--tg-line); display: grid; gap: 6px; }
.tg-side .tg-tools { gap: 5px; }
.tg-side .tg-tool { font-size: 12.5px; padding: 2px 9px; min-height: 34px; gap: 4px; letter-spacing: 0; word-spacing: 0; }
.tg-side .tg-lvl .tg-select { min-height: 34px; padding: 3px 8px; }
.tg-lvl { display: flex; align-items: center; gap: 8px; font-size: .86em; font-weight: bold; }
.tg-lvl .tg-select { flex: 1 1 auto; min-width: 0; }
.tg-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px 14px 26px; position: relative; }
.tg-scroll h3, .tg-h { font-size: 1em; margin: 16px 0 6px; }
.tg-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--tg-line); background: var(--tg-card); }
.tg-foot .tg-btn { min-height: 42px; padding: 6px 16px; }

.tg-exam, .tg-wordbox, .tg-fold, .tg-tip { border: 1px solid var(--tg-line); border-radius: 10px; background: var(--tg-card); padding: 0 12px; margin: 0 0 10px; }
.tg-side summary { cursor: pointer; font-weight: bold; font-size: .9em; padding: 9px 0; color: var(--tg-soft); }
.tg-exam p { font-size: .9em; color: var(--tg-soft); }
.tg-plainbox { border: 2px solid #b8c7dd; border-radius: 12px; background: var(--tg-blue-wash); padding: 11px 14px; margin: 0 0 10px; }
.tg-plainbox b { display: block; font-size: .84em; color: #24415f; margin-bottom: 2px; }
.tg-plain { margin: 0 !important; font-size: 1.03em; }
.tg-kv { width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: .92em; }
.tg-kv th { text-align: left; font-weight: normal; color: var(--tg-soft); padding: 4px 8px 4px 0; vertical-align: top; width: 46%; }
.tg-kv td { padding: 4px 0; }
.tg-words { margin: 0 0 10px; font-size: .9em; }
.tg-words dt { font-weight: bold; margin-top: 6px; }
.tg-words dd { margin: 0; color: var(--tg-soft); }
.tg-fold { margin-top: 14px; }
.tg-fold .tg-about { padding-bottom: 4px; }

/* one step at a time */
.tg-step { border: 2px solid var(--tg-blue); border-radius: 14px; background: var(--tg-card); padding: 12px 14px 14px; }
.tg-stepno { font-size: .82em; font-weight: bold; color: var(--tg-blue); margin-bottom: 6px; }
.tg-say { font-size: 1.14em; line-height: 1.6; margin: 0 0 10px !important; }
.tg-step.needs .tg-say { opacity: .5; }
.tg-status { display: flex; align-items: center; gap: 6px; font-size: .84em; color: var(--tg-soft); margin: 0 !important; }
.tg-step.ok { border-color: var(--tg-good); background: var(--tg-good-wash); }
.tg-step.ok .tg-status { color: var(--tg-good); font-weight: bold; font-size: 1em; }
.tg-need { border: 2px solid var(--tg-point); border-radius: 10px; background: #f3edff; padding: 9px 12px; margin: 0 0 10px; }
.tg-need b { display: block; font-size: .84em; color: #4c1d95; }
.tg-need p { margin: 0; font-size: 1.05em; }
.tg-helpbox { margin-top: 12px; border-top: 1px dashed var(--tg-line); padding-top: 10px; font-size: .95em; }
.tg-notyet { color: var(--tg-notyet); font-weight: bold; }

/* the list of steps */
.tg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tg-list li { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--tg-line); border-radius: 10px; background: var(--tg-card); padding: 8px 10px; }
.tg-list li > div { flex: 1 1 auto; min-width: 0; }
.tg-list li p { margin: 0; }
.tg-num { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #8a8f98; background: #fff; display: grid; place-items: center; font-size: 13px; font-weight: bold; color: var(--tg-soft); }
.tg-list li.done { background: var(--tg-good-wash); border-color: #a9cfa4; color: var(--tg-soft); }
.tg-list li.done .tg-num { background: var(--tg-good); border-color: var(--tg-good); color: #fff; }
.tg-list li.cur { border: 2px solid var(--tg-blue); }
.tg-list li.cur .tg-num { border-color: var(--tg-blue); color: var(--tg-blue); }
.tg-list .tg-row { margin-top: 8px; gap: 6px; }
.tg-list .tg-need { margin: 8px 0 0; }
.tg-tip { margin: 8px 0 0; }
.tg-tip p { font-size: .92em; margin-bottom: 10px !important; }

.tg-donecard, .tg-unsure { border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; border: 2px solid var(--tg-good); background: var(--tg-good-wash); }
.tg-donecard b, .tg-unsure b { display: flex; align-items: center; gap: 8px; font-size: 1.1em; margin-bottom: 4px; }
.tg-donecard b svg { color: var(--tg-good); }
.tg-unsure { border-color: #d9962f; background: var(--tg-notyet-wash); }
.tg-donecard .tg-plain, .tg-unsure .tg-plain { font-size: 1em; }

/* ---- The pointer on the practice computer -------------------------------- */
.tg-ring { position: absolute; z-index: 9500; pointer-events: none; border: 4px solid var(--tg-point); border-radius: 10px; box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(124, 58, 237, .35); transition: left .12s, top .12s, width .12s, height .12s; }
.tg-ring span { position: absolute; left: -4px; bottom: calc(100% + 6px); background: var(--tg-point); color: #fff; font: bold 13px/1 Arial, Helvetica, sans-serif; padding: 5px 9px; border-radius: 7px; white-space: nowrap; box-shadow: 0 0 0 2px #fff; }
.tg-ring.low span { bottom: auto; top: calc(100% + 6px); }
@media (prefers-reduced-motion: no-preference) {
  .tg-ring { animation: tg-pulse 2.4s ease-in-out infinite; }
  @keyframes tg-pulse { 0%, 100% { box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(124, 58, 237, .35); } 50% { box-shadow: 0 0 0 3px #fff, 0 0 0 11px rgba(124, 58, 237, .18); } }
}
@media (prefers-reduced-motion: reduce) { .tg-ring { transition: none; } }
/* ---- The demo pointer ---------------------------------------------------
   Shows how a step is done. It is purple and labelled "Demo" so it is never
   mistaken for the student's own mouse pointer, and it does not do the step. */
.tg-ghost { position: absolute; z-index: 9600; width: 0; height: 0; pointer-events: none; }
.tg-ghost b { position: absolute; left: -5px; top: -3px; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.tg-ghost em { position: absolute; left: 20px; top: 30px; font: bold 11px/1 Arial, Helvetica, sans-serif; font-style: normal; color: #fff; background: var(--tg-point); border-radius: 5px; padding: 3px 6px; box-shadow: 0 0 0 2px #fff; }
.tg-ghost i { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%; border: 5px solid var(--tg-point); background: rgba(124, 58, 237, .16); opacity: 0; }
.tg-ghost i.go { animation: tg-rip .5s ease-out; }
@keyframes tg-rip { 0% { transform: scale(.2); opacity: 1; } 70% { opacity: .9; } 100% { transform: scale(1.1); opacity: 0; } }
.tg-cap { position: absolute; left: 34px; top: 52px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; width: max-content; max-width: 300px; background: #fff; color: #24124f; border: 3px solid var(--tg-point); border-radius: 12px; padding: 7px 12px; font: bold 16px/1.4 Verdana, Arial, Helvetica, sans-serif; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.tg-ghost.flip .tg-cap { left: auto; right: 10px; }
.tg-ghost.flip em { left: auto; right: 2px; }
.tg-ghost.up .tg-cap { top: auto; bottom: 16px; }
.tg-ghost.up em { top: auto; bottom: -2px; left: 26px; }
.tg-cap .tg-type { font-size: 15px; }
.tg-capnote { flex: 1 1 100%; font-weight: normal; font-size: 14px; }
.tg-key { display: inline-block; min-width: 34px; text-align: center; font: bold 14px/1 Arial, Helvetica, sans-serif; color: #1f2933; background: #f1f1f4; border: 2px solid #8a8f98; border-bottom-width: 5px; border-radius: 7px; padding: 6px 9px 5px; }
.tg-key.down { background: var(--tg-point); border-color: #4c1d95; color: #fff; border-bottom-width: 2px; transform: translateY(3px); }
@media (prefers-reduced-motion: reduce) { .tg-ghost i.go { animation: none; opacity: .9; } .tg-key.down { transform: none; } }
[hidden].tg-ring, [hidden].tg-ghost, .tg-ghost [hidden], .tg-full [hidden], .tg-side [hidden] { display: none !important; }

@media (max-width: 760px) {
  .tg-main { padding: 18px 14px 50px; }
  .tg-part em { display: none; }
}
