/* ============================================================================
   0. WEBFONTS — self-hosted, generated by scripts/download_fonts.py
   ============================================================================ */
/* cyrillic-ext */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcEx58hLxR.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcExd8hLxR.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcEx18hLxR.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;
}
/* latin */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcExN8hA.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcEx58hLxR.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcExd8hLxR.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcEx18hLxR.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;
}
/* latin */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcExN8hA.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcEx58hLxR.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcExd8hLxR.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcEx18hLxR.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;
}
/* latin */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/v7-q5uCsoe9Lv5t7Meb31EcExN8hA.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.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;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.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;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v24-tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.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;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v40-nuFkD-vYSZviVYUb_rj3ij__anPXDTnohkk72xU.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v40-nuFkD-vYSZviVYUb_rj3ij__anPXDTnojUk72xU.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v40-nuFkD-vYSZviVYUb_rj3ij__anPXDTnojEk72xU.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;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v40-nuFkD-vYSZviVYUb_rj3ij__anPXDTnogkk7.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;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v40-nuFkD-vYSZviVYUb_rj3ij__anPXDTnohkk72xU.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v40-nuFkD-vYSZviVYUb_rj3ij__anPXDTnojUk72xU.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v40-nuFkD-vYSZviVYUb_rj3ij__anPXDTnojEk72xU.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;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v40-nuFkD-vYSZviVYUb_rj3ij__anPXDTnogkk7.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;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTjYgFE_.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTPYgFE_.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTLYgFE_.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;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTzYgA.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;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTjYgFE_.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTPYgFE_.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTLYgFE_.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;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTzYgA.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;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTjYgFE_.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTPYgFE_.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTLYgFE_.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;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/v40-nuFiD-vYSZviVYUb_rj3ij__anPXDTzYgA.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;
}

/* ============================================================================
   MONOCHROME — A Black & White Editorial Design System
   Extracted from the Knight's Move Builder
   ----------------------------------------------------------------------------
   A strict, print-inspired system: ink on paper, hairline rules, no color,
   invert-on-hover interactions, and a three-voice type stack
   (serif display · grotesque UI · mono labels).

   FONTS — all three families carry full Cyrillic (and Latin) coverage,
   suitable for Mongolian, Russian, and other Cyrillic-script text.
   Load before this stylesheet:

     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Golos+Text:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap&subset=cyrillic,cyrillic-ext,latin" rel="stylesheet">


   Sections
     1. Design Tokens         (:root custom properties)
     2. Reset & Base
     3. Typography            (.h1 .eyebrow .lede .serif .mono ...)
     4. Layout                (.stack .cluster .grid-2 .grid-3 .panel ...)
     5. Rules & Dividers      (.rule .section-head)
     6. Buttons               (.btn .btn--primary .btn-group ...)
     7. Toggle Switch         (.toggle)
     8. Segmented / Choice    (.choice-grid)
     9. Surfaces & Code       (.surface .code-box .copy-btn)
    10. Status Line           (.status .status__dot)
    11. Keycaps & Misc        (kbd, .tag)
    12. Utilities             (spacing, text, a11y)
    13. Motion & Theme        (fade-in, reduced-motion, optional dark)
   ============================================================================ */


/* ============================================================================
   1. DESIGN TOKENS
   ============================================================================ */
:root {
  /* ---- Ink scale (neutrals only — the whole system is grayscale) ---- */
  --ink:        #0a0a0a;   /* primary text, borders, fills          */
  --ink-2:      #1f1f1f;   /* strong body text                      */
  --ink-3:      #525252;   /* secondary text                        */
  --ink-4:      #737373;   /* muted labels, captions                */
  --ink-5:      #a3a3a3;   /* faint text, placeholders, scrollbars  */

  /* ---- Surfaces ---- */
  --bg:         #fafaf9;   /* page background (warm off-white)       */
  --surface:    #ffffff;   /* raised surfaces, inputs                */
  --surface-2:  #f5f5f4;   /* recessed / alt surface                 */
  --surface-3:  #ebebea;   /* hover on light surfaces                */

  /* ---- Rules / borders ---- */
  --rule:       #bdb9b6;   /* hairline dividers (stronger frame)     */
  --rule-2:     #7a7674;   /* stronger borders, input outlines       */

  /* ---- Semantic status (used sparingly: only on status dots) ----
     The system is monochrome by default; these two tokens are reserved
     for explicit signal: stock (healthy) and danger (warning).           */
  --ok:         #16a34a;   /* status: stock — green                  */
  --warn:       #d97706;   /* status: danger — yellow / amber        */

  /* ---- Type families (all with full Cyrillic coverage) ----
     Playfair Display  — high-contrast editorial serif, true italic
     Golos Text        — Cyrillic-first humanist grotesque
     JetBrains Mono    — monospace, ships Cyrillic
     Fallbacks lead with Cyrillic-safe system faces. */
  --font-serif: 'Playfair Display', 'Noto Serif', Georgia, 'Times New Roman', serif;
  --font-sans:  'Golos Text', 'Noto Sans', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'Noto Sans Mono', Menlo, monospace;

  /* ---- Type scale (fluid) ---- */
  --text-xs:    11px;
  --text-sm:    12px;
  --text-base:  15px;
  --text-md:    1.0625rem;                 /* ~17px lede            */
  --text-lg:    1.5rem;
  --text-xl:    clamp(2.4rem, 6.5vw, 4.6rem); /* display headline   */

  /* ---- Line heights ---- */
  --leading-tight:   0.98;
  --leading-snug:    1.3;
  --leading-normal:  1.55;
  --leading-loose:   1.85;

  /* ---- Letter spacing ---- */
  --tracking-tight:  -0.015em;  /* display headline (Playfair runs dense) */
  --tracking-wide:    0.04em;
  --tracking-wider:   0.16em;
  --tracking-widest:  0.22em;

  /* ---- Spacing scale ---- */
  --space-1:  0.25rem;
  --space-2:  0.4rem;
  --space-3:  0.6rem;
  --space-4:  0.85rem;
  --space-5:  1.25rem;
  --space-6:  1.75rem;
  --space-7:  2.25rem;
  --space-8:  clamp(1.75rem, 3vw, 3rem);

  /* ---- Radii (this system is sharp — radii are intentionally minimal) ---- */
  --radius-0:  0;        /* default: square corners                 */
  --radius-sm: 2px;      /* keycaps only                            */
  --radius-pill: 999px;  /* toggle track                            */

  /* ---- Borders ---- */
  --border:        1.5px solid var(--rule);
  --border-strong: 2px solid var(--rule-2);
  --border-ink:    2px solid var(--ink);

  /* ---- Elevation (flat system — a single offset "plate" shadow) ---- */
  --plate: 0 0 0 4px var(--bg), 0 1px 0 5px var(--rule);

  /* ---- Motion ---- */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.2, 1.4, 0.4, 1);
  --t:           200ms var(--ease);
  --t-spring:    340ms var(--ease-spring);

  /* ---- Layout ---- */
  --container:   1240px;
  --sidebar:     clamp(280px, 24vw, 340px);
}


/* ============================================================================
   2. RESET & BASE
   ============================================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: none; }

:where(button, a, input, [tabindex]):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

::selection { background: var(--ink); color: var(--surface); }


/* ============================================================================
   3. TYPOGRAPHY
   ============================================================================ */
.serif { font-family: var(--font-serif); }
.sans  { font-family: var(--font-sans); }
.mono  { font-family: var(--font-mono); }

/* Display headline — serif, tight, italic emphasis */
.h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  max-width: 18ch;
}
.h1 em { font-style: italic; }

/* Section / kicker label — mono, uppercase, tracked, with leading tick */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--ink-4);
}

/* Standfirst / intro paragraph */
.lede {
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--ink-3);
  max-width: 56ch;
}

/* Inline serif italic note (placeholders, empty states) */
.note {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-5);
}

.text-muted   { color: var(--ink-4); }
.text-faint   { color: var(--ink-5); }
.tabular      { font-variant-numeric: tabular-nums; }


/* ============================================================================
   4. LAYOUT
   ============================================================================ */

/* App shell: header / main / sidebar / footer */
.app-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3.5rem) clamp(1.25rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
  grid-template-areas:
    "head  head"
    "main  aside"
    "foot  foot";
  column-gap: clamp(2rem, 5vw, 4.5rem);
  row-gap: var(--space-8);
}
.app-shell > .area-head  { grid-area: head; }
.app-shell > .area-main  { grid-area: main; min-width: 0; }
.app-shell > .area-aside { grid-area: aside; min-width: 0; }
.app-shell > .area-foot  { grid-area: foot; }

@media (max-width: 880px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "main" "aside" "foot";
    row-gap: var(--space-7);
  }
}

/* Vertical rhythm container */
.stack       { display: flex; flex-direction: column; gap: var(--space-4); }
.stack--lg   { gap: clamp(1.5rem, 2.5vw, 2.25rem); }
.stack--sm   { gap: var(--space-2); }
.stack--xs   { gap: var(--space-1); }

/* Horizontal grouping */
.cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Equal columns */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr;          gap: var(--space-2); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr);   gap: var(--space-2); }

/* Sidebar panel — a flat stack of hairline-separated sections */
.panel { display: flex; flex-direction: column; gap: clamp(1.5rem, 2.5vw, 2.25rem); }


/* ============================================================================
   5. RULES & DIVIDERS
   ============================================================================ */

/* Plain hairline */
.rule { border: none; border-top: var(--border); }

/* Header block with bottom rule */
.block-head {
  border-bottom: var(--border);
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

/* Footer block with top rule */
.block-foot {
  border-top: var(--border);
  padding-top: var(--space-6);
}

/* Section heading: mono uppercase label + optional trailing counter,
   underlined with a hairline. */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: var(--space-3);
  border-bottom: var(--border-strong);
}
.section-head .counter {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: none;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}


/* ============================================================================
   6. BUTTONS
   ----------------------------------------------------------------------------
   Signature interaction: invert on hover (white↔black). Square corners.
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--surface);
  border: var(--border-ink);
  border-radius: var(--radius-0);
  user-select: none;
}
.btn:hover  { background: var(--ink); color: var(--surface); }
.btn:active { transform: translateY(1px); }

.btn--primary           { background: var(--ink); color: var(--surface); }
.btn--primary:hover     { background: var(--surface); color: var(--ink); }

.btn--ghost             { background: transparent; border-color: var(--rule-2); color: var(--ink-3); }
.btn--ghost:hover       { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

/* Even button grid */
.btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }


/* ============================================================================
   7. TOGGLE SWITCH
   ----------------------------------------------------------------------------
   Minimal pill switch — goes solid ink when on.
   Markup: <label class="toggle"><input type="checkbox"><span>Label</span></label>
   ============================================================================ */
.toggle {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.42rem 0;
  font-size: 0.95rem;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.toggle input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 30px;
  height: 17px;
  flex-shrink: 0;
  background: var(--surface);
  border: var(--border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.toggle input::after {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 1.5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-4);
}
.toggle input:checked {
  background: var(--ink);
  border-color: var(--ink);
}
.toggle input:checked::after {
  background: var(--surface);
  transform: translateX(13px);
}


/* ============================================================================
   8. SEGMENTED / CHOICE GRID
   ----------------------------------------------------------------------------
   A grid of selectable options (e.g. board sizes). Active fills with ink.
   ============================================================================ */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}
.choice-grid button {
  padding: 0.55rem 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-3);
  background: transparent;
  border: var(--border-strong);
  border-radius: var(--radius-0);
}
.choice-grid button:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.choice-grid button.is-active {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}


/* ============================================================================
   9. SURFACES & CODE
   ============================================================================ */

/* Generic raised surface */
.surface {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-0);
  padding: var(--space-4);
}

/* Recessed surface (board, wells) */
.surface--recessed { background: var(--surface-2); }

/* Monospaced code / data readout, with thin scrollbar */
.code-box {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-0);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: var(--ink);
  word-break: break-word;
  overflow-y: auto;
  max-height: 12rem;
  min-height: 4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-5) transparent;
}
.code-box::-webkit-scrollbar { width: 6px; }
.code-box::-webkit-scrollbar-thumb { background: var(--ink-5); }
.code-box .empty { /* empty-state text */
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-5);
}

/* Highlighted token inside a code box (e.g. "current" item) */
.token        { display: inline-block; padding: 1px 4px; font-variant-numeric: tabular-nums; }
.token--active{ background: var(--ink); color: var(--surface); padding: 1px 5px; }
.token-sep    { color: var(--ink-5); margin: 0 1px; }

/* Dashed action button (copy, export) — becomes solid ink on success */
.copy-btn {
  width: 100%;
  padding: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ink-3);
  background: transparent;
  border: 1px dashed var(--rule-2);
  border-radius: var(--radius-0);
}
.copy-btn:hover {
  border-style: solid;
  border-color: var(--ink);
  color: var(--ink);
}
.copy-btn.is-done {
  border-style: solid;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}


/* ============================================================================
   10. STATUS LINE
   ----------------------------------------------------------------------------
   Mono caption with a state dot. Three states encoded with shape/weight,
   not color — staying true to the monochrome constraint.
   ============================================================================ */
.status {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1) 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--ink-5);
}
/* success: solid ink dot with halo ring */
.status.is-success { color: var(--ink); }
.status.is-success .status__dot {
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--ink);
}
/* warn: hollow dot (ink ring, empty centre) */
.status.is-warn { color: var(--ink); }
.status.is-warn .status__dot {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--ink);
}


/* ============================================================================
   11. KEYCAPS & TAGS
   ============================================================================ */
kbd, .kbd {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 1px 5px;
}

/* Inline mono tag / chip */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-3);
  border: var(--border);
  padding: 1px 6px;
}

/* Footnote row of keycaps (e.g. shortcut legend) */
.legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--ink-4);
}
.legend kbd { margin-right: 4px; }


/* ============================================================================
   12. UTILITIES
   ============================================================================ */
.flow > * + * { margin-top: var(--space-4); }

.mt-0{margin-top:0}      .mt-1{margin-top:var(--space-1)}  .mt-2{margin-top:var(--space-2)}
.mt-3{margin-top:var(--space-3)} .mt-4{margin-top:var(--space-4)} .mt-6{margin-top:var(--space-6)}
.mb-0{margin-bottom:0}  .mb-2{margin-bottom:var(--space-2)} .mb-4{margin-bottom:var(--space-4)}

.text-center { text-align: center; }
.text-left   { text-align: left; }

.full   { width: 100%; }
.hidden { display: none !important; }

/* Visually hidden but available to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================================
   13. THEME
   ----------------------------------------------------------------------------
   Optional inverted theme. Because the system is pure grayscale, a full dark
   mode is just a token swap: add class="invert" to <html> (or any subtree).
   ============================================================================ */
.invert {
  --ink:       #f5f5f4;
  --ink-2:     #e5e5e5;
  --ink-3:     #a3a3a3;
  --ink-4:     #737373;
  --ink-5:     #525252;
  --bg:        #0a0a0a;
  --surface:   #171717;
  --surface-2: #1f1f1f;
  --surface-3: #262626;
  --rule:      #2a2a2a;
  --rule-2:    #404040;
}
.invert body,
body.invert { color: var(--ink); background: var(--bg); }
