/* Foundations-only frame removal; independent teaching and control panels retain their surfaces. */
body.foundations-page #audit-lab[data-iot-interactive-theme="flat"],
body.foundations-page #mathdb-lab[data-iot-interactive-theme="flat"],
body.foundations-page #audit-lab > .aud-body {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
/* These fitted Foundations images have no chapter scroll viewport. */
body.foundations-page #quarto-document-content figure.aud-figure.aud-chapter-figure img,
body.foundations-page .aud-responsive-image {
  display: block;
  max-width: 100% !important;
  height: auto;
  margin-inline: auto;
}
/* Contrast (WCAG AA >= 4.5:1), module hue kept: the primary Calculate action was #071417 on the
   #197f8d accent (3.97:1) on 618 pages; white on the accent darkened 30% is ~8:1. */
body.foundations-page #audit-lab .aud-actions button:first-child {
  background: color-mix(in srgb, var(--uplift-accent) 70%, #000);
  border-color: color-mix(in srgb, var(--uplift-accent) 70%, #000);
  color: #fff;
}
/* Live readout text was the raw accent on a light surface (4.42:1); darkened 22% it is ~6.7:1. */
body.foundations-page #audit-lab .aud-live-value {
  color: color-mix(in srgb, var(--uplift-accent) 78%, #000);
}
@media (prefers-color-scheme: dark) {
  /* Dark theme accent is #63c8d2: the original dark text on it is ~9.6:1, so keep it. */
  body.foundations-page #audit-lab .aud-actions button:first-child {
    background: var(--uplift-accent);
    border-color: var(--uplift-accent);
    color: #071417;
  }
  body.foundations-page #audit-lab .aud-live-value { color: var(--uplift-accent); }
}
