/* EduCS.me site tools (2026-10-11): heading tools, questions to try
   again, My Progress lists, and (below) Settings, keyboard help, the
   side-menu fold, What's new and Report a problem. Works with
   assets/js/site-tools.js. Light rules first, then [data-theme="dark"]. */

/* Screen-reader live region */
.st-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Icon tools with a name pill (8s) ───────────────────── */
.st-tool {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: #526072;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.st-tool:hover,
.st-tool:focus-visible {
  background: #EAF4FA;
  color: #2B6F9B;
}
.st-tool:focus-visible {
  outline: 2px solid #61B0DD;
  outline-offset: 1px;
}
.st-tool svg { display: block; }

/* The name rolls out below the icon on pointing or keyboard focus, lets
   the pointer pass through, and goes as soon as the pointer leaves. A
   confirmation ("Link copied") shows in the same pill for a moment (8f).
   At rest it is out of the layout (display: none), so a pill near the
   screen's edge never widens the page on a phone; site-tools.js keeps a
   shown pill inside the screen. */
.st-tool__label {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 40;
  transform: translateX(-50%);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #2D3748;
  color: #fff;
  font: 600 0.72rem/1.2 "Inter", system-ui, sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  text-transform: none;
  box-shadow: 0 4px 14px rgba(15, 20, 25, 0.18);
  pointer-events: none;
  animation: st-pill-in 0.15s ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .st-tool:hover .st-tool__label { display: block; }
}
.st-tool:focus-visible .st-tool__label,
.st-tool--confirm .st-tool__label { display: block; }
@keyframes st-pill-in {
  from { opacity: 0; margin-top: -3px; }
  to { opacity: 1; margin-top: 0; }
}
/* Near a screen edge the pill lines up with the tool's edge instead. */
.st-tool--pill-end .st-tool__label { left: auto; right: 0; transform: none; }
.st-tool--pill-start .st-tool__label { left: 0; transform: none; }

/* ── Copy link and Save for revision on headings ────────── */
.st-has-tools > .anchor-heading { display: none; }
.st-heading-tools {
  display: inline-flex;
  gap: 2px;
  margin-left: 0.35rem;
  vertical-align: middle;
  position: relative;
  top: -0.1em;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 400;
}
/* Touch screens: faintly there all the time. Mouse: brought in by
   pointing at the heading or tabbing into the tools (8q). A saved
   section's mark stays at rest so its state shows without pointing. */
.st-heading-tools .st-tool { opacity: 0.55; }
@media (hover: hover) and (pointer: fine) {
  .st-heading-tools .st-tool { opacity: 0; }
  .st-has-tools:hover .st-tool,
  .st-heading-tools:focus-within .st-tool { opacity: 1; }
}
.st-heading-tools .st-tool--on,
.st-heading-tools .st-tool--confirm { opacity: 1 !important; }
.st-tool--save.st-tool--on { color: #2B6F9B; }
.st-tool--save.st-tool--on svg path { fill: currentColor; }

/* ── Questions to try again: the pill in the bottom-right tray ─ */
/* A suggestion worked out from the reader's own answers, so it carries
   the wordmark's colours as a thin outline (8r). */
.st-retry {
  display: none;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem 0.3rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, #3DAA8A, #2E7EAB, #5093BB, #3D7A9E) border-box;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  font: 600 0.85rem/1.2 "Inter", system-ui, sans-serif;
  color: #2D3748;
}
.float-tray .st-retry { order: 2; }
.st-retry--visible,
.st-retry--done { display: inline-flex; animation: float-tray-in 0.2s ease-out; }
.st-retry__open {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.st-retry__open:hover,
.st-retry__open:focus-visible { background: #EAF4FA; color: #2B6F9B; }
.st-retry__open svg { color: #2B6F9B; flex: none; }
.st-retry__text { padding: 0.35rem 0.3rem 0.35rem 0.6rem; }
.st-retry [hidden] { display: none !important; }
.st-retry__step {
  display: none;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #435369;
  cursor: pointer;
}
.st-retry--stepping .st-retry__step { display: inline-grid; }
.st-retry__step:hover:not(:disabled),
.st-retry__step:focus-visible { background: #EAF4FA; color: #2B6F9B; }
.st-retry__step:disabled { opacity: 0.35; cursor: default; }
.st-retry--done .st-retry__open svg { color: #2F855A; }
.st-retry button:focus-visible { outline: 2px solid #61B0DD; outline-offset: 1px; }

/* The question landed on glows once, for about a second (principle 4). */
.st-try-glow { animation: st-try-glow 1s ease-out; }
@keyframes st-try-glow {
  0% { box-shadow: 0 0 0 0 rgba(97, 176, 221, 0); }
  25% { box-shadow: 0 0 0 5px rgba(97, 176, 221, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(97, 176, 221, 0); }
}

/* ── Every question answered: the next step, in the score ── */
.quiz-score-widget__next {
  margin-left: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #2B6F9B;
  color: #fff !important;
  font: 600 0.8rem/1.2 "Inter", system-ui, sans-serif;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background 0.15s;
}
.quiz-score-widget__next::after { content: " \203A"; }
.quiz-score-widget__next:hover,
.quiz-score-widget__next:focus-visible { background: #235C80; }
.quiz-score-widget--done .quiz-score-widget__icon { display: inline-block; animation: st-done-pop 0.45s ease-out; }
@keyframes st-done-pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
[data-theme="dark"] .quiz-score-widget__next { background: #87D1E8; color: #0F1419 !important; }
[data-theme="dark"] .quiz-score-widget__next:hover,
[data-theme="dark"] .quiz-score-widget__next:focus-visible { background: #A8DEEF; }

/* ── My Progress: what went well, saved, to try again ───── */
.pp-good {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  color: #2F6B4F;
}
.pp-saved,
.pp-retry {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #F7FAFC;
}
.pp-saved { border-left: 4px solid #5093BB; }
.pp-retry {
  position: relative;
  padding-left: calc(1.25rem + 3px);
}
/* A suggestion worked out from the reader's answers: the left stripe takes
   the wordmark's colours (8r). */
.pp-retry::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 4px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, #3DAA8A, #2E7EAB, #5093BB, #3D7A9E);
}
.pp-saved h2,
.pp-retry h2 { margin-top: 0; font-size: 1.1rem; }

.main-content .pp-list,
.pp-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem 1.5rem;
}
@media (min-width: 48rem) {
  .main-content .pp-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.main-content .pp-list > li::before { content: none !important; display: none !important; }
.main-content .pp-list > li { margin: 0; padding-left: 0; }
.pp-list__row {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}
.pp-list__row[hidden] { display: none; }
.pp-list__link {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.45rem;
  margin-left: -0.45rem;
  border-radius: 6px;
  color: inherit;
  text-decoration: none !important;
}
.pp-list__link:hover,
.pp-list__link:focus-visible { background: #EAF4FA; }
.pp-list__title {
  display: block;
  color: #2B6F9B;
  font-weight: 600;
}
.pp-list__sub {
  display: block;
  font-size: 0.88rem;
  color: #5A6A7E;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp-list__remove { flex: none; }
@media (hover: hover) and (pointer: fine) {
  .pp-list__remove { opacity: 0; }
  .pp-list__row:hover .pp-list__remove,
  .pp-list__remove:focus-visible { opacity: 1; }
}
.pp-list__remove .st-tool__label { left: auto; right: 0; transform: none; }
.pp-list__undo { margin: 0.5rem 0 0; font-size: 0.9rem; }
.pp-list__undo:empty { margin: 0; }

.pp-retry__groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem 1.5rem;
  margin-top: 0.6rem;
}
@media (min-width: 48rem) {
  .pp-retry__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pp-retry__group[hidden] { display: none; }
.pp-retry__lesson {
  font-weight: 600;
  color: #2B6F9B;
}
.pp-retry__items {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.92rem;
}
.pp-retry__items li { margin: 0.15rem 0; }
.pp-retry__more {
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: #2B6F9B;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Header tools: Settings (and What's new) beside Appearance ─ */
.st-header-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  margin-right: 1rem;
  flex-shrink: 0;
}
.main-header .theme-menu-wrap:has(+ .st-header-tools) { margin-right: 0.1rem; }
.st-pop-wrap {
  position: relative;
  display: inline-flex;
}
/* Same look as the Appearance button: quiet until pointed at. */
.st-head-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  color: inherit;
  opacity: 0.6;
}
.st-head-btn:hover,
.st-head-btn:focus-visible,
.st-head-btn.st-tool--open {
  opacity: 1;
  background: transparent;
  color: inherit;
}
.st-head-btn.st-tool--open .st-tool__label { display: none; }

/* ── Panels (Settings, What's new, Report a problem, shortcuts) ─ */
.st-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10000;
  width: 23rem;
  max-width: calc(100vw - 1.5rem);
  padding: 0.75rem 1rem 0.85rem;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 10px 28px rgba(15, 20, 25, 0.12), 0 2px 6px rgba(15, 20, 25, 0.06);
  color: #2D3748;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: left;
  animation: st-panel-in 0.16s ease-out;
}
.st-panel[hidden] { display: none; }
.st-panel.st-panel--sheet {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  width: auto;
  max-width: none;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}
@keyframes st-panel-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.st-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.st-panel__title {
  margin: 0 !important;
  font: 600 1rem/1.3 "Inter", system-ui, sans-serif !important;
  color: #2D3748 !important;
}
.st-panel__close {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #526072;
  cursor: pointer;
}
.st-panel__close:hover,
.st-panel__close:focus-visible { background: #EDF2F7; color: #2D3748; }
.st-panel__foot {
  margin: 0.4rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid #EDF2F7;
  font-size: 0.82rem;
  color: #5A6A7E;
}

/* One row per choice: its name and a short note on the left, the
   control on the right, the same in every row. */
.st-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid #EDF2F7;
}
.st-row:first-child { border-top: 0; }
.st-row__text { flex: 1 1 9rem; min-width: 0; }
.st-row__label { display: block; font-weight: 600; color: #2D3748; }
.st-row__note { display: block; margin-top: 0.1rem; font-size: 0.8rem; line-height: 1.35; color: #5A6A7E; }
@media (max-width: 49.99rem) { .st-row--wide-only { display: none; } }

/* Choices in a light tray; the chosen one is a raised white tab (8t). */
.st-seg {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border-radius: 8px;
  background: #EDF2F7;
}
.st-seg__opt {
  padding: 0.3rem 0.55rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #435369;
  font: 600 0.78rem/1.2 "Inter", system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.st-seg__opt:hover { color: #2D3748; }
.st-seg__opt--on {
  background: #FFFFFF;
  color: #2B6F9B;
  box-shadow: 0 1px 3px rgba(15, 20, 25, 0.14);
}
.st-seg__opt:focus-visible,
.st-switch:focus-visible,
.st-btn:focus-visible,
.st-panel__close:focus-visible {
  outline: 2px solid #61B0DD;
  outline-offset: 1px;
}

/* A switch says On or Off in words as well (not colour alone). */
.st-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  padding: 0.15rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #435369;
  font: 600 0.78rem/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
}
.st-switch__track {
  position: relative;
  width: 2.25rem;
  height: 1.3rem;
  border-radius: 999px;
  background: #CBD5E0;
  transition: background 0.15s;
}
.st-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.3rem - 4px);
  height: calc(1.3rem - 4px);
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15, 20, 25, 0.25);
  transition: transform 0.18s ease;
}
.st-switch[aria-checked="true"] .st-switch__track { background: #2B6F9B; }
.st-switch[aria-checked="true"] .st-switch__thumb { transform: translateX(0.95rem); }
.st-switch__state { min-width: 1.6rem; text-align: left; }

.st-btn {
  flex: none;
  padding: 0.32rem 0.75rem;
  border: 1px solid #CBD5E0;
  border-radius: 6px;
  background: #FFFFFF;
  color: #2B6F9B;
  font: 600 0.8rem/1.2 "Inter", system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.st-btn:hover:not(:disabled) { background: #EAF4FA; border-color: #61B0DD; }
.st-btn:disabled { color: #6B7785; background: #F7FAFC; cursor: default; }

/* ── Keyboard shortcuts ─────────────────────────────────── */
.st-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 14vh 1rem 1rem;
  background: rgba(15, 20, 25, 0.32);
}
.st-panel.st-keys {
  position: static;
  width: 22rem;
}
.st-panel.st-keys:focus { outline: none; }
.st-keys__list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1rem;
  align-items: center;
  margin: 0.6rem 0 0.2rem;
}
.st-keys__list dt { margin: 0; white-space: nowrap; }
.st-keys__list dd { margin: 0; }
.st-keys kbd,
.st-panel kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.08rem 0.4rem;
  border: 1px solid #CBD5E0;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #F7FAFC;
  color: #2D3748;
  font: 0.78rem/1.4 "JetBrains Mono", ui-monospace, monospace;
  font-variant-ligatures: none;
  text-align: center;
}

/* ── The side menu folds away (wide screens) ────────────── */
.st-menu-rail,
.st-menu-fold { display: none; }
@media (min-width: 50rem) {
  .st-menu-fold {
    display: inline-grid;
    position: absolute;
    top: 4.15rem;
    right: 0.55rem;
    z-index: 2;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    background: #FFFFFF;
    color: #526072;
    opacity: 0.85;
  }
  .st-menu-fold:hover,
  .st-menu-fold:focus-visible { opacity: 1; border-color: #61B0DD; background: #FFFFFF; }
  /* The name sits where there is room: inside the open menu, to the
     button's left; beside the slim rail, to its right (the rail is lifted
     above the lesson so the pill is not hidden under it). */
  .st-menu-fold .st-tool__label,
  .st-menu-fold.st-tool--pill-end .st-tool__label,
  .st-menu-fold.st-tool--pill-start .st-tool__label {
    left: auto;
    right: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    animation: none;
  }
  html.menu-folded .st-menu-fold .st-tool__label,
  html.menu-folded .st-menu-fold.st-tool--pill-end .st-tool__label,
  html.menu-folded .st-menu-fold.st-tool--pill-start .st-tool__label {
    right: auto;
    left: calc(100% + 6px);
  }
  html.menu-folded .side-bar { z-index: 3; }

  html.menu-folded .side-bar {
    width: 3.25rem !important;
    min-width: 0 !important;
    align-items: center !important;
  }
  html.menu-folded .side-bar > :not(.st-menu-rail):not(.st-menu-fold) { display: none !important; }
  html.menu-folded .side-bar + .main {
    margin-left: 3.25rem !important;
  }
  html.menu-folded .st-menu-rail {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 3.75rem;
    align-items: center;
  }
  html.menu-folded .st-menu-fold { right: calc(50% - 0.875rem); }
  .st-menu-rail__home {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    transition: background 0.15s;
  }
  .st-menu-rail__home:hover,
  .st-menu-rail__home:focus-visible { background: #EAF4FA; }
  .st-menu-rail__mark {
    font: 700 0.95rem/1 "Inter", system-ui, sans-serif;
    letter-spacing: -0.01em;
  }
  .st-menu-rail__home { text-decoration: none !important; }

}
/* From 80rem the lesson already has its full width, so folding the menu
   leaves it exactly where it was (nothing moves under the pointer). */
@media (min-width: 80rem) {
  html.menu-folded .side-bar + .main {
    margin-left: max(16.5rem, calc((100% - 80rem) / 2 + 16.5rem)) !important;
  }
}
@media (min-width: 50rem) {
  /* While the width changes, the lesson fades out and back in, so no
     text re-wraps in front of the reader (8i). */
  .side-bar + .main { transition: opacity 0.12s ease; }
  html.menu-changing .side-bar + .main { opacity: 0; }
}

/* Settings > Glossary underlines off: terms read as plain text. */
html.glossary-off .glossary-term {
  border-bottom: 0 !important;
  cursor: inherit !important;
}

/* ── Glossary card: its next steps in one row ─────────────── */
/* "Learn more", "Find in lessons" and "Save term" share one line under a
   thin rule, as quiet text buttons in the card's own blue (principle 3). */
.glossary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.9rem;
  margin-top: 0.35rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.glossary-actions .glossary-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
}
.glossary-action {
  padding: 0;
  border: 0;
  background: none;
  color: #87D1E8;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.glossary-action:hover { text-decoration: underline; }
.glossary-action[aria-pressed="true"]::before { content: "\2713\00a0"; }
.glossary-actions a:focus-visible,
.glossary-action:focus-visible {
  outline: 2px solid #87D1E8;
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── My Progress: Terms to revise (self-test) ─────────────── */
.pp-terms {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #8FD4BF;
  border-radius: 8px;
  background: #F7FAFC;
}
.pp-terms h2 { margin-top: 0; font-size: 1.1rem; }
.pp-terms__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin: 0.25rem 0 0.6rem;
}
.main-content .pp-terms__list,
.pp-terms__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  align-items: start;
  grid-template-columns: 1fr;
  gap: 0.5rem 1.5rem;
}
@media (min-width: 48rem) {
  .main-content .pp-terms__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* A short last row shares the width, as the topic cards do (10b). */
  .main-content .pp-terms__list > .pp-term:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.main-content .pp-terms__list > li::before { content: none !important; display: none !important; }
.main-content .pp-terms__list > li.pp-term { margin: 0; padding: 0.55rem 0.7rem; }
.pp-term {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.5rem;
  align-items: start;
  padding: 0.55rem 0.7rem;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #FFFFFF;
}
.pp-term[hidden] { display: none; }
.pp-term__name {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: 600 0.95rem/1.35 "Inter", system-ui, sans-serif;
  color: #2D3748;
  cursor: pointer;
}
.pp-term__name::after {
  content: "Show meaning";
  margin-left: 0.5rem;
  font: 600 0.72rem "Inter", system-ui, sans-serif;
  color: #2B6F9B;
}
.pp-term__name[aria-expanded="true"]::after { content: "Hide meaning"; }
.pp-term__def {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9rem;
  color: #435369;
}
.pp-term__def[hidden] { display: none; }
.pp-term__def a { margin-left: 0.35rem; font-weight: 600; }
.pp-term__name:focus-visible { outline: 2px solid #61B0DD; outline-offset: 2px; border-radius: 3px; }

/* ── Search: named groups, settings, terms, recent searches ── */
#search-results .search-results-heading {
  padding: 0.6rem 0.75rem 0.2rem;
  font: 600 0.68rem/1.2 "Inter", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5A6A7E;
}
#search-results .search-results-heading:first-child { padding-top: 0.5rem; }
#search-results .st-search-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  color: #2B6F9B;
}
#search-results .st-search-icon svg { display: block; }
#search-results .st-search-term-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: auto;
  height: auto;
  padding: 0.05rem 0.2rem;
  border: 1px solid currentColor;
  border-radius: 4px;
  font: 700 0.58rem/1.2 "Inter", system-ui, sans-serif;
  color: #2F855A;
}
#search-results .search-result--static { cursor: default; }
#search-results .search-result--term .search-result-preview,
#search-results .search-result--setting .search-result-preview {
  color: #435369;
}
.st-search-clear {
  display: block;
  margin: 0.2rem 0.75rem 0.65rem;
  padding: 0;
  border: 0;
  background: none;
  font: 600 0.78rem/1.3 "Inter", system-ui, sans-serif;
  color: #2B6F9B;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Report a problem ───────────────────────────────────── */
/* One quiet line at the end of the page; the form reuses the guide
   feedback panel (.gf-*) so both forms look and work the same. */
.st-report-line {
  margin: 2.25rem 0 0.5rem;
  font-size: 0.9rem;
  color: #5A6A7E;
}
.st-report-line__btn {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: #2B6F9B;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(43, 111, 155, 0.4);
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.st-report-line__btn:hover { text-decoration-color: currentColor; }
.st-report-line__btn:focus-visible { outline: 2px solid #61B0DD; outline-offset: 2px; border-radius: 3px; }
.st-report-line__btn svg { vertical-align: -2px; margin-right: 0.25rem; }
.st-report__sent {
  margin: 0.75rem 0 0;
  padding: 0;
  border: 0;
}
.st-report__check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.35rem 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #435369;
  cursor: pointer;
}
.st-report__check input { margin-top: 0.2rem; flex: none; accent-color: #2B6F9B; }
.st-report__note { margin: 0.35rem 0 0; font-size: 0.8rem; color: #5A6A7E; }

/* ── Home: New here? Choose a first step ──────────────────── */
/* A full-width band under the welcome, laid out like the home page's
   other bands (same inner width and side padding). */
.hp-start {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  padding: 32px var(--hp-pad, clamp(20px, 5vw, 64px)) 40px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
}
.hp-start-inner {
  position: relative;
  max-width: var(--hp-max, 1280px);
  margin: 0 auto;
}
.hp-start-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 24px;
  margin-bottom: 20px;
}
.hp-start-titles { flex: 1 1 16rem; min-width: 0; padding-right: 2.5rem; }
.hp-start .hp-start-title { margin-bottom: 0; }
.hp-start .eyebrow { margin-bottom: 6px; }
.hp-start-roles { flex: none; }
.hp-start-roles .st-seg__opt { padding: 0.45rem 0.8rem; font-size: 0.85rem; }
.hp-start-hide { position: absolute; top: -6px; right: -6px; }

.main-content .hp-start-grid,
.hp-start-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.main-content .hp-start-grid > li::before { content: none !important; display: none !important; }
.main-content .hp-start-grid > li { margin: 0; padding: 0; }
@media (min-width: 36rem) { .main-content .hp-start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .main-content .hp-start-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .hp-start-roles { margin-right: 2.5rem; } .hp-start-titles { padding-right: 0; } }

.hp-start-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  gap: 4px 10px;
  height: 100%;
  padding: 14px 16px 16px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #FFFFFF;
  color: inherit;
  text-decoration: none !important;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.hp-start-card:hover,
.hp-start-card:focus-visible {
  border-color: #61B0DD;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 20, 25, 0.08);
}
.hp-start-card:focus-visible { outline: 2px solid #61B0DD; outline-offset: 2px; }
.hp-start-card__num {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #EAF4FA;
  color: #2B6F9B;
  font: 700 0.8rem/1 "Inter", system-ui, sans-serif;
}
.hp-start-card__title {
  font: 600 1rem/1.3 "Inter", system-ui, sans-serif;
  color: #2D3748;
  padding-right: 1rem;
}
.hp-start-card__desc {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #5A6A7E;
}
/* The arrow comes in on pointing or focus; the whole card is the link. */
.hp-start-card__arrow {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #2B6F9B;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.hp-start-card:hover .hp-start-card__arrow,
.hp-start-card:focus-visible .hp-start-card__arrow { opacity: 1; transform: none; }
@media (hover: none) { .hp-start-card__arrow { opacity: 1; transform: none; } }

/* ── What's new ─────────────────────────────────────────── */
.st-bell { position: relative; }
/* A small dot in the wordmark's mint when something new has arrived; it
   glows once as the page opens, then rests (principle 4). */
.st-bell__dot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2F9E7E;
  box-shadow: 0 0 0 2px #FFFFFF;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
}
.st-bell--unread { opacity: 0.9; }
.st-bell--unread .st-bell__dot {
  opacity: 1;
  transform: none;
  animation: st-bell-glow 1.2s ease-out 0.4s 1;
}
@keyframes st-bell-glow {
  0% { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 2px rgba(47, 158, 126, 0.5); }
  100% { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 9px rgba(47, 158, 126, 0); }
}
.st-news { width: 25rem; }
.main-content .st-news__list,
.st-news__list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  max-height: min(60vh, 28rem);
  overflow-y: auto;
}
.st-news__list--more {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 2.5rem), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 2.5rem), transparent);
}
.main-content .st-news__list > li::before { content: none !important; display: none !important; }
.st-news__item {
  margin: 0;
  padding: 0.6rem 0;
  border-top: 1px solid #EDF2F7;
}
.st-news__item:first-child { border-top: 0; }
.st-news__top { display: flex; align-items: baseline; gap: 0.5rem; }
.st-news__title {
  font: 600 0.92rem/1.35 "Inter", system-ui, sans-serif;
  color: #2D3748;
}
a.st-news__title { color: #2B6F9B; text-decoration: none !important; }
a.st-news__title:hover,
a.st-news__title:focus-visible { text-decoration: underline !important; }
.st-news__badge {
  flex: none;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #E3F5EC;
  color: #23775F;
  font: 700 0.65rem/1.4 "Inter", system-ui, sans-serif;
  letter-spacing: 0.03em;
}
.st-news__what { margin: 0.15rem 0 0; font-size: 0.86rem; line-height: 1.4; color: #435369; }
.st-news__date { margin: 0.15rem 0 0; font-size: 0.75rem; color: #6B7785; }
.st-news__empty { margin: 0.6rem 0 0.2rem; font-size: 0.88rem; color: #5A6A7E; }
.st-news__foot {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid #EDF2F7;
  font-size: 0.82rem;
}

/* ── Dark theme ─────────────────────────────────────────── */
[data-theme="dark"] .st-tool { color: #9AA5B4; }
[data-theme="dark"] .st-tool:hover,
[data-theme="dark"] .st-tool:focus-visible { background: #242D3A; color: #87D1E8; }
[data-theme="dark"] .st-head-btn:hover,
[data-theme="dark"] .st-head-btn:focus-visible,
[data-theme="dark"] .st-head-btn.st-tool--open { background: transparent; color: inherit; }
[data-theme="dark"] .st-tool__label {
  background: #242D3A;
  color: #E2E8F0;
  box-shadow: 0 0 0 1px #313D4F, 0 4px 14px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .st-tool--save.st-tool--on { color: #87D1E8; }
[data-theme="dark"] .st-retry {
  background:
    linear-gradient(#1A2029, #1A2029) padding-box,
    linear-gradient(90deg, #5FC79F, #61B0DD, #87D1E8, #61B0DD) border-box;
  color: #E2E8F0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .st-retry__open:hover,
[data-theme="dark"] .st-retry__open:focus-visible,
[data-theme="dark"] .st-retry__step:hover:not(:disabled),
[data-theme="dark"] .st-retry__step:focus-visible { background: #242D3A; color: #87D1E8; }
[data-theme="dark"] .st-retry__open svg { color: #87D1E8; }
[data-theme="dark"] .st-retry__step { color: #B8C2CE; }
[data-theme="dark"] .st-retry--done .st-retry__open svg { color: #5FC79F; }
[data-theme="dark"] .pp-good { color: #8FD4BF; }
[data-theme="dark"] .pp-saved,
[data-theme="dark"] .pp-retry { background: #1A2029; border-color: #313D4F; }
[data-theme="dark"] .pp-saved { border-left-color: #87D1E8; }
[data-theme="dark"] .pp-retry::before { background: linear-gradient(180deg, #5FC79F, #61B0DD, #87D1E8, #61B0DD); }
[data-theme="dark"] .pp-list__link:hover,
[data-theme="dark"] .pp-list__link:focus-visible { background: #242D3A; }
[data-theme="dark"] .pp-list__title,
[data-theme="dark"] .pp-retry__lesson,
[data-theme="dark"] .pp-retry__more { color: #87D1E8; }
[data-theme="dark"] .pp-list__sub { color: #9AA5B4; }

[data-theme="dark"] .st-panel {
  background: #1A2029;
  border-color: #313D4F;
  color: #D1D9E6;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .st-panel__title,
[data-theme="dark"] .st-row__label { color: #E2E8F0 !important; }
[data-theme="dark"] .st-row,
[data-theme="dark"] .st-panel__foot { border-color: #242D3A; }
[data-theme="dark"] .st-row__note,
[data-theme="dark"] .st-panel__foot { color: #9AA5B4; }
[data-theme="dark"] .st-panel__close { color: #9AA5B4; }
[data-theme="dark"] .st-panel__close:hover,
[data-theme="dark"] .st-panel__close:focus-visible { background: #242D3A; color: #E2E8F0; }
[data-theme="dark"] .st-seg { background: #0F1419; }
[data-theme="dark"] .st-seg__opt { color: #9AA5B4; }
[data-theme="dark"] .st-seg__opt:hover { color: #E2E8F0; }
[data-theme="dark"] .st-seg__opt--on { background: #313D4F; color: #87D1E8; box-shadow: none; }
[data-theme="dark"] .st-switch { color: #B8C2CE; }
[data-theme="dark"] .st-switch__track { background: #435369; }
[data-theme="dark"] .st-switch[aria-checked="true"] .st-switch__track { background: #61B0DD; }
[data-theme="dark"] .st-switch__thumb { background: #E2E8F0; }
[data-theme="dark"] .st-btn { background: #242D3A; border-color: #435369; color: #87D1E8; }
[data-theme="dark"] .st-btn:hover:not(:disabled) { background: #313D4F; border-color: #61B0DD; }
[data-theme="dark"] .st-btn:disabled { background: #1A2029; color: #8A96A5; }
[data-theme="dark"] .st-overlay { background: rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .st-keys kbd,
[data-theme="dark"] .st-panel kbd { background: #242D3A; border-color: #435369; color: #E2E8F0; }
[data-theme="dark"] .st-menu-fold { background: #1A2029; border-color: #313D4F; color: #B8C2CE; }
[data-theme="dark"] .st-menu-fold:hover,
[data-theme="dark"] .st-menu-fold:focus-visible { background: #1A2029; border-color: #61B0DD; color: #87D1E8; }
[data-theme="dark"] .st-menu-rail__home:hover,
[data-theme="dark"] .st-menu-rail__home:focus-visible { background: #242D3A; }

[data-theme="dark"] .pp-terms { background: #1A2029; border-color: #313D4F; border-left-color: #5FC79F; }
[data-theme="dark"] .pp-term { background: #0F1419; border-color: #313D4F; }
[data-theme="dark"] .pp-term__name { color: #E2E8F0; }
[data-theme="dark"] .pp-term__name::after { color: #87D1E8; }
[data-theme="dark"] .pp-term__def { color: #B8C2CE; }

[data-theme="dark"] #search-results .search-results-heading { color: #9AA5B4; }
[data-theme="dark"] #search-results .st-search-icon { color: #87D1E8; }
[data-theme="dark"] #search-results .st-search-term-mark { color: #5FC79F; }
[data-theme="dark"] #search-results .search-result--term .search-result-preview,
[data-theme="dark"] #search-results .search-result--setting .search-result-preview { color: #B8C2CE; }
[data-theme="dark"] .st-search-clear { color: #87D1E8; }

[data-theme="dark"] .st-report-line,
[data-theme="dark"] .st-report__note { color: #9AA5B4; }
[data-theme="dark"] .st-report-line__btn { color: #87D1E8; text-decoration-color: rgba(135, 209, 232, 0.4); }
[data-theme="dark"] .st-report__check { color: #B8C2CE; }
[data-theme="dark"] .st-report__check input { accent-color: #87D1E8; }

[data-theme="dark"] .hp-start { background: #0F1419; border-top-color: #1A2029; }
[data-theme="dark"] .hp-start-card { background: #1A2029; border-color: #313D4F; }
[data-theme="dark"] .hp-start-card:hover,
[data-theme="dark"] .hp-start-card:focus-visible { border-color: #61B0DD; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
[data-theme="dark"] .hp-start-card__num { background: #242D3A; color: #87D1E8; }
[data-theme="dark"] .hp-start-card__title { color: #E2E8F0; }
[data-theme="dark"] .hp-start-card__desc { color: #9AA5B4; }
[data-theme="dark"] .hp-start-card__arrow { color: #87D1E8; }

[data-theme="dark"] .st-bell__dot { background: #5FC79F; box-shadow: 0 0 0 2px #0F1419; }
[data-theme="dark"] .st-news__item,
[data-theme="dark"] .st-news__foot { border-color: #242D3A; }
[data-theme="dark"] .st-news__title { color: #E2E8F0; }
[data-theme="dark"] a.st-news__title { color: #87D1E8; }
[data-theme="dark"] .st-news__badge { background: #183A2E; color: #8FD4BF; }
[data-theme="dark"] .st-news__what { color: #B8C2CE; }
[data-theme="dark"] .st-news__date,
[data-theme="dark"] .st-news__empty { color: #9AA5B4; }

/* ── Paper (teacher guides) ─────────────────────────────── */
@media print {
  .st-heading-tools,
  .st-retry,
  .st-header-tools,
  .st-menu-fold,
  .st-menu-rail,
  .st-overlay,
  .st-report-line { display: none !important; }
}

/* Home page top bar: the search box takes what is left of the row, so the
   header tools sit close to the Appearance button there. */
.layout-home .st-header-tools { margin-right: 0; }
.layout-home .main-header .theme-menu-wrap:has(+ .st-header-tools) { margin-right: 0; }
