/* cyrillic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/CormorantGaramond-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/CormorantGaramond-500-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;
}
/* cyrillic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/CormorantGaramond-600-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/CormorantGaramond-600-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;
}
/* cyrillic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/static/fonts/CormorantGaramond-700-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/static/fonts/CormorantGaramond-700-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;
}
/* cyrillic */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/GolosText-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/GolosText-400-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;
}
/* cyrillic */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/GolosText-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/GolosText-500-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;
}
/* cyrillic */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/GolosText-600-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/GolosText-600-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;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/JetBrainsMono-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/JetBrainsMono-400-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;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/JetBrainsMono-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/JetBrainsMono-500-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;
}

body{margin:0;background:#0d0f12;font-variant-numeric:lining-nums}
a{color:#ebe8e1}a:hover{color:#ffffff}
input:focus,button:focus-visible,a:focus-visible{outline:2px solid #e3a948;outline-offset:2px}
@keyframes ntblink{0%,100%{opacity:1}50%{opacity:.2}}
@keyframes ntspin{to{transform:rotate(360deg)}}
@keyframes ntglitch{0%,92%,100%{transform:none;text-shadow:none}93%{transform:translate(4px,-1px);text-shadow:-4px 0 rgba(229,72,61,.75),4px 0 rgba(111,168,160,.7)}95%{transform:translate(-5px,1px);text-shadow:4px 0 rgba(229,72,61,.75),-4px 0 rgba(111,168,160,.7)}97%{transform:translate(2px,0);text-shadow:-2px 0 rgba(229,72,61,.6)}}
@keyframes ntgrain{0%{transform:translate(0,0)}20%{transform:translate(-3%,2%)}40%{transform:translate(2%,-3%)}60%{transform:translate(-2%,-1%)}80%{transform:translate(3%,3%)}100%{transform:translate(0,0)}}
@keyframes ntspec{to{transform:translateX(-180px)}}
.rec{animation:ntblink 1.8s ease-in-out infinite}
.spin{transform-box:fill-box;transform-origin:center;animation:ntspin 60s linear infinite}
.glitch{display:block;animation:ntglitch 13s steps(1,end) infinite}
.grain{animation:ntgrain .6s steps(5,end) infinite}
.spec{animation:ntspec 14s linear infinite}
@media (prefers-reduced-motion:reduce){.rec,.spin,.glitch,.grain,.spec{animation:none}}

/* маленькая «живая» спектрограмма рядом с верхней кнопкой поддержки (#support-bar) */
@keyframes nteq{0%,100%{transform:scaleY(.32)}50%{transform:scaleY(1)}}
.support-eq{flex:none}
.support-eq rect{transform-box:fill-box;transform-origin:bottom;animation:nteq 1.1s ease-in-out infinite}
.support-eq rect:nth-child(1){animation-duration:1.3s;animation-delay:-.1s}
.support-eq rect:nth-child(2){animation-duration:.9s;animation-delay:-.4s}
.support-eq rect:nth-child(3){animation-duration:1.15s;animation-delay:-.2s}
.support-eq rect:nth-child(4){animation-duration:.85s;animation-delay:-.6s}
.support-eq rect:nth-child(5){animation-duration:1s;animation-delay:-.3s}
@media (prefers-reduced-motion:reduce){.support-eq rect{animation:none;transform:scaleY(.7)}}

[hidden]{display:none!important}
[data-cfg-text]:empty{display:none}
section[id]:target,article[id]:target{outline:2px solid #e3a948;outline-offset:6px;border-radius:16px;scroll-margin-top:24px}
.file-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-top:1px solid #262c34;font-family:'JetBrains Mono',Consolas,monospace;font-size:14px}
.file-link{color:#e3a948;font-family:'Golos Text','Segoe UI',Arial,sans-serif;font-size:15px;padding:8px 0}
.sha-row{word-break:break-all}
.state-chip{display:inline-flex;align-items:center;justify-content:center;min-width:118px;box-sizing:border-box;font-family:'JetBrains Mono',Consolas,monospace;font-size:12px;letter-spacing:.1em;border-radius:999px;padding:4px 12px;border:1px solid #3a4450;color:#a3abb4}
.state-chip[data-done="1"]{background:#e3a948;color:#14110a;border-color:#e3a948}
.t-solved{color:#e3a948;font-family:'JetBrains Mono',Consolas,monospace;font-size:14px;letter-spacing:.1em}
.hint-item{border-left:2px solid #e3a948;padding:4px 0 4px 16px;margin-top:10px}
.hint-item p{margin:6px 0 0;font-family:'Golos Text','Segoe UI',Arial,sans-serif;font-size:17px;line-height:1.6;color:#ebe8e1}
.hint-head{font-family:'JetBrains Mono',Consolas,monospace;font-size:12px;letter-spacing:.14em;color:#e3a948}
.hall-row{display:grid;grid-template-columns:56px 1fr auto auto;gap:16px;padding:16px 24px;border-bottom:1px solid #262c34;font-family:'Golos Text','Segoe UI',Arial,sans-serif;font-size:17px;color:#ebe8e1;align-items:baseline}
.hall-row:last-child{border-bottom:0}
.hall-head{font-family:'JetBrains Mono',Consolas,monospace;font-size:13px;letter-spacing:.14em;color:#a3abb4}
.hall-row .c-place,.hall-row .c-when,.hall-row .c-took{font-family:'JetBrains Mono',Consolas,monospace;font-size:14px}
.hall-row .c-nick{min-width:0;overflow-wrap:anywhere}
.hall-empty{padding:20px 24px;color:#a3abb4;font-family:'Golos Text','Segoe UI',Arial,sans-serif}
@media (max-width:640px){.hall-row{grid-template-columns:44px 1fr auto;padding:14px 16px}.hall-row .c-when{display:none}}
button:disabled{opacity:.55;cursor:not-allowed}
.img-progress-fill{animation:img-indet 1.3s ease-in-out infinite}
@keyframes img-indet{0%{margin-left:0;width:30%}50%{margin-left:70%;width:30%}100%{margin-left:0;width:30%}}
@media (prefers-reduced-motion:reduce){.img-progress-fill{animation:none;width:100%;margin-left:0;opacity:.5}}
@media (max-width:700px){.spec-box{display:none}}
.how-diagram-mobile{display:none}
@media (max-width:760px){.how-diagram-desktop{display:none}.how-diagram-mobile{display:block}}
.how-pulse{stroke-dasharray:6 18;animation:how-flow 2.2s linear infinite}
@keyframes how-flow{to{stroke-dashoffset:-24}}
@media (prefers-reduced-motion:reduce){.how-pulse{animation:none;stroke-dasharray:0}}

/* ---------- оживление меню (задание №2, часть 4): переменные для подстройки эффектов ---------- */
:root{
  --nav-glow-dur:180ms;                              /* свечение текста */
  --nav-glow-shadow:0 0 12px rgba(227,169,72,.45);
  --nav-line-dur:260ms;                              /* нижнее меню — подчёркивание при наведении */
  --nav-breathe-dur:3.2s;                            /* «дыхание» линии активной страницы вверху */
}
/* Верхнее меню (.nav-link): по просьбе автора оставлена только смена цвета текста при наведении —
   без подчёркивания и «спектрограммы» (были в первой версии части 4, автору не понравилось). */
.nav-link{position:relative;text-decoration:none;color:#a3abb4;border-bottom:2px solid transparent;display:inline-block;
  -webkit-tap-highlight-color:transparent;
  transition:color var(--nav-glow-dur) ease}
.nav-link:focus:not(:focus-visible){outline:none}
.nav-link:hover,.nav-link:focus-visible{color:#e3a948}
.nav-link.is-active{color:#ebe8e1;border-bottom-color:#e3a948;animation:nav-breathe var(--nav-breathe-dur) ease-in-out infinite}
@keyframes nav-breathe{
  0%,100%{text-shadow:0 0 6px rgba(227,169,72,.25)}
  50%{text-shadow:0 0 12px rgba(227,169,72,.55)}
}
.nav-support{transition:border-color var(--nav-line-dur) ease}
.nav-support:hover,.nav-support:focus-visible{border-bottom-color:#e3a948}
.nav-serial{transition:box-shadow var(--nav-glow-dur) ease}
.nav-serial:hover,.nav-serial:focus-visible{box-shadow:inset 0 0 0 1px #e3a948}
.nav-serial:hover .rec,.nav-serial:focus-visible .rec{filter:brightness(1.5)}

/* та же жёлтая подсветка — у ВСЕХ кнопок сайта (но не у верхнего/нижнего меню и не у ссылок в тексте).
   Общего класса у кнопок нет, поэтому ловим их по характерной инлайн-подписи border-radius:10px —
   её сайт сам, без доработок, уже ставит только настоящим кнопкам ("Войти", "Ответить", "Поддержать
   проект" и т.п.), не ссылкам в тексте и не карточкам (у тех radius 16px). nav-serial исключён, у него
   та же подсветка уже своим правилом выше. */
a[style*="border-radius:10px"]:not(.nav-link):not(.nav-footer):not(.nav-serial):not(.nav-support),
button{transition:box-shadow var(--nav-glow-dur) ease}
a[style*="border-radius:10px"]:not(.nav-link):not(.nav-footer):not(.nav-serial):not(.nav-support):hover,
a[style*="border-radius:10px"]:not(.nav-link):not(.nav-footer):not(.nav-serial):not(.nav-support):focus-visible,
button:not(:disabled):hover,
button:not(:disabled):focus-visible{box-shadow:inset 0 0 0 1px #e3a948}
/* Нижнее меню «Документы» (.nav-footer) — как было: цвет + подчёркивание слева направо. */
.nav-footer{position:relative;transition:color var(--nav-glow-dur) ease}
.nav-footer::after{content:"";position:absolute;left:0;bottom:2px;height:1px;width:100%;background:#e3a948;
  transform:scaleX(0);transform-origin:left;transition:transform var(--nav-line-dur) ease}
.nav-footer:hover,.nav-footer:focus-visible{color:#e3a948}
.nav-footer:hover::after,.nav-footer:focus-visible::after{transform:scaleX(1)}
@media (hover:none){
  .nav-link:hover{color:#a3abb4}
  .nav-link:active{color:#e3a948}
  .nav-support:hover{border-bottom-color:transparent}
  .nav-support:active{border-bottom-color:#e3a948}
}
@media (prefers-reduced-motion:reduce){
  .nav-link.is-active,.nav-footer::after{animation:none!important;transition:none!important}
}

/* числовые поля: стрелочки остаются системными (функциональность и клавиатурное управление не трогаем),
   только перекрашиваем под тёмную тему сайта тем же приёмом, что и у ползунка прокрутки ниже — не
   заменяем своими кнопками (автор отменил эту версию, выглядела чужеродно). Firefox свои стрелочки красить
   не даёт вообще (только показать/скрыть целиком) — там остаётся обычный вид браузера, он и так небольшой. */
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{opacity:1;filter:invert(1);cursor:pointer}

/* тонкий тёмный ползунок в стиле сайта — вместо системного, в любом прокручиваемом блоке
   (история операций в кабинете, горизонтальная прокрутка таблиц и т.п.), по всему сайту и в админке */
*{scrollbar-width:thin;scrollbar-color:#3a4450 #14181d}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:#14181d}
::-webkit-scrollbar-thumb{background:#3a4450;border-radius:8px}
::-webkit-scrollbar-thumb:hover{background:#e3a948}
