/* Explicit uh-theme wins over prefers-color-scheme.
   Light and dark values match vendor/circuit-sim/style.css.
   The key uh-theme stays in step with theme_controller.js. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7fa;
  --card: #fff;
  --fg: #1a1a22;
  --mute: #555;
  --wire: #222;
  --acc: #0b5cd5;
  --on-acc: #fff;
  --mark: #c62828;
  --hint: #8a6b12;
  --warn: #9a5b00;
  --bad: #b00020;
  --good: #11752f;
  --line: #ccd;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111318;
  --card: #1c1f27;
  --fg: #eef0f5;
  --mute: #b4b8c4;
  --wire: #dde;
  --acc: #7fb0ff;
  --on-acc: #111318;
  --mark: #ff9a9a;
  --hint: #e6c15a;
  --warn: #ffc260;
  --bad: #ff7b8b;
  --good: #6be08b;
  --line: #3a3f4d;
}

/* --on-acc is the text on --acc. --mark is emphasis red that stays readable on --bg and --card.
   --hint is the quiz-dot ring. It stays at least 3:1 on --card. */

/* The catalog bar sets display in an inline style, so hiding it needs !important. */
html[data-embed="1"] nav.rails-nav,
html[data-embed="1"] nav.top { display: none !important; }

/* Embedded lessons sit on the site page. The engine body colour would paint
   a separate slab behind the lab. */
html[data-embed="1"],
html[data-embed="1"] body {
  background: transparent;
}

/* Lesson pages are one column of reading. The engine paints every section as
   a card; lab.html and designer.html do not load this file, so their panels
   stay. Link tiles (.card) stay bordered because they are navigation. */
main section {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
