/* Fonturile pachetelor (Task 15, spec 2026-10-25 §7.1-7.3). GENERAT de tools/fonturi-pachete.py; nu se editează de mână.
   woff2 subsetate din OTF-urile MiKTeX: textul la latin + latin-ext + greacă (+ punctuație, simboluri, săgeți, operatori), formulele întregi
   (cu tabelul MATH). Un fișier se descarcă doar când pachetul lui e ales: foaia nu cere nimic fără <html data-fonturi="…">
   și fără elemente .culegere. Greutăți 400 și 700; Kurier are și 300 și 500 (excepție declarată în teste).
   „XCharter Math Afisare” (XCharter-Math-Afisare.woff2, F·1): XCharter Math cu DisplayOperatorMinHeight 1300, doar pentru formulele afișate ale pachetului XCharter;
   culegere.js o cere (afisareGata) doar pe paginile cu formule afișate, înaintea desenării; e `swap` (rezerva ei e XCharter Math), iar mostrele n-o folosesc.
   Licențe: PACHETE-LICENSES.txt și PACHETE-OFL.txt. */
@font-face {
  font-family: 'XCharter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/XCharter-Roman.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'XCharter';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/XCharter-Italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'XCharter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/XCharter-Bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'XCharter';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/XCharter-BoldItalic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Erewhon';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/Erewhon-Regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Erewhon';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/Erewhon-Italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Erewhon';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/Erewhon-Bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Erewhon';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/Erewhon-BoldItalic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Pagella';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/Pagella-Regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Pagella';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/Pagella-Italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Pagella';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/Pagella-Bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Pagella';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/Pagella-BoldItalic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'NewCM Book';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/NewCM10-Book.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'NewCM Book';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/NewCM10-BookItalic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'NewCM Book';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/NewCM10-Bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'NewCM Book';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/NewCM10-BoldItalic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'NewCM';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/NewCM10-Regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'NewCM';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/NewCM10-Italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'NewCM';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/NewCM10-Bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'NewCM';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/NewCM10-BoldItalic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Kurier';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/pachete/Kurier-Light.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Kurier';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/pachete/Kurier-LightItalic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Kurier';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/Kurier-Regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Kurier';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/Kurier-Italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Kurier';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/pachete/Kurier-Medium.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Kurier';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/pachete/Kurier-MediumItalic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Kurier';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/Kurier-Bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'Kurier';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/Kurier-BoldItalic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'CM Concrete';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/CMConcrete-Roman.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'CM Concrete';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pachete/CMConcrete-Italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'CM Concrete';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/CMConcrete-Bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'CM Concrete';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/pachete/CMConcrete-BoldItalic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+0370-03FF, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: 'XCharter Math';
  font-display: block;
  src: url("/assets/fonts/pachete/XCharter-Math.woff2") format("woff2");
}
@font-face {
  font-family: 'XCharter Math Afisare';
  font-display: swap;
  src: url("/assets/fonts/pachete/XCharter-Math-Afisare.woff2") format("woff2");
}
@font-face {
  font-family: 'Erewhon Math';
  font-display: block;
  src: url("/assets/fonts/pachete/Erewhon-Math.woff2") format("woff2");
}
@font-face {
  font-family: 'Pagella Math';
  font-display: block;
  src: url("/assets/fonts/pachete/Pagella-Math.woff2") format("woff2");
}
@font-face {
  font-family: 'NewCM Math Book';
  font-display: block;
  src: url("/assets/fonts/pachete/NewCMMath-Book.woff2") format("woff2");
}
@font-face {
  font-family: 'NewCM Math';
  font-display: block;
  src: url("/assets/fonts/pachete/NewCMMath-Regular.woff2") format("woff2");
}
@font-face {
  font-family: 'NewCM Sans Math';
  font-display: block;
  src: url("/assets/fonts/pachete/NewCMSansMath-Regular.woff2") format("woff2");
}
@font-face {
  font-family: 'Latin Modern Math';
  font-display: block;
  src: url("/assets/fonts/pachete/LatinModern-Math.woff2") format("woff2");
}
@font-face {
  font-family: 'Euler Math';
  font-display: block;
  src: url("/assets/fonts/pachete/Euler-Math.woff2") format("woff2");
}
@font-face {
  font-family: 'Libertinus Math';
  font-display: block;
  src: url("/assets/fonts/pachete/Libertinus-Math.woff2") format("woff2");
}
/* Pachetele: fontul textului, fontul formulelor și scara formulelor (x-ul formulelor = x-ul textului: raportul înălțimilor lui „x”, măsurat din fonturi de tools/fonturi-pachete.py). */
html[data-fonturi='xcharter'] .culegere { --reading-serif: 'XCharter', Georgia, serif; --mat-font: 'XCharter Math'; --mat-scala: .98; --mat-font-afisare: 'XCharter Math Afisare'; }
html[data-fonturi='libertinus'] .culegere { --reading-serif: 'Libertinus', Georgia, serif; --mat-font: 'Libertinus Math'; --mat-scala: .98; --mat-prim-dupa: -.12em; }
html[data-fonturi='fourier'] .culegere { --reading-serif: 'Erewhon', Georgia, serif; --mat-font: 'Erewhon Math'; --mat-scala: .98; }
html[data-fonturi='pagella'] .culegere { --reading-serif: 'Pagella', Georgia, serif; --mat-font: 'Pagella Math'; --mat-scala: .97; --mat-prim-dupa: -.2em; --mat-stanga: .15em; }
html[data-fonturi='newcm'] .culegere { --reading-serif: 'NewCM Book', Georgia, serif; --mat-font: 'NewCM Math Book'; --mat-scala: .98; --mat-prim-dupa: -.17em; }
html[data-fonturi='lm'] .culegere { --reading-serif: 'Latin Modern', Georgia, serif; --mat-font: 'Latin Modern Math'; --mat-scala: .99; --mat-prim-dupa: -.17em; }
html[data-fonturi='kurier'] .culegere { --reading-serif: 'Kurier', 'Segoe UI', system-ui, sans-serif; --mat-font: 'NewCM Sans Math'; --mat-scala: 1.01; }
html[data-fonturi='euler'] .culegere { --reading-serif: 'CM Concrete', Georgia, serif; --mat-font: 'Euler Math'; --mat-scala: .99; }
/* Opțiunile (după pachete, la aceeași specificitate câștigă ultima). „Regular” = NewCM10-Regular (subset, versiune modificată sub GPL3+FE, cu sursa:
   vezi PACHETE-LICENSES.txt) și NewCM Math Regular. */
html[data-fonturi-optiune~='newcm-regular'] .culegere { --reading-serif: 'NewCM', Georgia, serif; --mat-font: 'NewCM Math'; }
html[data-fonturi-optiune~='euler-pagella'] .culegere { --reading-serif: 'Pagella', Georgia, serif; }
html[data-fonturi-optiune~='kurier-light'] .culegere .cul-text { font-weight: 300; }
html[data-fonturi-optiune~='kurier-medium'] .culegere .cul-text { font-weight: 500; }
html[data-fonturi-optiune~='kurier-light'] .culegere .cul-text :is(strong, b), html[data-fonturi-optiune~='kurier-medium'] .culegere .cul-text :is(strong, b) { font-weight: 700; }
/* „Azi”: KaTeX potrivit la x (0,97 em în loc de 1,21), constantă, nu măsurare la rulare; doar în .culegere. */
html[data-fonturi='azi'] .culegere .katex, html:not([data-fonturi]) .culegere .katex { font-size: .97em; }
/* Formulele MathML (Temml, Task 16): fontul și scara pachetului. MathML-ul ascuns al KaTeX (.katex-mathml) nu se atinge,
   ca fontul de formule să nu se descarce pe paginile KaTeX. */
.culegere math:not(.katex-mathml math) { font-family: var(--mat-font, math), math; font-size: calc(var(--mat-scala, 1) * 1em); }
/* Formulele afișate (F·1, 17 nov. 2026): fața de afișare a pachetului, unde o are (--mat-font-afisare, azi doar XCharter); formulele din rând, și cele cu \displaystyle
   din rând, rămân pe fontul de formule. Rezerva, cât se încarcă fața, e fontul de formule al pachetului (nu `math` al sistemului): o formulă fără operator mare nu se
   schimbă la sosirea feței. Pachetele fără fața de afișare au același font ca înainte. */
.culegere .mml-display math:not(.katex-mathml math) { font-family: var(--mat-font-afisare, var(--mat-font, math)), var(--mat-font, math), math; }
/* Reglajele de pachet (Task 16, corectura 2): spațiul de după semnul prim (doar mo.tml-prime; exponenții obișnuiți rămân neatinși) și marginea din stânga a
   primei formule din rând. Pachetele fără valoare nu primesc nimic. */
.culegere mo.tml-prime { margin-right: var(--mat-prim-dupa, 0); }
.culegere .mml-inline > math:first-child { margin-left: var(--mat-stanga, 0); }
/* Mostrele paginii „Stilul paginii” (Task 18, fonturi.js): aceleași reguli, în domeniul .fonturi-mostra, ca fiecare mostră să-și arate pachetul fără să-l schimbe pe
   al paginii. Atributul data-pachet se pune abia când mostra intră în ecran (IntersectionObserver), deci fonturile unui pachet nu se cer înainte; data-optiune ține jetoanele opțiunilor. */
.fonturi-mostra[data-pachet='xcharter'] { --reading-serif: 'XCharter', Georgia, serif; --mat-font: 'XCharter Math'; --mat-scala: .98; }
.fonturi-mostra[data-pachet='libertinus'] { --reading-serif: 'Libertinus', Georgia, serif; --mat-font: 'Libertinus Math'; --mat-scala: .98; --mat-prim-dupa: -.12em; }
.fonturi-mostra[data-pachet='fourier'] { --reading-serif: 'Erewhon', Georgia, serif; --mat-font: 'Erewhon Math'; --mat-scala: .98; }
.fonturi-mostra[data-pachet='pagella'] { --reading-serif: 'Pagella', Georgia, serif; --mat-font: 'Pagella Math'; --mat-scala: .97; --mat-prim-dupa: -.2em; --mat-stanga: .15em; }
.fonturi-mostra[data-pachet='newcm'] { --reading-serif: 'NewCM Book', Georgia, serif; --mat-font: 'NewCM Math Book'; --mat-scala: .98; --mat-prim-dupa: -.17em; }
.fonturi-mostra[data-pachet='lm'] { --reading-serif: 'Latin Modern', Georgia, serif; --mat-font: 'Latin Modern Math'; --mat-scala: .99; --mat-prim-dupa: -.17em; }
.fonturi-mostra[data-pachet='kurier'] { --reading-serif: 'Kurier', 'Segoe UI', system-ui, sans-serif; --mat-font: 'NewCM Sans Math'; --mat-scala: 1.01; }
.fonturi-mostra[data-pachet='euler'] { --reading-serif: 'CM Concrete', Georgia, serif; --mat-font: 'Euler Math'; --mat-scala: .99; }
.fonturi-mostra[data-optiune~='newcm-regular'] { --reading-serif: 'NewCM', Georgia, serif; --mat-font: 'NewCM Math'; }
.fonturi-mostra[data-optiune~='euler-pagella'] { --reading-serif: 'Pagella', Georgia, serif; }
.fonturi-mostra[data-optiune~='kurier-light'] { font-weight: 300; }
.fonturi-mostra[data-optiune~='kurier-medium'] { font-weight: 500; }
.fonturi-mostra[data-optiune~='kurier-light'] :is(strong, b), .fonturi-mostra[data-optiune~='kurier-medium'] :is(strong, b) { font-weight: 700; }
.fonturi-mostra[data-pachet='azi'] .katex { font-size: .97em; }
.fonturi-mostra[data-pachet] math:not(.katex-mathml math) { font-family: var(--mat-font, math), math; font-size: calc(var(--mat-scala, 1) * 1em); }
.fonturi-mostra[data-pachet] mo.tml-prime { margin-right: var(--mat-prim-dupa, 0); }
.fonturi-mostra[data-pachet] .mml-inline > math:first-child { margin-left: var(--mat-stanga, 0); }
