/* DE: Die didaktische Farbschicht — eigene Datei, weil sie eine eigene Schicht IST.
   `DESIGN.md` führt sie als „separate, protected layer that the brand may not restyle": diese Farben sind
   nicht von Geschmack bestimmt, sondern von Didaktik (FRESCH-Silbenbögen rot/blau) und von einer deutschen
   Grundschulkonvention (Nomen blau · Verben rot · Adjektive grün). Wer die Marke umfärbt, fasst sie nicht an.
   Bis hierher standen sie an zwei Orten: die Silbenfarben in `tokens.css`, die Wortartfarben als Hex-Literale
   VIERMAL je Farbe in `wortspeicher.css` — und damit außerhalb des Tokensystems, wo der Kontrast-Wächter sie
   nicht sehen konnte. Die WERTE ändern sich hier nicht; sie bekommen einen Ort und eine Nachrechnung.
   Nachgerechnet wird alles hier in test/assets/text_contrast_test.rb, über alle sieben Themen-Zustände.
   EN: The didactic colour layer, in its own file because it IS its own layer. `DESIGN.md` calls it a separate,
   protected layer the brand may not restyle: these colours are set by didactics (FRESCH syllable arcs) and by
   a German primary-school convention, not by taste. They previously sat in two places, the part-of-speech ones
   as hex literals written four times each — outside the token system, where the contrast guard could not see
   them. The VALUES do not change here; they gain a place and an arithmetic check. */

:root {
  /* DE: Silbenfarben (FRESCH/Silbenbögen). Nicht zu verwechseln mit dem gleichen Blau der Wortartfarbe: das
     ist ein anderer Zweck, deshalb ein eigenes Token.
     EN: Syllable colours. Not to be confused with the same blue in the part-of-speech role — different
     purpose, hence its own token. */
  --syllable-1: #d7263d;
  --syllable-2: #1d4ed8;

  /* DE: Wortartfarben (S8). Der Schema-Name gehört ins Token, weil `Lexicon::PosColorScheme` diese Dimension
     führt — ein zweites Schema bekäme eigene Token, statt diese umzudeuten.
     EN: Part-of-speech colours (S8). The scheme name belongs in the token because `Lexicon::PosColorScheme`
     carries that dimension; a second scheme would get its own tokens rather than reinterpret these. */
  --pos-traditional-noun: #1d4ed8;
  --pos-traditional-verb: #b91c1c;
  --pos-traditional-adjective: #15803d;

  /* DE: Die fünf Formationsparameter einer Gebärde (Rückmeldung aus dem NSL-Prüfkreis: sehr visuell
     orientiert). Fünf gleich aussehende Textzeilen bekommen einen Ankerpunkt, den man nicht lesen muss.
     REZEPT geliehen aus dem Klassenfarbsystem (`db/curriculum/otjiherero_class_colors.json`):
     `oklch(0.58 0.13 <hue>)` hell, `oklch(0.75 0.11 <hue>)` dunkel — gleiche Helligkeit und Sättigung, damit
     keine Gruppe lauter ist als die andere. Die ZUORDNUNG ist NICHT geliehen: derselbe Farbton für „Klasse 1"
     und „Bewegung" belegte eine Farbe im selben Produkt zweimal. Markengrün (~155) bleibt frei, wie dort.
     Die Zuordnung ist ein VORSCHLAG — welche Farbe „Bewegung" heißt, entscheidet der Prüfkreis.
     EN: The five formation parameters of a sign. RECIPE borrowed from the noun-class system (same lightness
     and chroma, so no group is louder than another); the MAPPING is not, because one hue meaning both „class
     1" and „movement" would spend a colour twice in one product. Brand green stays free. The mapping is a
     PROPOSAL — which colour means „movement" is the circle's decision. */
  --sign-param-handshape: oklch(0.58 0.13 265);
  --sign-param-location: oklch(0.58 0.13 30);
  --sign-param-movement: oklch(0.58 0.13 330);
  --sign-param-orientation: oklch(0.58 0.13 200);
  --sign-param-non-manual: oklch(0.58 0.13 85);
}

/* DE: Dunkel — aufgehellte Fassungen derselben Konvention, damit der Farbton erhalten bleibt und der Kontrast
   trotzdem stimmt. Zweimal geschrieben, weil beide Wege ins dunkle Thema führen: die ausdrückliche Wahl und
   die Systemvorgabe. Laufen sie auseinander, ist die Farbe nur für die richtig, die von Hand gewählt haben.
   EN: Dark — lightened versions of the same convention, keeping the hue while the contrast holds. Written
   twice because both routes lead into the dark theme: the explicit choice and the system preference. */
:root[data-theme="dark"] {
  --syllable-1: #ff7480;
  --syllable-2: #6ea8ff;
  --pos-traditional-noun: #93c5fd;
  --pos-traditional-verb: #fca5a5;
  --pos-traditional-adjective: #86efac;
  --sign-param-handshape: oklch(0.75 0.11 265);
  --sign-param-location: oklch(0.75 0.11 30);
  --sign-param-movement: oklch(0.75 0.11 330);
  --sign-param-orientation: oklch(0.75 0.11 200);
  --sign-param-non-manual: oklch(0.75 0.11 85);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --syllable-1: #ff7480;
    --syllable-2: #6ea8ff;
    --pos-traditional-noun: #93c5fd;
    --pos-traditional-verb: #fca5a5;
    --pos-traditional-adjective: #86efac;
    --sign-param-handshape: oklch(0.75 0.11 265);
    --sign-param-location: oklch(0.75 0.11 30);
    --sign-param-movement: oklch(0.75 0.11 330);
    --sign-param-orientation: oklch(0.75 0.11 200);
    --sign-param-non-manual: oklch(0.75 0.11 85);
  }
}

/* DE: Hoher Kontrast, hell. Die didaktischen Farben werden NICHT plattgemacht — der Farbton trägt hier
   Bedeutung (HR11 gilt fürs ✦-Signal, dieselbe Überlegung gilt für die Wortarten). Sie werden nur dunkler,
   bis sie auch auf `--surface-2` dieses Themas tragen: das ist mit `oklch(.96 0 0)` dunkler als im normalen
   Hell, und genau dort lag das Adjektiv-Grün bei 4,48:1 — knapp unter der Schwelle, ausgerechnet in dem
   Thema, das man wählt, WEIL man Kontrast braucht. Aufgefallen ist das erst, als diese Farben Token wurden.
   Dasselbe traf das FRESCH-Rot der Silbenbögen: 4,43:1. Beide Gruppen lagen außerhalb des Tokensystems,
   deshalb hat sie beide nie jemand gegen dieses Thema nachgerechnet.
   Nebenbei sind die Farben jetzt ausgewogen (6,7–8,1:1 auf Weiß); vorher waren Grün (5,0) und Rot Ausreißer.
   EN: High contrast, light. The didactic colours are NOT flattened — the hue carries meaning here. They only
   darken until they also hold on this theme's `--surface-2`, which is darker than the normal one; that is
   where the adjective green measured 4.48:1, just under the line, in the very theme people choose BECAUSE
   they need contrast. It only surfaced once these colours became tokens. */
:root[data-contrast="high"] {
  --syllable-1: #a51b2d;
  --syllable-2: #1746b8;
  --pos-traditional-noun: #1746b8;
  --pos-traditional-verb: #a11414;
  --pos-traditional-adjective: #116632;
  --sign-param-handshape: oklch(0.45 0.15 265);
  --sign-param-location: oklch(0.45 0.15 30);
  --sign-param-movement: oklch(0.45 0.15 330);
  --sign-param-orientation: oklch(0.45 0.15 200);
  --sign-param-non-manual: oklch(0.45 0.15 85);
}

/* DE: Und dunkel + hoher Kontrast muss die hellen Werte ZURÜCKSETZEN. Beide Achsen sind orthogonal, also
   gilt `[data-contrast="high"]` dort mit — gleiche Spezifität, später in der Datei. Ohne diese Blöcke stünde
   das dunkle Grün-auf-Schwarz-Thema mit den dunklen Hell-Farben da. Genau dieses Leck hatte `--brand` schon
   einmal (ADR-Notiz im CHANGELOG, 2026-08-29): Kontrast-Eigenschaften dürfen über die Naht durchschlagen,
   Themen-Eigenschaften nicht.
   EN: Dark + high contrast must RESET the light values. The axes are orthogonal, so `[data-contrast="high"]`
   applies there too — equal specificity, later in the file. `--brand` had exactly this leak once. */
:root[data-theme="dark"][data-contrast="high"] {
  --syllable-1: #ff7480;
  --syllable-2: #6ea8ff;
  --pos-traditional-noun: #93c5fd;
  --pos-traditional-verb: #fca5a5;
  --pos-traditional-adjective: #86efac;
  --sign-param-handshape: oklch(0.75 0.11 265);
  --sign-param-location: oklch(0.75 0.11 30);
  --sign-param-movement: oklch(0.75 0.11 330);
  --sign-param-orientation: oklch(0.75 0.11 200);
  --sign-param-non-manual: oklch(0.75 0.11 85);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-contrast="high"] {
    --syllable-1: #ff7480;
    --syllable-2: #6ea8ff;
    --pos-traditional-noun: #93c5fd;
    --pos-traditional-verb: #fca5a5;
    --pos-traditional-adjective: #86efac;
    --sign-param-handshape: oklch(0.75 0.11 265);
    --sign-param-location: oklch(0.75 0.11 30);
    --sign-param-movement: oklch(0.75 0.11 330);
    --sign-param-orientation: oklch(0.75 0.11 200);
    --sign-param-non-manual: oklch(0.75 0.11 85);
  }
}

/* DE: Der Farbton je Gruppe, als KLASSE (die Kinderfläche hat `style-src :self`, ein `style="…"` wäre
   blockiert — dasselbe Muster wie `nc-class-<key>`). `Lexicon::SignParameterColor` gibt den Namen aus; eine
   Zusicherung hält fest, dass beide Seiten dieselben Namen meinen.
   EN: The hue per group, as a CLASS — the child-facing CSP is `style-src :self`, so a style attribute would
   be blocked. `Lexicon::SignParameterColor` emits the name and an assertion pins that both sides agree. */
.sp-handshape { --sign-param-hue: var(--sign-param-handshape); }
.sp-location { --sign-param-hue: var(--sign-param-location); }
.sp-movement { --sign-param-hue: var(--sign-param-movement); }
.sp-orientation { --sign-param-hue: var(--sign-param-orientation); }
.sp-non-manual { --sign-param-hue: var(--sign-param-non-manual); }
