:root { --product-name: "Vorschule"; }

/* AiDemy product identity (design system "AiDemy Unified").
   Every product shows its subject colour, as the PDFs and videos do, so you always see which product you are in:
   a 4 px bar along the top of every page, the logo square, a small product name above the start page title,
   the class badge and the top bar of subject cards. Buttons, focus and feedback keep their own tokens.
   The app sets --subject (dark and light, from aidemy-tokens.css) and --product-name. */

:root { --on-subject: #10171b; }
@media (prefers-color-scheme: light) { :root:not([data-colours=dark]) { --on-subject: #ffffff; } }
html[data-colours=light] { --on-subject: #ffffff; }

/* the bar along the top, on every page and screen size */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: 4px; background: var(--subject); z-index: 1000; pointer-events: none; }

/* logo square */
.brand-mark, .logo { background: var(--subject) !important; color: var(--on-subject) !important; }

/* product name above the title of the start page */
.home-hero h1::before, main.home h1::before {
  content: var(--product-name); display: block; width: max-content; margin-bottom: 10px; padding: 3px 10px; border-radius: 4px;
  background: color-mix(in srgb, var(--subject) 18%, transparent); color: var(--ink); border-left: 4px solid var(--subject);
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.4;
}

/* class badge and subject cards */
.grade-badge { background: color-mix(in srgb, var(--subject) 22%, transparent) !important; color: var(--ink) !important; }
.unit-card, .area, .topic-card { box-shadow: inset 0 3px 0 var(--subject); }

/* Subject header (dark by default). The header of every page carries a faint tint and a hairline in the subject colour,
   so the products are told apart at a glance: Physik indigo, Mathematik orange, Deutsch red, Englisch blue.
   Canvas, cards, buttons and feedback stay on the shared tokens (DESIGN-RULES: subject colour only for identity). */
.home-head, .top, .lesson-head, .topbar {
  background: linear-gradient(color-mix(in srgb, var(--subject) 12%, var(--paper)), color-mix(in srgb, var(--subject) 5%, var(--paper))) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--subject) 50%, var(--line)) !important;
}
.brand-name { color: var(--ink); }
.home-hero, main.home > section:first-child { border-left: 3px solid var(--subject); padding-left: 18px; }
