/* ============================================================================
   QUANT GUILD — CONTENT CANVAS
   ----------------------------------------------------------------------------
   One late-loaded layer that puts every page that is not already a bespoke
   01-prime layout (home, dashboard) onto the same canvas: Inter, a quiet
   surface, hairline cards, and blue/gold instead of the old product-lane
   gradients.

   Loaded from the shared sidebar (and again at the end of pages that have no
   sidebar) so it wins against the legacy sheets in <head>. Selectors stay on
   the existing class names; page scripts keep their hooks.
   ========================================================================== */

/* ----------------------------------------------------------- exclusions */

/* Home and the dashboard already have their own layouts. */
body.qg-home,
body.qg-dash {
  /* intentionally empty — the rules below opt out with :not() */
}

/* --------------------------------------------------------------- canvas */

html:not(.letters-html) body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page):not(.phf-page),
html[data-theme='dark']:not(.letters-html) body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page):not(.phf-page) {
  background: var(--qg-surface-2) !important;
  color: var(--qg-text-body) !important;
  font-family: var(--qg-font) !important;
  font-size: var(--qg-fs-base);
  letter-spacing: var(--qg-ls-body);
}

html:not(.letters-html) body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page):not(.phf-page) .desktop-container,
html:not(.letters-html) body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page):not(.phf-page) .main-content,
html:not(.letters-html) body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page):not(.phf-page) .mobile-content,
html[data-theme='dark']:not(.letters-html):not(.mc-standalone):not(.phf-standalone) body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page) .main-content,
html[data-theme='dark']:not(.letters-html):not(.mc-standalone):not(.phf-standalone) body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page) .mobile-content {
  background: var(--qg-surface-2) !important;
  color: var(--qg-text-body);
  font-family: var(--qg-font);
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.appr-page) .main-content {
  padding: 28px 36px 72px !important;
  overflow-x: auto !important;
}

@media (max-width: 768px) {
  body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.appr-page) .main-content,
  body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.appr-page) .mobile-content {
    padding: 20px 16px 56px !important;
  }
}

/* ------------------------------------------------------------ type */

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.phf-page) .main-content h1:not(.hero-title),
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.phf-page) .main-content h2:not(.hero-title),
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.phf-page) .mobile-content h1:not(.hero-title),
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.phf-page) .mobile-content h2:not(.hero-title),
body:not(.qg-dash):not(.qg-home):not(.cm-page) .lesson-title,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .interview-title,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .mobile-interview-title {
  font-family: var(--qg-font-display) !important;
  font-weight: 600 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.15 !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .lesson-title,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .interview-title,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel h1,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel h2 {
  color: var(--qg-text) !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.phf-page) .main-content h1:not(.hero-title),
body:not(.qg-dash):not(.qg-home):not(.cm-page) .lesson-title,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .interview-title {
  font-size: 30px !important;
  margin: 8px 0 0 !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.phf-page) .main-content h2:not(.hero-title) {
  font-size: 22px !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.phf-page) .main-content h3,
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.phf-page) .mobile-content h3 {
  font-family: var(--qg-font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--qg-text);
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.phf-page) .main-content p,
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.phf-page) .mobile-content p {
  color: var(--qg-text-body);
  line-height: 1.65;
}

/* Heroes and upgrade banners paint their own text. The rule above would
   turn that copy dark grey on a blue ground. */
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section p,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section h1,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section h2,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section h3,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .subscription-banner,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .subscription-banner p,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .subscription-banner strong {
  color: inherit;
}

.qg-canvas-kicker {
  display: block;
  margin: 0 0 6px;
  font-family: var(--qg-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qg-accent);
}

/* ------------------------------------------------ lesson / interview frame */

.lesson-dashboard-header,
.interview-dashboard-header,
.mobile-interview-dashboard-header,
.lesson-welcome-section,
.interview-welcome-section,
.mobile-interview-welcome-section {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 auto 8px !important;
  max-width: 880px;
  animation: none !important;
}


.lesson-planet-animation,
.lesson-planet,
.lesson-orbit,
.lesson-stars {
  display: none !important;
}

.lesson-subtitle,
.interview-subtitle,
.mobile-interview-subtitle {
  margin: 8px 0 0 !important;
  font-size: 14.5px !important;
  color: var(--qg-text-muted) !important;
  font-weight: 400 !important;
}

.back-btn,
.mobile-back-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--qg-text-muted) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

.back-btn:hover,
.mobile-back-btn:hover {
  color: var(--qg-accent) !important;
}

.lesson-badge,
.interview-badge,
.mobile-interview-badge,
.subject-badge,
.level-badge,
.type-badge,
.difficulty-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 14px 8px 0 0 !important;
  padding: 5px 10px !important;
  background: var(--qg-surface) !important;
  color: var(--qg-text-body) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
}

.lesson-content-container,
.interview-content-container,
.lesson-content-section,
.interview-content-section {
  background: var(--qg-surface) !important;
  color: var(--qg-text-body) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 16px !important;
  box-shadow: var(--qg-sh-hair, 0 1px 2px rgba(12, 17, 27, 0.04)) !important;
}

.lesson-content-container,
.interview-content-container {
  padding: 28px 32px 36px !important;
  margin: 16px auto 0 !important;
  max-width: 880px;
}

.lesson-content-section,
.interview-content-section {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  max-width: 880px;
  margin-left: auto !important;
  margin-right: auto !important;
}

html[data-theme='dark'] .blockcontent,
html[data-theme='dark'] .blockcontent p,
html[data-theme='dark'] .interview-content-container,
html[data-theme='dark'] .interview-content-container p {
  color: var(--qg-text-body) !important;
}

html[data-theme='dark'] .blockcontent h1,
html[data-theme='dark'] .blockcontent h2,
html[data-theme='dark'] .blockcontent h3,
html[data-theme='dark'] .blockcontent h4 {
  color: var(--qg-text) !important;
}

.blockcontent h2::after,
.blockcontent .panel > h2::after {
  background: var(--qg-gold) !important;
  height: 2px !important;
  width: 40px !important;
}

/* solution toggle stays a real control; just quieter */
.lesson-content-container .solution,
.interview-content-container .solution {
  background: var(--qg-surface-2);
  border: 1px solid var(--qg-line);
  border-radius: 12px;
  padding: 16px 18px;
}

.help-panel {
  margin-top: 28px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.help-panel-content {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 800px) {
  .help-panel-content {
    grid-template-columns: 1fr;
  }
  .lesson-content-container,
  .interview-content-container {
    padding: 18px 16px 24px !important;
  }
}

.hint-column,
.study-column {
  background: var(--qg-surface-2) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 12px !important;
  padding: 18px !important;
}

.hint-button,
.study-button,
.premium-subscribe-btn,
.subscribe-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--qg-blue) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 8px !important;
  padding: 10px 16px !important;
  font-family: var(--qg-font) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer;
}

.hint-button:hover,
.study-button:hover,
.premium-subscribe-btn:hover,
.subscribe-btn:hover {
  background: var(--qg-blue-deep) !important;
  transform: none !important;
}

.premium-lesson-banner,
.premium-banner-content {
  background: var(--qg-surface) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  color: var(--qg-text-body) !important;
}

.premium-icon {
  color: var(--qg-gold-text) !important;
}

/* ---------------------------------------------------- shared brand panels */

body:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel {
  background: var(--qg-surface) !important;
  background-image: none !important;
  color: var(--qg-text-body) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(12, 17, 27, 0.04) !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel__header,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel__hero,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .lessons-header,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .pr-hero,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .pr-mobile-hero {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--qg-text) !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel__header {
  border-bottom: 1px solid var(--qg-line) !important;
  padding-bottom: 16px !important;
  margin-bottom: 18px !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel__kicker,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel__eyebrow,
body:not(.qg-dash):not(.qg-home):not(.cm-page) [class*="__kicker"] {
  color: var(--qg-accent) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

/* Dashboard is opted out of the rules above. Keep its page hero on the
   same type as history/bookmarks so the three hub headers match. */
body.qg-dash .main-content .qg-dash-head__kicker {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

body.qg-dash .main-content .qg-dash-head h1 {
  font-family: var(--qg-font-display) !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.15 !important;
  margin: 8px 0 0 !important;
}

body.qg-dash .main-content .qg-dash-head__sub {
  margin: 6px 0 0 !important;
  font-size: 14.5px !important;
  line-height: 1.5 !important;
}

/* Lane accents collapse onto blue. Tracks stay distinct by weight, not hue. */
body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .mobile-content {
  --tile-accent: var(--qg-blue);
  --tile-accent-solid: var(--qg-blue);
  --mcc-accent: var(--qg-blue);
  --mcc-accent-deep: var(--qg-blue-deep);
  --mcc-accent-soft: var(--qg-accent-soft);
  --accent: var(--qg-gold);
  --primary: var(--qg-blue);
}

/* ------------------------------------------------------------ data + forms */

/* Guild Letters are Brevo email HTML: nested layout tables whose columns
   are <th>. These data-table rules must not reach them. */
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content table,
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .mobile-content table {
  width: 100%;
  border-collapse: collapse;
  background: var(--qg-surface);
  border: 1px solid var(--qg-line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 13.5px;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content th,
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .mobile-content th {
  background: var(--qg-surface-2) !important;
  color: var(--qg-text-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid var(--qg-line) !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content td,
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .mobile-content td {
  color: var(--qg-text-body) !important;
  border-bottom: 1px solid var(--qg-line-soft) !important;
  background: transparent !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content select,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content textarea,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .mobile-content input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
body:not(.qg-dash):not(.qg-home):not(.cm-page) .mobile-content select,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .mobile-content textarea,
.login-body input:not([type='checkbox']):not([type='radio']) {
  background: var(--qg-surface) !important;
  color: var(--qg-text) !important;
  border: 1px solid var(--qg-line-strong) !important;
  border-radius: 8px !important;
  font-family: var(--qg-font) !important;
  box-shadow: none !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content input:focus,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content select:focus,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content textarea:focus,
.login-body input:focus {
  outline: none !important;
  border-color: var(--qg-accent) !important;
  box-shadow: 0 0 0 3px var(--qg-accent-soft) !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) a:not(.qg-btn):not(.nav-section-link) {
  /* don't restyle nav rows */
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.phf-page) .main-content a:not(.qg-btn):not([class*='button']):not([class*='btn']),
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.phf-page) .mobile-content a:not(.qg-btn):not([class*='button']):not([class*='btn']) {
  color: var(--qg-link);
  text-underline-offset: 3px;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.phf-page) .main-content a:not(.qg-btn):not([class*='button']):not([class*='btn']):hover,
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.phf-page) .mobile-content a:not(.qg-btn):not([class*='button']):not([class*='btn']):hover {
  color: var(--qg-accent-hover);
}

/* ----------------------------------------------------------------- auth */

.login-body {
  background: var(--qg-surface-2) !important;
  font-family: var(--qg-font) !important;
  color: var(--qg-text-body) !important;
  min-height: 100vh;
}

.login-body .animated-background,
.login-body #spaceCanvas {
  display: none !important;
}

.login-body .login-box {
  background: var(--qg-surface) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 60px rgba(12, 17, 27, 0.08) !important;
  color: var(--qg-text-body) !important;
}

.login-body .login-box::before {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin: 0 auto 18px;
  background: var(--qg-gold);
  border-radius: 2px;
}

.login-body .login-subtext,
.login-body label,
.login-body .signup-text {
  color: var(--qg-text-muted) !important;
  font-family: var(--qg-font) !important;
}

.login-body .login-logo {
  filter: none !important;
  max-width: 220px !important;
}

html[data-theme='dark'] .login-body .login-logo {
  filter: brightness(1.15) !important;
}

.login-body .login-btn,
.login-body button[type='submit'] {
  background: var(--qg-blue) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 8px !important;
  font-family: var(--qg-font) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

.login-body .login-btn:hover,
.login-body button[type='submit']:hover {
  background: var(--qg-blue-deep) !important;
}

.login-body a.signup-link,
.login-body a.forgot-password {
  color: var(--qg-accent) !important;
  font-weight: 600;
}

/* =========================================================== ERGONOMICS
   The canvas repainted surfaces. These rules fix how the old components
   sit on that surface: reading width, control size, and theme contrast.
   =========================================================== */

/* The staggered fade starts every block at opacity 0. On a long lesson that
   reads as the page still loading. Content should be there immediately. */
body:not(.cm-page) .main-content > * {
  animation: none !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) :focus-visible {
  outline: 2px solid var(--qg-focus, var(--qg-accent));
  outline-offset: 2px;
}

/* ---------------------------------------------------- lesson reading cards */

.lesson-content-container .blockcontent,
.interview-content-container {
  max-width: 880px;
}

.blockcontent .panel,
html[data-theme='dark'] .blockcontent .panel,
.blockcontent > .panel:first-of-type {
  background: var(--qg-surface) !important;
  color: var(--qg-text-body) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  padding: 22px 24px 22px 26px !important;
  margin: 0 0 14px !important;
  transform: none !important;
}

.blockcontent .panel:hover,
.blockcontent > .panel:hover {
  transform: none !important;
  box-shadow: none !important;
}

.blockcontent > .panel::before,
.blockcontent > .panel:nth-of-type(n)::before {
  width: 2px !important;
  background: var(--qg-gold) !important;
}

.blockcontent .panel > h2,
.blockcontent .panel > h2::after {
  color: var(--qg-text) !important;
}

.blockcontent .panel > h2::before {
  background: var(--qg-accent-soft) !important;
  border-color: var(--qg-accent-line) !important;
  color: var(--qg-accent) !important;
}

.blockcontent p,
.blockcontent li,
.blockcontent em,
html[data-theme='dark'] .blockcontent,
html[data-theme='dark'] .blockcontent p {
  color: var(--qg-text-body) !important;
}

.blockcontent strong {
  color: var(--qg-text) !important;
}

.blockcontent .qg-callout,
.blockcontent .qg-callout--def,
.blockcontent .qg-callout--intuition,
.blockcontent .qg-callout--quant {
  background: var(--qg-surface-2) !important;
  border: 1px solid var(--qg-line) !important;
  box-shadow: none !important;
  color: var(--qg-text-body) !important;
}

.blockcontent .qg-callout__title,
.blockcontent .qg-callout--def .qg-callout__title,
.blockcontent .qg-callout--intuition .qg-callout__title,
.blockcontent .qg-callout--quant .qg-callout__title {
  color: var(--qg-accent) !important;
  font-weight: 600 !important;
}

.blockcontent .qg-callout--insight {
  background: var(--qg-gold-soft) !important;
  border-color: var(--qg-gold-line) !important;
}

.blockcontent .qg-callout--insight .qg-callout__title {
  color: var(--qg-gold-text) !important;
}

.blockcontent .qg-callout--example {
  background: var(--qg-pos-soft) !important;
  border-color: var(--qg-pos-line) !important;
}

.blockcontent .qg-callout--example .qg-callout__title {
  color: var(--qg-pos) !important;
}

.blockcontent .qg-callout--warn {
  background: var(--qg-neg-soft) !important;
  border-color: var(--qg-neg-line) !important;
}

.blockcontent .qg-callout--warn .qg-callout__title {
  color: var(--qg-neg) !important;
}

.blockcontent .qg-formula {
  background: var(--qg-surface-2) !important;
  border: 1px solid var(--qg-line) !important;
  box-shadow: none !important;
  color: var(--qg-text) !important;
  border-radius: 12px !important;
}

.blockcontent .js-plotly-plot,
.blockcontent .plotly-graph-div {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--qg-line);
  margin: 14px 0 18px;
}

.blockcontent,
.qg-note,
.lesson-content-container,
.panel {
  max-width: 100%;
  min-width: 0;
}

.blockcontent mjx-container,
.qg-note mjx-container,
.lesson-content-container mjx-container {
  max-width: 100%;
  min-width: 0;
  overflow: visible !important;
}

.blockcontent mjx-container[display='true'],
.qg-note mjx-container[display='true'],
.lesson-content-container mjx-container[display='true'],
.interview-content-container mjx-container[display='true'] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden !important;
}

.blockcontent mjx-container[display='true'] > svg,
.qg-note mjx-container[display='true'] > svg,
.lesson-content-container mjx-container[display='true'] > svg,
.qg-formula mjx-container[display='true'] > svg {
  max-width: 100%;
  height: auto !important;
}

.blockcontent pre,
.blockcontent code,
.interview-content-container pre,
.interview-content-container code {
  font-family: var(--qg-font-mono);
  font-size: 13px;
}

.blockcontent pre,
.interview-content-container pre {
  background: var(--qg-surface-2);
  border: 1px solid var(--qg-line);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
}

/* ------------------------------------------------- interview question body */

.interview-content-container .question-box,
.interview-content-container .solution-content,
.interview-content-container .hint-box {
  background: var(--qg-surface-2) !important;
  color: var(--qg-text-body) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.solution-button,
.action-button,
.hint-button,
.study-button,
.show-btn,
.premium-subscribe-btn,
.subscribe-btn {
  min-height: 40px;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  background: var(--qg-blue) !important;
  color: #fff !important;
  box-shadow: none !important;
  transform: none !important;
  font-family: var(--qg-font) !important;
  font-weight: 600 !important;
}

.solution-button:hover,
.action-button:hover,
.show-btn:hover {
  transform: none !important;
  filter: none !important;
  background: var(--qg-blue-deep) !important;
  box-shadow: none !important;
}

/* ----------------------------------------------------------- index cards */

body:not(.qg-dash):not(.qg-home):not(.cm-page) .topic-card,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .qc-card,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .bz-card,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .lh-course-card,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .qc-info-card {
  background: var(--qg-surface) !important;
  color: var(--qg-text-body) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .topic-card:hover,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .qc-card:hover,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .bz-card:hover,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .lh-course-card:hover {
  transform: none !important;
  border-color: var(--qg-accent-line) !important;
  box-shadow: none !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .topic-card h3,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .topic-card h4,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .qc-card h3,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .qc-card h4,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .bz-card h3,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .lh-course-card h3 {
  color: var(--qg-text) !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .topic-card p,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .qc-card p,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .bz-card p {
  color: var(--qg-text-muted) !important;
}

/* -------------------------------------------------------------- controls */

body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content select,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content textarea,
.login-body input:not([type='checkbox']):not([type='radio']) {
  min-height: 42px;
  padding: 8px 12px !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content th,
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content td,
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .mobile-content th,
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .mobile-content td {
  padding: 10px 12px !important;
}

@media (max-width: 768px) {
  .blockcontent .panel,
  html[data-theme='dark'] .blockcontent .panel {
    padding: 16px 14px 16px 16px !important;
  }

  body:not(.qg-dash):not(.qg-home):not(.cm-page) .main-content {
    max-width: none;
  }
}

/* ----------------------------------------------- heroes, banners, actions */

.hero-section,
.hero-content,
.header-content {
  text-align: center;
}

.hero-content,
.header-content {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section h1,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section h2,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-title {
  font-size: clamp(30px, 4vw, 42px) !important;
  margin: 0 auto 12px !important;
  text-align: center !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section p,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section h1,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section h2,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section h3,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-section [class*='__kicker'] {
  color: inherit !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-actions,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .hero-cta,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .cta-row,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .premium-cta,
body:not(.qg-dash):not(.qg-home):not(.cm-page) .header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.subscription-banner .banner-content,
.email-verification-warning .warning-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
  text-align: left;
}

.subscription-banner .banner-text {
  min-width: 0;
  flex: 1;
}

.subscription-banner,
.subscription-banner strong {
  color: var(--qg-text) !important;
  -webkit-text-fill-color: var(--qg-text) !important;
}

.subscription-banner p,
.subscription-banner .banner-text p {
  color: var(--qg-text-muted) !important;
  -webkit-text-fill-color: var(--qg-text-muted) !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  text-shadow: none !important;
}

.subscription-banner strong {
  font-size: 16px !important;
  font-weight: 600 !important;
  text-shadow: none !important;
}

.subscription-banner .subscribe-button {
  background: var(--qg-blue) !important;
  border: 1px solid var(--qg-blue) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-radius: var(--qg-r-ctl) !important;
  box-shadow: var(--qg-sh-btn) !important;
  animation: none !important;
  min-height: 38px;
  height: 38px;
  padding: 0 16px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
}

.subscription-banner .subscribe-button i {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.subscription-banner .subscribe-button:hover {
  background: var(--qg-blue-deep) !important;
  border-color: var(--qg-blue-deep) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.subscription-banner--discord,
.subscription-banner--discord strong {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.subscription-banner--discord p,
.subscription-banner--discord .banner-text p {
  color: rgba(255, 255, 255, 0.78) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.78) !important;
}

.subscription-banner--discord .subscribe-button {
  background: #5865f2 !important;
  border-color: #5865f2 !important;
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.45) !important;
}

.subscription-banner--discord .subscribe-button:hover {
  background: #4752c4 !important;
  border-color: #4752c4 !important;
}

.hero-section .subscribe-btn,
.hero-section .subscribe-button,
.premium-lesson-banner .premium-subscribe-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  background: var(--qg-gold) !important;
  color: #1c1400 !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none !important;
  flex: none;
}

.hero-section .subscribe-btn:hover,
.premium-lesson-banner .premium-subscribe-btn:hover {
  background: var(--qg-gold-deep) !important;
  color: #1c1400 !important;
  transform: none !important;
}

.premium-lesson-banner,
.premium-banner-content,
.premium-text-content {
  text-align: center !important;
}

.premium-banner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 28px !important;
}

.premium-features {
  text-align: left;
  width: min(100%, 460px);
  margin: 8px auto 16px;
}

.email-verification-warning .verify-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--qg-blue);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  flex: none;
}

@media (max-width: 720px) {
  .subscription-banner .banner-content,
  .email-verification-warning .warning-content {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .subscription-banner .subscribe-button,
  .email-verification-warning .verify-button {
    width: 100%;
  }
}

/* --------------------------------------- shared section headers
   Same blue title + subtitle treatment as the dashboard, on every
   page that is not the quiet home layout or Guild Letters paper.
   --------------------------------------------------------------- */

body:not(.qg-home):not(.letters-page) .main-content .section-header h2,
body:not(.qg-home):not(.letters-page) .main-content .brand-panel__title,
body:not(.qg-home):not(.letters-page) .main-content .welcome-section h3,
body:not(.qg-home):not(.letters-page) .main-content .lesson-title,
body:not(.qg-home):not(.letters-page) .main-content .interview-title,
body:not(.qg-home):not(.letters-page) .main-content .mobile-interview-title {
  color: var(--qg-blue) !important;
  -webkit-text-fill-color: var(--qg-blue) !important;
  background: none !important;
}

body:not(.qg-home):not(.letters-page) .main-content .section-subtitle,
body:not(.qg-home):not(.letters-page) .main-content .brand-panel__subtitle,
body:not(.qg-home):not(.letters-page) .main-content .welcome-section .subtitle,
body:not(.qg-home):not(.letters-page) .main-content .lesson-subtitle,
body:not(.qg-home):not(.letters-page) .main-content .interview-subtitle {
  color: #1a62c2 !important;
  -webkit-text-fill-color: #1a62c2 !important;
}

body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content .section-header,
body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content .brand-panel__header {
  border-bottom: 1px solid #d5e4f7;
  padding-bottom: 12px;
}

body.learning-hub-page:not(.qg-dash) .main-content .dashboard-header {
  background: none !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 1px solid #d5e4f7 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 0 14px !important;
  margin-bottom: 22px !important;
  color: var(--qg-blue) !important;
}

body.learning-hub-page:not(.qg-dash) .main-content .dashboard-header::before,
body.learning-hub-page:not(.qg-dash) .main-content .dashboard-header::after {
  display: none !important;
}

body.learning-hub-page:not(.qg-dash) .main-content .dashboard-header .lh-kicker {
  color: var(--qg-blue) !important;
}

body.learning-hub-page:not(.qg-dash) .main-content .dashboard-grid .section-box .section-header {
  background: #eef4fc !important;
  background-image: none !important;
  color: var(--qg-blue) !important;
  border-bottom: 1px solid #d5e4f7 !important;
}

body.learning-hub-page:not(.qg-dash) .main-content .dashboard-grid .section-box .section-header::before {
  display: none !important;
}

html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .section-header h2,
html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .brand-panel__title,
html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .welcome-section h3,
html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .lesson-title,
html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .interview-title,
html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .mobile-interview-title,
html[data-theme='dark'] body.learning-hub-page:not(.qg-dash) .main-content .dashboard-header .lh-kicker {
  color: #8eb6f0 !important;
  -webkit-text-fill-color: #8eb6f0 !important;
}

html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .section-subtitle,
html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .brand-panel__subtitle,
html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .welcome-section .subtitle,
html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .lesson-subtitle,
html[data-theme='dark'] body:not(.qg-home):not(.letters-page) .main-content .interview-subtitle {
  color: #a9c8f5 !important;
  -webkit-text-fill-color: #a9c8f5 !important;
}

html[data-theme='dark'] body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content .section-header,
html[data-theme='dark'] body:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content .brand-panel__header,
html[data-theme='dark'] body.learning-hub-page:not(.qg-dash) .main-content .dashboard-header {
  border-bottom-color: rgba(126, 176, 240, 0.28) !important;
}

html[data-theme='dark'] body.learning-hub-page:not(.qg-dash) .main-content .dashboard-grid .section-box .section-header {
  background: rgba(77, 148, 232, 0.08) !important;
  border-bottom-color: rgba(126, 176, 240, 0.28) !important;
}

/* Dashboard, history, and bookmarks: Quant Guild blue bar, white title,
   off-white subtitle. Beats the shared light-blue text treatment above. */
body.qg-dash .main-content .qg-dash-sec .section-header h2,
body.qg-dash .main-content .qg-tbl-head h2,
body.learning-hub-page.history-page .main-content .dashboard-grid .section-box .section-header h2,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box .section-header h2,
body.learning-hub-page.history-page .main-content .dashboard-grid .section-box .section-header h2 i,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box .section-header h2 i,
html[data-theme='dark'] body.qg-dash .main-content .qg-dash-sec .section-header h2,
html[data-theme='dark'] body.qg-dash .main-content .qg-tbl-head h2,
html[data-theme='dark'] body.learning-hub-page.history-page .main-content .dashboard-grid .section-box .section-header h2,
html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box .section-header h2,
html[data-theme='dark'] body.learning-hub-page.history-page .main-content .dashboard-grid .section-box .section-header h2 i,
html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box .section-header h2 i {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.qg-dash .main-content .qg-dash-sec .section-header .section-subtitle,
body.qg-dash .main-content .qg-tbl-head p,
body.learning-hub-page.history-page .main-content .dashboard-grid .section-box .section-header .section-subtitle,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box .section-header .section-subtitle,
html[data-theme='dark'] body.qg-dash .main-content .qg-dash-sec .section-header .section-subtitle,
html[data-theme='dark'] body.qg-dash .main-content .qg-tbl-head p,
html[data-theme='dark'] body.learning-hub-page.history-page .main-content .dashboard-grid .section-box .section-header .section-subtitle,
html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box .section-header .section-subtitle {
  color: #f4f1ea !important;
  -webkit-text-fill-color: #f4f1ea !important;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .section-box .section-header,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box .section-header,
html[data-theme='dark'] body.learning-hub-page.history-page .main-content .dashboard-grid .section-box .section-header,
html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box .section-header {
  background: var(--qg-blue) !important;
  background-image: none !important;
  color: #fff !important;
  border-bottom-color: transparent !important;
}

/* ----------------------------------------------- full-bleed sheets
   Roadmap and Resumes are a single panel. Sit it on the content edges
   with square corners, and paint the hero the same light blue as the
   dashboard table heads.
   --------------------------------------------------------------- */

body.qg-sheet:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content,
body.qg-sheet:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .mobile-content {
  padding: 0 !important;
}

body.qg-sheet:not(.qg-dash):not(.qg-home):not(.cm-page) .roadmap-desktop.roadmap-panel,
body.qg-sheet:not(.qg-dash):not(.qg-home):not(.cm-page) .roadmap-mobile.roadmap-panel {
  margin: 0 !important;
  width: 100%;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.qg-sheet .roadmap-desktop .rm-hero,
body.qg-sheet .roadmap-mobile .rm-hero {
  border-radius: 0 !important;
}

html:not([data-theme='dark']) body.qg-sheet .rm-hero {
  background: #eef4fc !important;
  background-image: none !important;
  color: var(--qg-blue);
  border-bottom: 1px solid #d5e4f7;
}

html:not([data-theme='dark']) body.qg-sheet .rm-hero::before,
html:not([data-theme='dark']) body.qg-sheet .rm-hero::after {
  display: none;
}

html:not([data-theme='dark']) body.qg-sheet .rm-hero__eyebrow {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  color: #1a62c2;
}

html:not([data-theme='dark']) body.qg-sheet .rm-hero__eyebrow i {
  color: var(--qg-blue);
}

html:not([data-theme='dark']) body.qg-sheet .rm-hero__title,
html:not([data-theme='dark']) body.qg-sheet .rm-hero__stat-num {
  color: var(--qg-blue) !important;
  -webkit-text-fill-color: var(--qg-blue) !important;
}

html:not([data-theme='dark']) body.qg-sheet .rm-hero__lead,
html:not([data-theme='dark']) body.qg-sheet .rm-hero__stat-label {
  color: #1a62c2 !important;
  -webkit-text-fill-color: #1a62c2 !important;
}

html:not([data-theme='dark']) body.qg-sheet .rm-hero__stat-div {
  background: #d5e4f7;
}

/* Dark sheet hero matches roadmap and resume: a quiet blue wash, not the
   saturated gradient the learning-hub hero still uses. */
html[data-theme='dark'] body.interviews-brand-page.qg-sheet .rm-hero {
  background: rgba(77, 148, 232, 0.08) !important;
  background-image: none !important;
  color: #a9c8f5;
  border-bottom: 1px solid rgba(126, 176, 240, 0.28);
}

html[data-theme='dark'] body.interviews-brand-page.qg-sheet .rm-hero::before,
html[data-theme='dark'] body.interviews-brand-page.qg-sheet .rm-hero::after {
  display: none;
}

html[data-theme='dark'] body.interviews-brand-page.qg-sheet .rm-hero__eyebrow {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  color: #a9c8f5 !important;
  -webkit-text-fill-color: #a9c8f5 !important;
}

html[data-theme='dark'] body.interviews-brand-page.qg-sheet .rm-hero__eyebrow i {
  color: #a9c8f5 !important;
  -webkit-text-fill-color: #a9c8f5 !important;
}

html[data-theme='dark'] body.interviews-brand-page.qg-sheet .brand-panel .rm-hero h1.rm-hero__title,
html[data-theme='dark'] body.interviews-brand-page.qg-sheet .rm-hero__stat-num {
  color: #8eb6f0 !important;
  -webkit-text-fill-color: #8eb6f0 !important;
}

html[data-theme='dark'] body.interviews-brand-page.qg-sheet .rm-hero__lead,
html[data-theme='dark'] body.interviews-brand-page.qg-sheet .rm-hero__stat-label {
  color: #a9c8f5 !important;
  -webkit-text-fill-color: #a9c8f5 !important;
}

html[data-theme='dark'] body.interviews-brand-page.qg-sheet .rm-hero__stat-div {
  background: rgba(126, 176, 240, 0.28);
}

/* History and bookmarks locks use the same split overlay as the dashboard:
   offer on the left, membership benefits in a two-by-two tile grid. */
body.history-page .qg-gate--split,
body.bookmarks-page .qg-gate--split {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 28px 40px;
  margin: 0;
  padding: 28px 32px !important;
  text-align: left !important;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .section-box > .qg-gate--split,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box > .qg-gate--split {
  padding: 28px 32px !important;
}

body.history-page .qg-gate--split .qg-gate__lead,
body.bookmarks-page .qg-gate--split .qg-gate__lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

body.history-page .qg-gate--split .qg-gate__ico,
body.bookmarks-page .qg-gate--split .qg-gate__ico {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--qg-r-ctl);
  display: grid;
  place-items: center;
  background: var(--qg-gold-soft);
  border: 1px solid var(--qg-gold-line);
  color: var(--qg-gold-text);
  font-size: var(--qg-fs-base);
}

body.history-page .qg-gate--split h3,
body.bookmarks-page .qg-gate--split h3 {
  margin: 0 !important;
  font-family: var(--qg-font-display) !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  letter-spacing: -0.024em !important;
  line-height: 1.2 !important;
  color: var(--qg-blue) !important;
  -webkit-text-fill-color: var(--qg-blue) !important;
  background: none !important;
}

body.history-page .qg-gate--split p,
body.bookmarks-page .qg-gate--split p {
  margin: 0 !important;
  max-width: 36ch;
  font-size: var(--qg-fs-sm) !important;
  line-height: 1.5 !important;
  color: var(--qg-text-muted) !important;
  -webkit-text-fill-color: var(--qg-text-muted) !important;
}

body.history-page .qg-gate--split .qg-gate__lead .qg-btn,
body.bookmarks-page .qg-gate--split .qg-gate__lead .qg-btn {
  margin-top: 6px;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.history-page .qg-gate--split .qg-gate__lead .qg-btn i,
body.bookmarks-page .qg-gate--split .qg-gate__lead .qg-btn i {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: none;
  width: auto;
  height: auto;
  font-size: inherit;
}

body.history-page .qg-gate--split .qg-gate__list,
body.bookmarks-page .qg-gate--split .qg-gate__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-self: stretch;
}

body.history-page .qg-gate--split .qg-gate__list li,
body.bookmarks-page .qg-gate--split .qg-gate__list li {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f4f8fd;
  border: 1px solid #d5e4f7;
  line-height: 1.45;
  font-size: 13.5px;
  color: var(--qg-text-body);
  text-align: center;
}

body.history-page .qg-gate--split .qg-gate__list li > span,
body.bookmarks-page .qg-gate--split .qg-gate__list li > span {
  display: block;
  width: fit-content;
  max-width: 100%;
  text-align: center;
}

body.history-page .qg-gate--split .qg-gate__list i,
body.bookmarks-page .qg-gate--split .qg-gate__list i {
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  margin-inline-end: 8px;
  font-size: 9px;
  color: var(--qg-accent);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--qg-wash);
}

html[data-theme='dark'] body.history-page .qg-gate--split h3,
html[data-theme='dark'] body.bookmarks-page .qg-gate--split h3 {
  color: #8eb6f0 !important;
  -webkit-text-fill-color: #8eb6f0 !important;
}

html[data-theme='dark'] body.history-page .qg-gate--split .qg-gate__list li,
html[data-theme='dark'] body.bookmarks-page .qg-gate--split .qg-gate__list li {
  background: rgba(77, 148, 232, 0.08);
  border-color: rgba(126, 176, 240, 0.28);
  color: var(--qg-text-body);
}

@media (max-width: 900px) {
  body.history-page .qg-gate--split,
  body.bookmarks-page .qg-gate--split,
  body.history-page .qg-gate--split .qg-gate__list,
  body.bookmarks-page .qg-gate--split .qg-gate__list {
    grid-template-columns: 1fr;
  }
}

/* Bookmarks overview and the history/bookmarks filters use the same quiet
   panel language as the dashboard: light header, flat metric cells, and
   compact controls instead of gradient cards and pill buttons. */
body.learning-hub-page.history-page .main-content .dashboard-grid .section-box:has(.filter-container),
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box:has(.filter-container),
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box.bookmarks-stats-overview {
  background: var(--qg-surface);
  border: 1px solid var(--qg-line);
  border-radius: var(--qg-r-card);
  box-shadow: var(--qg-sh-hair);
}

body.learning-hub-page.history-page .main-content .dashboard-grid .section-box:has(.filter-container) .section-header h2,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box:has(.filter-container) .section-header h2,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .section-header h2 {
  font-family: var(--qg-font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.2;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .section-box:has(.filter-container) .section-header h2 i,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-box:has(.filter-container) .section-header h2 i,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .section-header h2 i {
  color: #fff;
  font-size: 15px;
}

body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview > .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
}

body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 22px 24px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-card + .stat-card {
  border-left: 1px solid var(--qg-line);
}

body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-card:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
  background: transparent;
}

body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-icon {
  width: 36px;
  height: 36px;
  margin: 0;
  flex: none;
  border-radius: var(--qg-r-ctl);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--qg-accent);
  background: var(--qg-surface-tint);
  border: 1px solid var(--qg-surface-tint-line);
  box-shadow: none;
}

body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-label {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--qg-text-muted);
}

body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-value {
  font-family: var(--qg-font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--qg-blue);
  font-variant-numeric: tabular-nums;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .filter-container,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .filter-container {
  gap: 16px;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .filter-row,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .filter-row {
  gap: 14px;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .filter-group,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .filter-group {
  gap: 6px;
  min-width: 0;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .filter-container label,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .filter-container label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--qg-text);
}

body.learning-hub-page.history-page .main-content .dashboard-grid .filter-container select,
body.learning-hub-page.history-page .main-content .dashboard-grid .filter-container input,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .filter-container select,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .filter-container input {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid var(--qg-line-strong);
  border-radius: var(--qg-r-ctl);
  background: var(--qg-surface);
  color: var(--qg-text);
  font-family: inherit;
  font-size: 13.5px;
  box-shadow: none;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .filter-container select:focus,
body.learning-hub-page.history-page .main-content .dashboard-grid .filter-container input:focus,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .filter-container select:focus,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .filter-container input:focus {
  outline: 2px solid var(--qg-accent);
  outline-offset: 1px;
  border-color: var(--qg-accent);
  box-shadow: none;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .filter-actions,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .filter-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 0;
}

body.learning-hub-page.history-page .main-content .dashboard-grid #apply-filters,
body.learning-hub-page.history-page .main-content .dashboard-grid #reset-filters,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid #apply-filters,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid #reset-filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--qg-r-ctl);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  cursor: pointer;
  transition: background var(--qg-dur) var(--qg-ease),
    border-color var(--qg-dur) var(--qg-ease),
    color var(--qg-dur) var(--qg-ease),
    transform var(--qg-dur) var(--qg-ease),
    box-shadow var(--qg-dur) var(--qg-ease);
}

body.learning-hub-page.history-page .main-content .dashboard-grid #apply-filters,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid #apply-filters {
  background: var(--qg-blue);
  border: 1px solid var(--qg-blue);
  color: #fff;
  box-shadow: var(--qg-sh-btn);
}

body.learning-hub-page.history-page .main-content .dashboard-grid #apply-filters:hover,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid #apply-filters:hover {
  background: var(--qg-blue-deep);
  border-color: var(--qg-blue-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--qg-sh-btn-hover);
}

body.learning-hub-page.history-page .main-content .dashboard-grid #reset-filters,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid #reset-filters {
  background: var(--qg-surface);
  border: 1px solid var(--qg-line);
  color: var(--qg-text);
  box-shadow: var(--qg-sh-hair);
}

body.learning-hub-page.history-page .main-content .dashboard-grid #reset-filters:hover,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid #reset-filters:hover {
  color: var(--qg-accent);
  border-color: var(--qg-accent-line);
  background: var(--qg-surface-tint);
  transform: translateY(-1px);
}

/* Page / Next sit on the Quant Guild blue header, so the controls stay light. */
body.learning-hub-page.history-page .main-content .dashboard-grid .section-header--split .page-button,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-header--split .page-button,
html[data-theme='dark'] body.learning-hub-page.history-page .main-content .dashboard-grid .section-header--split .page-button,
html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-header--split .page-button {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  -webkit-text-fill-color: #fff;
  border-radius: var(--qg-r-ctl);
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .section-header--split .page-button:hover,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-header--split .page-button:hover,
html[data-theme='dark'] body.learning-hub-page.history-page .main-content .dashboard-grid .section-header--split .page-button:hover,
html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-header--split .page-button:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: #fff;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

body.learning-hub-page.history-page .main-content .dashboard-grid .section-header--split .page-info,
body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-header--split .page-info,
html[data-theme='dark'] body.learning-hub-page.history-page .main-content .dashboard-grid .section-header--split .page-info,
html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .section-header--split .page-info {
  color: #f4f1ea;
  -webkit-text-fill-color: #f4f1ea;
  font-size: 13px;
  font-weight: 600;
}

/* History and bookmarks tables: the question column keeps a fixed share
   of the row and ellipsizes. It must not grow with the question text. */
body.history-page .main-content .table-container,
body.bookmarks-page .main-content .table-container {
  overflow-x: hidden;
  max-width: 100%;
}

body.history-page .main-content .table-container table,
body.bookmarks-page .main-content .table-container table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
}

body.history-page .main-content .table-container th,
body.history-page .main-content .table-container td,
body.bookmarks-page .main-content .table-container th,
body.bookmarks-page .main-content .table-container td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.history-page .main-content .table-container th:nth-child(1),
body.history-page .main-content .table-container td:nth-child(1),
body.bookmarks-page .main-content .table-container th:nth-child(1),
body.bookmarks-page .main-content .table-container td:nth-child(1) {
  width: 8%;
  max-width: 8%;
  text-align: left;
}

body.history-page .main-content .table-container th:nth-child(2),
body.history-page .main-content .table-container td.question-cell,
body.bookmarks-page .main-content .table-container th:nth-child(2),
body.bookmarks-page .main-content .table-container td.question-cell {
  width: 36%;
  max-width: 36%;
  text-align: left;
}

body.history-page .main-content .table-container .question-text,
body.bookmarks-page .main-content .table-container .question-text {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.history-page .main-content .table-container .question-text mjx-container,
body.bookmarks-page .main-content .table-container .question-text mjx-container {
  max-width: 100%;
  overflow: hidden;
  vertical-align: middle;
}

body.history-page .mobile-section:has(#mobile-filter-content) .mobile-section-header,
body.bookmarks-page .mobile-section:has(#mobile-filter-content) .mobile-section-header,
html[data-theme='dark'] body.history-page .mobile-section:has(#mobile-filter-content) .mobile-section-header,
html[data-theme='dark'] body.bookmarks-page .mobile-section:has(#mobile-filter-content) .mobile-section-header {
  background: var(--qg-blue);
  border-bottom-color: transparent;
}

body.history-page .mobile-section:has(#mobile-filter-content) .mobile-section-header h2,
body.bookmarks-page .mobile-section:has(#mobile-filter-content) .mobile-section-header h2,
body.history-page .mobile-section:has(#mobile-filter-content) .mobile-section-header h2 i,
body.bookmarks-page .mobile-section:has(#mobile-filter-content) .mobile-section-header h2 i,
html[data-theme='dark'] body.history-page .mobile-section:has(#mobile-filter-content) .mobile-section-header h2,
html[data-theme='dark'] body.bookmarks-page .mobile-section:has(#mobile-filter-content) .mobile-section-header h2,
html[data-theme='dark'] body.history-page .mobile-section:has(#mobile-filter-content) .mobile-section-header h2 i,
html[data-theme='dark'] body.bookmarks-page .mobile-section:has(#mobile-filter-content) .mobile-section-header h2 i {
  color: #fff;
}

/* Same blue hero card as the dashboard. The shared mobile type rules would
   paint the title and subtitle dark on that ground. */
body.history-page .mobile-history-header h3,
body.bookmarks-page .mobile-bookmarks-header h3,
body.history-page .mobile-history-header h3 i,
body.bookmarks-page .mobile-bookmarks-header h3 i,
body.history-page .mobile-history-header p,
body.bookmarks-page .mobile-bookmarks-header p,
html[data-theme='dark'] body.history-page .mobile-history-header h3,
html[data-theme='dark'] body.bookmarks-page .mobile-bookmarks-header h3,
html[data-theme='dark'] body.history-page .mobile-history-header h3 i,
html[data-theme='dark'] body.bookmarks-page .mobile-bookmarks-header h3 i,
html[data-theme='dark'] body.history-page .mobile-history-header p,
html[data-theme='dark'] body.bookmarks-page .mobile-bookmarks-header p {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.history-page .mobile-history-header h3,
body.bookmarks-page .mobile-bookmarks-header h3 {
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
  line-height: 1.2 !important;
}

body.history-page .mobile-history-header p,
body.bookmarks-page .mobile-bookmarks-header p {
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.9;
}

body.history-page .mobile-section-header h2,
body.bookmarks-page .mobile-section-header h2,
body.history-page .mobile-section-header h2 i,
body.bookmarks-page .mobile-section-header h2 i,
html[data-theme='dark'] body.history-page .mobile-section-header h2,
html[data-theme='dark'] body.bookmarks-page .mobile-section-header h2,
html[data-theme='dark'] body.history-page .mobile-section-header h2 i,
html[data-theme='dark'] body.bookmarks-page .mobile-section-header h2 i {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.history-page .mobile-section-header h2 i,
body.bookmarks-page .mobile-section-header h2 i,
html[data-theme='dark'] body.history-page .mobile-section-header h2 i,
html[data-theme='dark'] body.bookmarks-page .mobile-section-header h2 i {
  color: #facc15 !important;
  -webkit-text-fill-color: #facc15 !important;
}

body.history-page .mobile-filter-group label,
body.bookmarks-page .mobile-filter-group label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--qg-text);
}

body.history-page .mobile-filter-group select,
body.history-page .mobile-filter-group input,
body.bookmarks-page .mobile-filter-group select,
body.bookmarks-page .mobile-filter-group input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--qg-line-strong);
  border-radius: var(--qg-r-ctl);
  background: var(--qg-surface);
  color: var(--qg-text);
  font-family: inherit;
  font-size: 13.5px;
  box-shadow: none;
}

body.history-page .mobile-filter-group select:focus,
body.history-page .mobile-filter-group input:focus,
body.bookmarks-page .mobile-filter-group select:focus,
body.bookmarks-page .mobile-filter-group input:focus {
  outline: 2px solid var(--qg-accent);
  outline-offset: 1px;
  border-color: var(--qg-accent);
  box-shadow: none;
}

body.history-page .mobile-filter-actions button,
body.bookmarks-page .mobile-filter-actions button {
  height: 42px;
  padding: 0 16px;
  border-radius: var(--qg-r-ctl);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
}

body.history-page .mobile-filter-actions button:first-child,
body.bookmarks-page .mobile-filter-actions button:first-child {
  background: var(--qg-blue);
  border: 1px solid var(--qg-blue);
  color: #fff;
  box-shadow: var(--qg-sh-btn);
}

body.history-page .mobile-filter-actions button:last-child,
body.bookmarks-page .mobile-filter-actions button:last-child {
  background: var(--qg-surface);
  border: 1px solid var(--qg-line);
  color: var(--qg-text);
  box-shadow: var(--qg-sh-hair);
}

html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-card,
html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-card:hover {
  background: transparent;
  box-shadow: none;
}

html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-card + .stat-card {
  border-left-color: rgba(126, 176, 240, 0.28);
}

html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-icon {
  background: rgba(77, 148, 232, 0.14);
  border-color: rgba(126, 176, 240, 0.28);
  color: #8eb6f0;
}

html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-value {
  color: #8eb6f0;
}

html[data-theme='dark'] body.learning-hub-page.history-page .main-content .dashboard-grid #apply-filters,
html[data-theme='dark'] body.learning-hub-page.bookmarks-page .main-content .dashboard-grid #apply-filters,
html[data-theme='dark'] body.history-page .mobile-filter-actions button:first-child,
html[data-theme='dark'] body.bookmarks-page .mobile-filter-actions button:first-child {
  background: var(--qg-blue-bright);
  border-color: var(--qg-blue-bright);
  color: #fff;
}


@media (max-width: 800px) {
  body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview > .stats-grid {
    grid-template-columns: 1fr;
  }

  body.learning-hub-page.bookmarks-page .main-content .dashboard-grid .bookmarks-stats-overview .stat-card + .stat-card {
    border-left: 0;
    border-top: 1px solid var(--qg-line);
  }
}

/* =========================================================== LESSONS + PRACTICE
   Drop the old grid / gradient overlay. Lesson reading, the practice
   question, and the answered explanation use the same quiet panels as
   the dashboard.
   =========================================================== */

.lesson-content-container::before,
.lesson-content-container::after,
body.lessons-brand-page .hero-section::before,
body.lessons-brand-page .hero-section::after,
body.lessons-brand-page .mobile-hero::before,
body.lessons-brand-page .mobile-hero::after,
body.lessons-brand-page .lessons-guide-section::before,
body.lessons-brand-page .subscription-banner::before,
body.lessons-brand-page .subscription-banner::after,
body.lessons-brand-page .brand-panel__header::before,
body.lessons-brand-page .brand-panel__header::after,
body.practice-brand-page .brand-panel__header::before,
body.practice-brand-page .brand-panel__header::after,
body.practice-brand-page .pr-mobile-hero::before,
body.practice-brand-page .pr-mobile-hero::after {
  display: none !important;
  content: none !important;
}

/* Lesson catalog hero: type on the page, not a blue gradient card. */
body.lessons-brand-page .hero-section,
body.lessons-brand-page .mobile-hero {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--qg-text) !important;
  text-align: left !important;
  padding: 0 0 8px !important;
  margin-bottom: 8px !important;
}

body.lessons-brand-page .hero-content,
body.lessons-brand-page .mobile-hero-content {
  text-align: left !important;
  margin: 0 !important;
  max-width: none !important;
}

body.lessons-brand-page .hero-title,
body.lessons-brand-page .hero-title i {
  color: var(--qg-blue) !important;
  -webkit-text-fill-color: var(--qg-blue) !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

body.lessons-brand-page .hero-subtitle,
body.lessons-brand-page .hero-tagline,
body.lessons-brand-page .tagline-item,
body.lessons-brand-page .tagline-item span {
  color: #1a62c2 !important;
  -webkit-text-fill-color: #1a62c2 !important;
}

body.lessons-brand-page .hero-tagline {
  justify-content: flex-start !important;
}

body.lessons-brand-page .tagline-item {
  background: var(--qg-surface) !important;
  border: 1px solid var(--qg-line) !important;
  box-shadow: none !important;
}

body.lessons-brand-page .tagline-item i {
  color: var(--qg-accent) !important;
  filter: none !important;
}

body.lessons-brand-page .brand-panel__header {
  padding: 22px 24px 16px !important;
  text-align: left !important;
}

body.lessons-brand-page .brand-panel__body {
  margin: 0 24px 24px !important;
}

body.lessons-brand-page .brand-panel__title,
body.lessons-brand-page .brand-panel__subtitle,
body.lessons-brand-page .brand-panel__kicker {
  text-align: left !important;
}

html[data-theme='dark'] body.lessons-brand-page .hero-title,
html[data-theme='dark'] body.lessons-brand-page .hero-title i {
  color: #8eb6f0 !important;
  -webkit-text-fill-color: #8eb6f0 !important;
}

html[data-theme='dark'] body.lessons-brand-page .hero-subtitle,
html[data-theme='dark'] body.lessons-brand-page .tagline-item,
html[data-theme='dark'] body.lessons-brand-page .tagline-item span {
  color: #a9c8f5 !important;
  -webkit-text-fill-color: #a9c8f5 !important;
}

/* Practice question + answered review. */
body.practice-brand-page .main-content .pr-panel,
body.practice-brand-page .main-content .brand-panel.pr-panel,
body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel,
body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page) .pr-panel {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel__header,
body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content .brand-panel__header {
  padding: 16px 18px !important;
  margin: 0 0 18px !important;
  text-align: left !important;
  background: var(--qg-blue) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: #fff !important;
}

body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel__kicker,
html[data-theme='dark'] body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel__kicker {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #f4f1ea !important;
  -webkit-text-fill-color: #f4f1ea !important;
  letter-spacing: 0.12em !important;
}

body.practice-brand-page:not(.qg-home):not(.letters-page) .main-content .brand-panel__title,
html[data-theme='dark'] body.practice-brand-page:not(.qg-home):not(.letters-page) .main-content .brand-panel__title {
  margin: 8px 0 0 !important;
  text-align: left !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: none !important;
}

body.practice-brand-page:not(.qg-home):not(.letters-page) .main-content .brand-panel__title-accent,
html[data-theme='dark'] body.practice-brand-page:not(.qg-home):not(.letters-page) .main-content .brand-panel__title-accent {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: none !important;
}

body.practice-brand-page:not(.qg-home):not(.letters-page) .main-content .brand-panel__subtitle,
html[data-theme='dark'] body.practice-brand-page:not(.qg-home):not(.letters-page) .main-content .brand-panel__subtitle {
  margin: 6px 0 0 !important;
  text-align: left !important;
  max-width: 640px !important;
  font-size: 14.5px !important;
  color: #f4f1ea !important;
  -webkit-text-fill-color: #f4f1ea !important;
}

body.practice-brand-page .main-content .brand-panel__body,
body.practice-brand-page .brand-panel__body,
body.practice-brand-page .pr-body {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.practice-brand-page .pr-hero-meta {
  justify-content: flex-start !important;
  margin-top: 14px !important;
}

body.practice-brand-page .brand-panel__header .pr-chip,
body.practice-brand-page .pr-mobile-hero .pr-mobile-hero__chip {
  height: auto;
  padding: 6px 12px !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  font-weight: 600 !important;
}

body.practice-brand-page .brand-panel__header .pr-chip i,
body.practice-brand-page .pr-mobile-hero .pr-mobile-hero__chip i {
  color: #fff !important;
  filter: none !important;
}

body.practice-brand-page .brand-panel__header .pr-chip--correct,
body.practice-brand-page .pr-mobile-hero .pr-chip--correct {
  color: var(--qg-pos, #157347) !important;
  background: #e8f6ee !important;
  border-color: #b7e4c7 !important;
}

body.practice-brand-page .brand-panel__header .pr-chip--correct i,
body.practice-brand-page .pr-mobile-hero .pr-chip--correct i { color: var(--qg-pos, #157347) !important; }

body.practice-brand-page .brand-panel__header .pr-chip--incorrect,
body.practice-brand-page .pr-mobile-hero .pr-chip--incorrect {
  color: var(--qg-neg, #b42318) !important;
  background: #fdecec !important;
  border-color: #f5c2c0 !important;
}

body.practice-brand-page .brand-panel__header .pr-chip--incorrect i,
body.practice-brand-page .pr-mobile-hero .pr-chip--incorrect i { color: var(--qg-neg, #b42318) !important; }

@media (min-width: 760px) {
  body.practice-brand-page .brand-panel__header:has(.pr-bookmark-corner) {
    padding-right: 210px !important;
  }
}

body.practice-brand-page .pr-bookmark-corner {
  top: 16px;
  right: 18px;
}

body.practice-brand-page .pr-bookmark-btn {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

body.practice-brand-page .pr-bookmark-btn:hover {
  transform: none !important;
  background: rgba(255, 255, 255, 0.24) !important;
  border-color: #fff !important;
  color: #fff !important;
}

body.practice-brand-page .pr-card,
body.practice-brand-page .pr-explanation-card,
html[data-theme='dark'] body.practice-brand-page .pr-card,
html[data-theme='dark'] body.practice-brand-page .pr-explanation-card {
  background: var(--qg-surface) !important;
  background-image: none !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 16px !important;
  box-shadow: var(--qg-sh-hair, 0 1px 2px rgba(12, 17, 27, 0.04)) !important;
}

body.practice-brand-page .pr-card__eyebrow,
body.practice-brand-page .pr-explanation-card .pr-card__eyebrow,
html[data-theme='dark'] body.practice-brand-page .pr-explanation-card .pr-card__eyebrow {
  color: var(--qg-accent) !important;
  letter-spacing: 0.12em !important;
  font-weight: 600 !important;
}

body.practice-brand-page .pr-card__eyebrow i,
body.practice-brand-page .pr-explanation-card .pr-card__eyebrow i {
  color: var(--qg-accent) !important;
}

body.practice-brand-page .pr-question-card .question-content,
body.practice-brand-page .pr-explanation-card .explanation-content,
html[data-theme='dark'] body.practice-brand-page .pr-question-card .question-content,
html[data-theme='dark'] body.practice-brand-page .pr-explanation-card .explanation-content {
  color: var(--qg-text-body) !important;
  font-size: 1.02rem !important;
  line-height: 1.7 !important;
}

body.practice-brand-page .submit-btn,
body.practice-brand-page .submit-btn.continue-btn {
  background: var(--qg-blue) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-weight: 600 !important;
  transform: none !important;
}

body.practice-brand-page .submit-btn:hover,
body.practice-brand-page .submit-btn.continue-btn:hover {
  background: var(--qg-blue-deep) !important;
  box-shadow: none !important;
  transform: none !important;
}

body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page) .pr-mobile-hero {
  background: var(--qg-blue) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  text-align: left !important;
  padding: 16px 18px !important;
  margin-bottom: 16px !important;
  border-radius: 12px !important;
}

body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page) .pr-mobile-hero__kicker,
html[data-theme='dark'] body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page) .pr-mobile-hero__kicker {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  color: #f4f1ea !important;
  -webkit-text-fill-color: #f4f1ea !important;
}

body.practice-brand-page .pr-mobile-hero__title,
html[data-theme='dark'] body.practice-brand-page .pr-mobile-hero__title {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-align: left !important;
}

body.practice-brand-page .mobile-explanation-card,
body.practice-brand-page .mobile-question-card,
body.practice-brand-page .mobile-answer-card {
  background: var(--qg-surface) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

html[data-theme='dark'] body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page) .brand-panel__header,
html[data-theme='dark'] body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page) .main-content .brand-panel__header,
html[data-theme='dark'] body.practice-brand-page:not(.qg-dash):not(.qg-home):not(.cm-page) .pr-mobile-hero {
  background: var(--qg-blue) !important;
  border-bottom-color: transparent !important;
}

body.practice-brand-page .option-content,
html[data-theme='dark'] body.practice-brand-page .option-content {
  background: var(--qg-surface) !important;
  border: 1px solid var(--qg-line) !important;
  border-radius: 12px !important;
  box-shadow: var(--qg-sh-hair, none) !important;
  transform: none !important;
}

body.practice-brand-page .answer-option:hover .option-content {
  border-color: var(--qg-accent-line) !important;
  background: var(--qg-surface-tint) !important;
  transform: none !important;
  box-shadow: none !important;
}

body.practice-brand-page .answer-option input[type="radio"]:checked + .option-content {
  border-color: var(--qg-blue) !important;
  background: var(--qg-surface-tint) !important;
  box-shadow: none !important;
}

body.practice-brand-page .option-letter {
  background: var(--qg-blue) !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

body.practice-brand-page .option-text {
  color: var(--qg-text) !important;
}

body.practice-brand-page .answer-option.correct-answer .option-content {
  border-color: var(--qg-pos, #16a34a) !important;
  background: var(--qg-pos-soft, rgba(22, 163, 74, 0.08)) !important;
  box-shadow: none !important;
}

body.practice-brand-page .answer-option.correct-answer .option-letter {
  background: var(--qg-pos, #16a34a) !important;
  box-shadow: none !important;
}

body.practice-brand-page .answer-option.incorrect-answer .option-content {
  border-color: var(--qg-neg, #dc2626) !important;
  background: var(--qg-neg-soft, rgba(220, 38, 38, 0.07)) !important;
  box-shadow: none !important;
}

body.practice-brand-page .answer-option.incorrect-answer .option-letter {
  background: var(--qg-neg, #dc2626) !important;
  box-shadow: none !important;
}

/* Locked lessons and locked explanations. Same split as the dashboard. */
.qg-access-gate {
  margin-top: 16px;
}

body.lesson-page--app-nav .qg-access-gate,
body.lessons-page--app-nav .qg-access-gate {
  width: 100%;
  max-width: none;
  margin: 16px 0 0;
  box-sizing: border-box;
}

.qg-gate--split {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 28px 40px;
  margin: 0;
  padding: 28px 32px;
  text-align: left;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.qg-gate--split .qg-gate__lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.qg-gate--split .qg-gate__ico {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--qg-r-ctl, 8px);
  display: grid;
  place-items: center;
  background: var(--qg-gold-soft);
  border: 1px solid var(--qg-gold-line);
  color: var(--qg-gold-text);
  font-size: 16px;
}

.qg-gate--split h3 {
  margin: 0 !important;
  font-family: var(--qg-font-display) !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  letter-spacing: -0.024em !important;
  color: var(--qg-blue) !important;
  -webkit-text-fill-color: var(--qg-blue) !important;
  background: none !important;
}

.qg-gate--split p {
  margin: 0;
  font-size: 13.5px;
  color: var(--qg-text-muted) !important;
  -webkit-text-fill-color: var(--qg-text-muted) !important;
  max-width: 36ch;
}

.qg-gate--split .qg-gate__lead .qg-btn {
  margin-top: 6px;
}

.qg-gate--split .qg-gate__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-self: stretch;
}

.qg-gate--split .qg-gate__list li {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f4f8fd;
  border: 1px solid #d5e4f7;
  line-height: 1.45;
  font-size: 13.5px;
  color: var(--qg-text-body);
}

.qg-gate--split .qg-gate__list li::before {
  content: none !important;
  display: none !important;
}

.qg-gate--split .qg-gate__list i {
  flex: none;
  font-size: 9px;
  color: var(--qg-accent);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--qg-wash, #eef4fc);
  display: grid;
  place-items: center;
}

html[data-theme='dark'] .qg-gate--split h3 {
  color: #8eb6f0 !important;
  -webkit-text-fill-color: #8eb6f0 !important;
}

html[data-theme='dark'] .qg-gate--split .qg-gate__list li {
  background: rgba(77, 148, 232, 0.08);
  border-color: rgba(126, 176, 240, 0.28);
  color: var(--qg-text-body);
}

@media (max-width: 900px) {
  .qg-gate--split,
  .qg-gate--split .qg-gate__list {
    grid-template-columns: 1fr;
  }
}

/* =========================================================== LESSON FRAME
   Same frame as the resume page. The title band is the light-blue hero.
   The reading card overlaps that band, so the cutoff sits a bit down into
   the card. Under the cutoff, the gutters behind the card are the resume
   colour-splotch field.
   =========================================================== */

html:not(.letters-html) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page):not(.phf-page),
html[data-theme='dark']:not(.letters-html) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page):not(.phf-page) {
  --qg-lesson-hero: #eef4fc;
  --qg-lesson-hero-line: #d5e4f7;
  --qg-lesson-splotch-base: #e9f0fb;
  --qg-lesson-splotch-field:
    radial-gradient(rgba(37, 99, 235, 0.08) 1.1px, transparent 1.2px),
    radial-gradient(circle 460px at 6% 1%, rgba(0, 104, 216, 0.38), transparent 70%),
    radial-gradient(circle 420px at 94% 4%, rgba(124, 58, 237, 0.34), transparent 70%),
    radial-gradient(circle 380px at 82% 24%, rgba(245, 158, 11, 0.30), transparent 70%),
    radial-gradient(circle 400px at 3% 33%, rgba(13, 148, 136, 0.30), transparent 70%),
    radial-gradient(circle 460px at 22% 60%, rgba(5, 150, 105, 0.28), transparent 70%),
    radial-gradient(circle 430px at 97% 64%, rgba(99, 102, 241, 0.30), transparent 70%),
    radial-gradient(circle 380px at 52% 93%, rgba(37, 99, 235, 0.26), transparent 70%);
  background-color: var(--qg-lesson-splotch-base) !important;
  background-image: none !important;
}

html[data-theme='dark']:not(.letters-html):not(.mc-standalone):not(.phf-standalone) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page) {
  --qg-lesson-hero: #101c30;
  --qg-lesson-hero-line: rgba(126, 176, 240, 0.28);
  --qg-lesson-splotch-base: #070d18;
  --qg-lesson-splotch-field:
    radial-gradient(rgba(96, 165, 250, 0.09) 1.1px, transparent 1.2px),
    radial-gradient(circle 460px at 6% 1%, rgba(0, 104, 216, 0.34), transparent 70%),
    radial-gradient(circle 420px at 94% 4%, rgba(124, 58, 237, 0.30), transparent 70%),
    radial-gradient(circle 380px at 82% 24%, rgba(245, 158, 11, 0.20), transparent 70%),
    radial-gradient(circle 400px at 3% 33%, rgba(13, 148, 136, 0.24), transparent 70%),
    radial-gradient(circle 460px at 22% 60%, rgba(5, 150, 105, 0.22), transparent 70%),
    radial-gradient(circle 430px at 97% 64%, rgba(99, 102, 241, 0.26), transparent 70%),
    radial-gradient(circle 380px at 52% 93%, rgba(59, 130, 246, 0.22), transparent 70%);
  background-color: var(--qg-lesson-splotch-base) !important;
  background-image: none !important;
}

html:not(.letters-html) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page):not(.phf-page) .desktop-container,
html:not(.letters-html) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page):not(.phf-page) .mobile-content,
html[data-theme='dark']:not(.letters-html):not(.mc-standalone):not(.phf-standalone) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page) .mobile-content,
html[data-theme='dark']:not(.letters-html):not(.mc-standalone):not(.phf-standalone) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page) .desktop-container {
  background-color: transparent !important;
  background-image: none !important;
}

html:not(.letters-html) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page):not(.phf-page) .main-content,
html[data-theme='dark']:not(.letters-html):not(.mc-standalone):not(.phf-standalone) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.appr-page) .main-content {
  background-color: var(--qg-lesson-splotch-base) !important;
  background-image: var(--qg-lesson-splotch-field) !important;
  background-size: 22px 22px, auto, auto, auto, auto, auto, auto, auto !important;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat !important;
  background-position: 0 -80px, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0 !important;
}

/* Lessons index: splotches live only in each subject section, behind the
   lesson sheet. Rows keep their own fill, so the field shows around the
   table rather than through the type. */
html:not([data-theme='dark']) body.lessons-sheet .qc-track__body {
  --qg-lesson-splotch-base: #e9f0fb;
  --qg-lesson-splotch-field:
    radial-gradient(rgba(37, 99, 235, 0.08) 1.1px, transparent 1.2px),
    radial-gradient(circle 460px at 6% 1%, rgba(0, 104, 216, 0.38), transparent 70%),
    radial-gradient(circle 420px at 94% 4%, rgba(124, 58, 237, 0.34), transparent 70%),
    radial-gradient(circle 380px at 82% 24%, rgba(245, 158, 11, 0.30), transparent 70%),
    radial-gradient(circle 400px at 3% 33%, rgba(13, 148, 136, 0.30), transparent 70%),
    radial-gradient(circle 460px at 22% 60%, rgba(5, 150, 105, 0.28), transparent 70%),
    radial-gradient(circle 430px at 97% 64%, rgba(99, 102, 241, 0.30), transparent 70%),
    radial-gradient(circle 380px at 52% 93%, rgba(37, 99, 235, 0.26), transparent 70%);
  background-color: var(--qg-lesson-splotch-base) !important;
  background-image: var(--qg-lesson-splotch-field) !important;
  background-size: 22px 22px, auto, auto, auto, auto, auto, auto, auto !important;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat !important;
  background-position: 0 -80px, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0 !important;
  background-attachment: fixed !important;
}

html[data-theme='dark'] body.lessons-sheet .qc-track__body {
  --qg-lesson-splotch-base: #070d18;
  --qg-lesson-splotch-field:
    radial-gradient(rgba(96, 165, 250, 0.09) 1.1px, transparent 1.2px),
    radial-gradient(circle 460px at 6% 1%, rgba(0, 104, 216, 0.34), transparent 70%),
    radial-gradient(circle 420px at 94% 4%, rgba(124, 58, 237, 0.30), transparent 70%),
    radial-gradient(circle 380px at 82% 24%, rgba(245, 158, 11, 0.20), transparent 70%),
    radial-gradient(circle 400px at 3% 33%, rgba(13, 148, 136, 0.24), transparent 70%),
    radial-gradient(circle 460px at 22% 60%, rgba(5, 150, 105, 0.22), transparent 70%),
    radial-gradient(circle 430px at 97% 64%, rgba(99, 102, 241, 0.26), transparent 70%),
    radial-gradient(circle 380px at 52% 93%, rgba(59, 130, 246, 0.22), transparent 70%);
  background-color: var(--qg-lesson-splotch-base) !important;
  background-image: var(--qg-lesson-splotch-field) !important;
  background-size: 22px 22px, auto, auto, auto, auto, auto, auto, auto !important;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat !important;
  background-position: 0 -80px, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0 !important;
  background-attachment: fixed !important;
}

@media (max-width: 768px) {
  html:not([data-theme='dark']) body.lessons-sheet .qc-track__body {
    --qg-lesson-splotch-field:
      radial-gradient(rgba(37, 99, 235, 0.09) 1.1px, transparent 1.2px),
      radial-gradient(circle 280px at 8% 0%, rgba(0, 104, 216, 0.36), transparent 70%),
      radial-gradient(circle 240px at 96% 8%, rgba(124, 58, 237, 0.28), transparent 70%),
      radial-gradient(circle 220px at 88% 38%, rgba(245, 158, 11, 0.24), transparent 70%),
      radial-gradient(circle 240px at 4% 52%, rgba(13, 148, 136, 0.26), transparent 70%),
      radial-gradient(circle 260px at 50% 88%, rgba(37, 99, 235, 0.22), transparent 70%);
    background-image: var(--qg-lesson-splotch-field) !important;
    background-size: 18px 18px, auto, auto, auto, auto, auto !important;
    background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat !important;
  }

  html[data-theme='dark'] body.lessons-sheet .qc-track__body {
    --qg-lesson-splotch-field:
      radial-gradient(rgba(96, 165, 250, 0.09) 1.1px, transparent 1.2px),
      radial-gradient(circle 280px at 8% 0%, rgba(0, 104, 216, 0.34), transparent 70%),
      radial-gradient(circle 240px at 96% 8%, rgba(124, 58, 237, 0.28), transparent 70%),
      radial-gradient(circle 220px at 88% 38%, rgba(245, 158, 11, 0.18), transparent 70%),
      radial-gradient(circle 240px at 4% 52%, rgba(13, 148, 136, 0.22), transparent 70%),
      radial-gradient(circle 260px at 50% 88%, rgba(59, 130, 246, 0.22), transparent 70%);
    background-image: var(--qg-lesson-splotch-field) !important;
    background-size: 18px 18px, auto, auto, auto, auto, auto !important;
    background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat !important;
  }
}

html:not(.letters-html) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.appr-page) .main-content {
  padding: 0 0 72px !important;
  min-height: 100vh;
}

body.lesson-page--app-nav .lesson-dashboard-header {
  max-width: none !important;
  margin: 0 !important;
  padding: 28px 0 32px !important;
  background: var(--qg-lesson-hero, #eef4fc) !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 1px solid var(--qg-lesson-hero-line, #d5e4f7) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
}

/* The reading card overlaps the hero, so the blue/splotch cutoff crosses
   the card a bit below its top edge. Skipped when a banner sits between
   them, so that strip is not covered. */
body.lesson-page--app-nav .main-content:has(> .lesson-content-section):not(:has(> .email-verification-warning)):not(:has(> .subscription-banner)) > .lesson-dashboard-header {
  padding-bottom: 6.5rem !important;
}

body.lesson-page--app-nav .main-content:has(> .lesson-content-section):not(:has(> .email-verification-warning)):not(:has(> .subscription-banner)) > .lesson-content-section {
  margin-top: 0 !important;
}

body.lesson-page--app-nav .main-content:has(> .lesson-content-section):not(:has(> .email-verification-warning)):not(:has(> .subscription-banner)) > .lesson-content-section > .lesson-content-container {
  margin-top: -5rem !important;
}

body.lesson-page--app-nav .lesson-welcome-section,
body.lesson-page--app-nav .lesson-content-section,
body.lesson-page--app-nav .qg-topic-pager {
  width: min(880px, calc(100% - 72px));
  max-width: 880px;
}

body.lesson-page--app-nav .lesson-content-section {
  position: relative;
  z-index: 2;
}

body.lesson-page--app-nav .lesson-content-container {
  position: relative;
  z-index: 2;
  background: var(--qg-surface) !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08) !important;
}

body.lesson-page--app-nav .subscription-banner,
body.lesson-page--app-nav .email-verification-warning {
  width: min(880px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

body.lesson-page--app-nav .qg-access-gate {
  width: min(880px, calc(100% - 48px));
  max-width: 880px;
  margin: 28px auto 0 !important;
}

/* Locked lesson / interview: subscriber layout, with a Latin stand-in
   blurred under the upgrade panel. The stand-in is not the real material. */
.qg-locked-stage {
  position: relative;
}

.qg-locked-preview {
  filter: blur(6px);
  -webkit-filter: blur(6px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.qg-locked-stage > .lesson-content-container,
.qg-locked-stage > .interview-content-container,
.mobile-interview-content-section.qg-locked-stage {
  overflow: hidden;
}

.qg-locked-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 72px 14px 32px;
  pointer-events: none;
}

body.lesson-page--app-nav .qg-locked-overlay {
  padding-top: 16px;
}

.qg-locked-overlay .qg-access-gate {
  pointer-events: auto;
  width: min(820px, calc(100% - 8px)) !important;
  max-width: 820px !important;
  margin: 0 !important;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.18);
}

.qg-locked-chart {
  height: 300px;
  margin: 16px 0 20px;
  border: 1px solid var(--qg-line);
  border-radius: 12px;
  background: var(--qg-surface-2);
  overflow: hidden;
}

.qg-locked-chart__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qg-locked-chart__grid {
  stroke: var(--qg-line);
  fill: none;
}

.qg-locked-chart__series {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qg-locked-chart__series--a {
  stroke: var(--qg-accent, #2563eb);
}

.qg-locked-chart__series--b {
  stroke: var(--qg-gold, #d4a017);
}

.qg-locked-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
}

.qg-locked-preview th,
.qg-locked-preview td {
  border: 1px solid var(--qg-line);
  text-align: left;
}

.qg-locked-preview thead th {
  background: var(--qg-surface-2);
}

@media (max-width: 768px) {
  .qg-locked-overlay {
    padding: 28px 0 24px;
  }

  .qg-locked-overlay .qg-access-gate {
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  html:not(.letters-html) body.lesson-page--app-nav:not(.qg-dash):not(.qg-home):not(.cm-page):not(.letters-page):not(.appr-page) .main-content {
    margin-top: 64px;
    padding: 0 0 48px !important;
  }

  body.lesson-page--app-nav .lesson-dashboard-header {
    padding: 20px 0 28px !important;
  }

  body.lesson-page--app-nav .lesson-welcome-section {
    width: 100%;
    max-width: none;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  body.lesson-page--app-nav .main-content:has(> .lesson-content-section):not(:has(> .email-verification-warning)):not(:has(> .subscription-banner)) > .lesson-dashboard-header {
    padding-bottom: 4.4rem !important;
  }

  body.lesson-page--app-nav .main-content:has(> .lesson-content-section):not(:has(> .email-verification-warning)):not(:has(> .subscription-banner)) > .lesson-content-section > .lesson-content-container {
    margin-top: -3.2rem !important;
  }

  body.lesson-page--app-nav .lesson-content-section,
  body.lesson-page--app-nav .qg-topic-pager {
    width: auto;
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}
