/* Archivo (variable: weight 100-900, width 62-125%), served from this site (SIL OFL 1.1, fonts/Archivo-OFL.txt).
   Latin only, as Google Fonts has it: Cyrillic text falls back to the system font. */
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* JetBrains Mono (variable, weight 100-800) for code, served from this site (SIL OFL 1.1, fonts/JetBrainsMono-OFL.txt) */
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(fonts/jetbrains-mono-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(fonts/jetbrains-mono-cyrillic.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* the theme's fonts come from here, not from Google Fonts (mkdocs.yml: theme.font: false) */
:root {
  --md-text-font: "Archivo";
  --md-code-font: "JetBrains Mono";
}

/* Claugine palette for Material, the logo's colours — matches the landing site (www/assets/css/site.css): the header
   in the logo's background purple (both schemes; the gear cut from the logo sits on it), links and accents in the brand purple */

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #510259;
  --md-primary-fg-color--light: #6E1F7E;
  --md-primary-fg-color--dark: #3A0141;
  --md-accent-fg-color: #9B2DB0;
  --md-default-bg-color: #F8F6F9;
  --md-default-fg-color: #1D0F24;
  --md-typeset-a-color: #7A1B8C;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #510259;
  --md-primary-fg-color--light: #6E1F7E;
  --md-primary-fg-color--dark: #2A0130;
  --md-accent-fg-color: #E6B8F5;
  --md-default-bg-color: #140B19;
  --md-typeset-a-color: #D69BEA;
  --md-hue: 285;
}

.md-header__title,
.md-typeset h1,
.md-typeset h2 {
  font-variation-settings: "wdth" 118;
  letter-spacing: -0.01em;
}

.md-typeset h1 { font-weight: 720; color: var(--md-default-fg-color); }
.md-typeset h2 { font-weight: 680; }

.md-footer,
.md-footer-meta { background-color: #24102B; }

/* the short logo: the gear cut from the logo (on its own purple, the header's colour) */
.md-header__button.md-logo { padding: 0.2rem; margin: 0.2rem 0.2rem 0.2rem 0.4rem; }
.md-header__button.md-logo img { height: 2rem; width: 2rem; }
.md-footer-meta { border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* migrated two-column tables have no header row: hide a header row only when all its cells are empty (a table like
   Licensing's, with an empty corner cell and named columns, keeps it) */
.md-typeset table:not([class]) thead:not(:has(th:not(:empty))) { display: none; }

/* the top row: the version of the live release (as on claugine.com) */
.md-footer-meta__inner { justify-content: space-between; }
.md-copyright.cl-version { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }

/* diagrams: the "Enlarge" button under each one, and the full-size view it opens (assets/diagrams.js) */
.md-typeset .diagram-zoom {
  display: block; margin: -0.4em 0 1em auto; padding: 0.15em 0.5em;
  font: inherit; font-size: 0.75rem; color: var(--md-accent-fg-color, #9B2DB0);
  background: none; border: 0; cursor: pointer;
}
.md-typeset .diagram-zoom:hover { text-decoration: underline; }
.diagram-full {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  background: var(--md-default-bg-color);
}
.diagram-full__bar { display: flex; justify-content: flex-end; padding: 8px 12px; border-bottom: 1px solid var(--md-default-fg-color--lightest); }
.diagram-full__area { flex: 1; overflow: auto; padding: 16px; }
.diagram-full__area > div { width: max-content; margin: 0 auto; }
.diagram-full__bar button {
  font: inherit; font-size: 0.8rem; padding: 0.35em 1em; cursor: pointer; border-radius: 4px;
  color: var(--md-default-fg-color); background: none; border: 1px solid var(--md-default-fg-color--lighter);
}
body.diagram-full-open { overflow: hidden; }

/* the language selector: EN RU KZ written out in the header (overrides/partials/alternate.html), as on my.claugine.com */
.md-header__option.cl-langs { display: flex; align-items: center; gap: 0.1rem; margin: 0 0.4rem; }
.cl-langs a { color: var(--md-primary-bg-color); opacity: 0.8; font-size: 0.7rem; letter-spacing: 0.02em;
  padding: 0.2rem 0.3rem; border-radius: 0.2rem; }
.cl-langs a:hover { opacity: 1; }
.cl-langs a.on { opacity: 1; font-weight: 700; }
.cl-langs a:focus-visible { outline: 2px solid var(--md-primary-bg-color); outline-offset: 1px; }

/* the gear stays in the header at every width, beside the menu button (Material hides the logo below 76.25em) */
@media screen and (max-width: 76.234375em) {
  .md-header__button.md-logo { display: inline-block; }
  .md-header__button.md-logo img { height: 1.8rem; width: 1.8rem; }
}
/* on a phone the gear names the site: the title, cut to "C…" beside it, is left out */
@media screen and (max-width: 44.984375em) {
  .md-header__title .md-header__topic { visibility: hidden; }
}
