Files
sport-prog-club/app/static/style.css
T
Кирилл ЯценкоandClaude Opus 5.5 22fffc2a26 «Когда решали»: посылки по времени на странице задания
Преподавателю видно, решает ли группа задание по ходу недели или всё
приходит в последний вечер. Под матрицей — гистограмма от выдачи до
дедлайна: в столбике снизу первые решения задач (то, что идёт в зачёт),
сверху остальные посылки; линия дедлайна и затенённое «после». Над
графиком — доля решений в срок, пришедших в последние сутки перед
дедлайном.

Ширина столбика выбирается сама (час … неделя, не больше 48 столбиков)
и выравнивается по местным часам. Посылки преподавателя и сделанные до
выдачи не считаются. Рисует шаблон обычным SVG, без скриптов: подсказка
при наведении — <title> у столбика, цифры целиком — в таблице под
графиком. Цвета берутся от темы и проверены на светлой и тёмной.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 01:54:09 +05:00

1416 lines
80 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ============================================================
Плакат — визуальный язык портала.
Жёлтое поле, чёрные линейки, один тяжёлый гротеск. Три цвета:
жёлтый, чёрный и белый; синий — только для ссылок, красный —
только для ошибок и просрочки. Сложность и статусы кодируются
плотностью заливки, а не цветом.
Тёмная тема — инверсия: чёрное поле, жёлтые линейки.
============================================================ */
@font-face { font-family: "Unbounded"; font-weight: 500 800; font-display: swap;
src: local("Unbounded"), url("fonts/Unbounded-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-weight: 500 800; font-display: swap;
src: local("Unbounded"), url("fonts/Unbounded-cyrillic.woff2") format("woff2");
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 400 600; font-display: swap;
src: local("Golos Text"), url("fonts/GolosText-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-weight: 400 600; font-display: swap;
src: local("Golos Text"), url("fonts/GolosText-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-weight: 400; font-display: swap;
src: local("JetBrains Mono"), url("fonts/JetBrainsMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap;
src: local("JetBrains Mono Bold"), url("fonts/JetBrainsMono-Bold.woff2") format("woff2"); }
/* Шрифт для формул. MathML рисует браузер, но растягивать скобки он умеет только
шрифтом с математической таблицей: без него фигурная скобка у cases и скобки
вокруг дробей остаются строчного роста. Браузер скачивает файл только
на страницах, где есть формулы, — и не скачивает, если шрифт уже стоит. */
@font-face { font-family: "STIX Two Math"; font-display: swap;
src: local("STIX Two Math"), local("STIXTwoMath-Regular"), url("fonts/STIXTwoMath.otf") format("opentype"); }
/* ============================================================
Цветовые темы. Тема — это пара «поле и краска» плюс акцент: портал
нарисован как плакат, и палитра у него тоже плакатная, в два цвета.
Каждая тема — один блок переменных и ничего больше: то, что зависело
от светлоты (фон полей, какой логотип показывать), вынесено в такие же
переменные, иначе новая тема требовала бы правок в трёх местах.
У каждой пары проверен контраст: текст, приглушённый текст и ссылки
не ниже 4.5:1 к своему фону. Красиво — это ещё и читаемо.
============================================================ */
/* Жёлтое поле и чёрная краска — как на афише. */
:root[data-theme="amber"] {
color-scheme: light;
--bg: #f4c430;
--panel: #f4c430;
--panel-2: #f8d24f;
--ink: #111111;
--text: #111111;
--text-2: #3b3312;
--muted: #5b4f25;
--line: #111111;
--line-soft: rgba(0, 0, 0, .26);
--inv-bg: #111111;
--inv-text: #f4c430;
--accent: #1a45bd;
--err: #c1121f;
--err-text: #ffffff;
--code-key: #111111;
--code-str: #1a45bd;
--code-com: #5b4f25;
--code-num: #7a4b00;
--field-bg: #ffffff;
--field-text: #111111;
--placeholder: #7d7043;
--light-logo: block;
--dark-logo: none;
}
/* Тёплый лист, если жёлтое поле слишком громкое. */
:root[data-theme="parchment"] {
color-scheme: light;
--bg: #faf6ec;
--panel: #fffdf7;
--panel-2: #f2ecdd;
--ink: #14110c;
--text: #14110c;
--text-2: #43392a;
--muted: #6b6152;
--line: #14110c;
--line-soft: rgba(0, 0, 0, .26);
--inv-bg: #14110c;
--inv-text: #fffdf7;
--accent: #1b52c0;
--err: #b3261e;
--err-text: #ffffff;
--code-key: #14110c;
--code-str: #1b52c0;
--code-com: #6b6152;
--code-num: #8a4b00;
--field-bg: #ffffff;
--field-text: #14110c;
--placeholder: #8b8170;
--light-logo: block;
--dark-logo: none;
}
/* То же жёлтое по чёрному, только наоборот. */
:root[data-theme="coal"] {
color-scheme: dark;
--bg: #0f0e0a;
--panel: #0f0e0a;
--panel-2: #1a1810;
--ink: #f4c430;
--text: #f4e9c2;
--text-2: #dcc985;
--muted: #a8975a;
--line: #f4c430;
--line-soft: rgba(255, 255, 255, .28);
--inv-bg: #f4c430;
--inv-text: #0f0e0a;
--accent: #9dbcff;
--err: #ff5a5a;
--err-text: #111111;
--code-key: #f4c430;
--code-str: #9dbcff;
--code-com: #a8975a;
--code-num: #e8b96a;
--field-bg: #1a1810;
--field-text: #f4e9c2;
--placeholder: #8c7f4e;
--light-logo: none;
--dark-logo: block;
}
/* Синее поле и жёлтая краска — сочетание шведского флага. */
:root[data-theme="sweden"] {
color-scheme: dark;
--bg: #062f5c;
--panel: #062f5c;
--panel-2: #0b3f74;
--ink: #fecc00;
--text: #ffe89a;
--text-2: #f3d98a;
--muted: #c9b06a;
--line: #fecc00;
--line-soft: rgba(255, 255, 255, .28);
--inv-bg: #fecc00;
--inv-text: #062f5c;
--accent: #9dd0ff;
--err: #ff7b6b;
--err-text: #062f5c;
--code-key: #fecc00;
--code-str: #9dd0ff;
--code-com: #c9b06a;
--code-num: #ffe08a;
--field-bg: #0b3f74;
--field-text: #ffe89a;
--placeholder: #9d8a55;
--light-logo: none;
--dark-logo: block;
}
/* Зелёное поле и жёлтая краска — сочетание бразильского флага. */
:root[data-theme="brazil"] {
color-scheme: dark;
--bg: #063d20;
--panel: #063d20;
--panel-2: #0b5330;
--ink: #fedd00;
--text: #ffeb8f;
--text-2: #f0dc8a;
--muted: #c2ad63;
--line: #fedd00;
--line-soft: rgba(255, 255, 255, .28);
--inv-bg: #fedd00;
--inv-text: #063d20;
--accent: #8fd3ff;
--err: #ff7b6b;
--err-text: #063d20;
--code-key: #fedd00;
--code-str: #8fd3ff;
--code-com: #c2ad63;
--code-num: #ffe08a;
--field-bg: #0b5330;
--field-text: #ffeb8f;
--placeholder: #97874e;
--light-logo: none;
--dark-logo: block;
}
/* Белое поле и алая краска — сочетание японского флага. Текст почти чёрный:
алым набраны рамки, заголовочные плашки и знаки, а не строки подряд. */
:root[data-theme="japan"] {
color-scheme: light;
--bg: #faf7f6;
--panel: #fffdfc;
--panel-2: #f3e7e6;
--ink: #b3001f;
--text: #1f1412;
--text-2: #4a3634;
--muted: #6e5b58;
--line: #b3001f;
--line-soft: rgba(179, 0, 31, .26);
--inv-bg: #b3001f;
--inv-text: #fffdfc;
--accent: #1b52c0;
--err: #8a0016;
--err-text: #ffffff;
--code-key: #b3001f;
--code-str: #1b52c0;
--code-com: #6e5b58;
--code-num: #7a4b00;
--field-bg: #ffffff;
--field-text: #1f1412;
--placeholder: #9c8582;
--light-logo: block;
--dark-logo: none;
}
/* Тёмно-синее поле и кремовая краска с золотой ссылкой. */
:root[data-theme="oxford"] {
color-scheme: dark;
--bg: #0a1a3f;
--panel: #0a1a3f;
--panel-2: #132754;
--ink: #f3ead8;
--text: #f3ead8;
--text-2: #ddd2bc;
--muted: #b0a78f;
--line: #f3ead8;
--line-soft: rgba(243, 234, 216, .28);
--inv-bg: #f3ead8;
--inv-text: #0a1a3f;
--accent: #ffcf6b;
--err: #ff7b6b;
--err-text: #0a1a3f;
--code-key: #f3ead8;
--code-str: #ffcf6b;
--code-com: #b0a78f;
--code-num: #9ad7ff;
--field-bg: #132754;
--field-text: #f3ead8;
--placeholder: #8d8674;
--light-logo: none;
--dark-logo: block;
}
/* Мандариновое поле и чёрная краска. */
:root[data-theme="mandarin"] {
color-scheme: light;
--bg: #fb8b24;
--panel: #fb8b24;
--panel-2: #fd9e47;
--ink: #111111;
--text: #111111;
--text-2: #3a2207;
--muted: #4a2a06;
--line: #111111;
--line-soft: rgba(0, 0, 0, .26);
--inv-bg: #111111;
--inv-text: #fb8b24;
--accent: #0b2f8f;
--err: #8c1007;
--err-text: #ffffff;
--code-key: #111111;
--code-str: #0b2f8f;
--code-com: #4a2a06;
--code-num: #5a2d00;
--field-bg: #ffffff;
--field-text: #111111;
--placeholder: #8a5f30;
--light-logo: block;
--dark-logo: none;
}
/* Кислотный лайм и чёрная краска — самая громкая пара набора. */
:root[data-theme="lime"] {
color-scheme: light;
--bg: #d7f205;
--panel: #d7f205;
--panel-2: #e2f747;
--ink: #111111;
--text: #111111;
--text-2: #333c05;
--muted: #3f4a06;
--line: #111111;
--line-soft: rgba(0, 0, 0, .26);
--inv-bg: #111111;
--inv-text: #d7f205;
--accent: #0f3aa0;
--err: #a00d16;
--err-text: #ffffff;
--code-key: #111111;
--code-str: #0f3aa0;
--code-com: #3f4a06;
--code-num: #5a4a00;
--field-bg: #ffffff;
--field-text: #111111;
--placeholder: #6a7a20;
--light-logo: block;
--dark-logo: none;
}
/* Белое поле и синяя краска — сочетание финского флага. */
/* Тема по умолчанию: бело-синяя. Без выбора в браузере и без скрипта
страница получает её же — поэтому селектор с голым :root здесь. */
:root, :root[data-theme="finland"] {
color-scheme: light;
--bg: #f6f9fc;
--panel: #ffffff;
--panel-2: #e6eef7;
--ink: #002f6c;
--text: #0d1b2a;
--text-2: #33465c;
--muted: #3d566e;
--line: #002f6c;
--line-soft: rgba(0, 47, 108, .26);
--inv-bg: #002f6c;
--inv-text: #ffffff;
--accent: #0b5fbd;
--err: #b3261e;
--err-text: #ffffff;
--code-key: #002f6c;
--code-str: #0b5fbd;
--code-com: #3d566e;
--code-num: #7a4b00;
--field-bg: #ffffff;
--field-text: #0d1b2a;
--placeholder: #7d8fa3;
--light-logo: block;
--dark-logo: none;
}
/* Чёрное поле и кислотная зелень. */
:root[data-theme="neon"] {
color-scheme: dark;
--bg: #0b0e07;
--panel: #0b0e07;
--panel-2: #151a0d;
--ink: #c8ff2e;
--text: #d9ecb0;
--text-2: #c2d99a;
--muted: #8fa85f;
--line: #c8ff2e;
--line-soft: rgba(255, 255, 255, .28);
--inv-bg: #c8ff2e;
--inv-text: #0b0e07;
--accent: #7fd7ff;
--err: #ff6b6b;
--err-text: #0b0e07;
--code-key: #c8ff2e;
--code-str: #7fd7ff;
--code-com: #8fa85f;
--code-num: #ffd166;
--field-bg: #151a0d;
--field-text: #d9ecb0;
--placeholder: #6f8a44;
--light-logo: none;
--dark-logo: block;
}
/* Тёмная вода и ледяная бирюза. */
:root[data-theme="ice"] {
color-scheme: dark;
--bg: #051923;
--panel: #051923;
--panel-2: #0b2836;
--ink: #6fe3ff;
--text: #d7f2fb;
--text-2: #b3e0ef;
--muted: #6d97a8;
--line: #6fe3ff;
--line-soft: rgba(255, 255, 255, .28);
--inv-bg: #6fe3ff;
--inv-text: #051923;
--accent: #ffd166;
--err: #ff7b6b;
--err-text: #051923;
--code-key: #6fe3ff;
--code-str: #ffd166;
--code-com: #6d97a8;
--code-num: #a8e0c0;
--field-bg: #0b2836;
--field-text: #d7f2fb;
--placeholder: #5c7f8d;
--light-logo: none;
--dark-logo: block;
}
/* Почти чёрная слива и горячая фуксия. */
:root[data-theme="magenta"] {
color-scheme: dark;
--bg: #16041a;
--panel: #16041a;
--panel-2: #260a2c;
--ink: #ff59d6;
--text: #f6dff0;
--text-2: #e4c2dc;
--muted: #a87099;
--line: #ff59d6;
--line-soft: rgba(255, 255, 255, .28);
--inv-bg: #ff59d6;
--inv-text: #16041a;
--accent: #8fe3ff;
--err: #ff7b6b;
--err-text: #16041a;
--code-key: #ff59d6;
--code-str: #8fe3ff;
--code-com: #a87099;
--code-num: #ffd166;
--field-bg: #260a2c;
--field-text: #f6dff0;
--placeholder: #8a5c7f;
--light-logo: none;
--dark-logo: block;
}
:root {
--rule: 3px;
--display: "Unbounded", "Arial Black", Impact, sans-serif;
--sans: "Golos Text", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
--mono: "JetBrains Mono", Menlo, Consolas, monospace;
--rail: 88px;
}
*, *::before, *::after { box-sizing: border-box; }
/* Правило класса вроде .inline-form { display: flex } перебивает браузерное
[hidden], и скрытый блок остаётся видимым. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
margin: 0; background: var(--bg); color: var(--text);
font-family: var(--sans); font-size: 15px; line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
/* Ссылки в тексте: подчёркивание вместо цвета — плакат остаётся трёхцветным.
На ховере — инверсия, как маркером по бумаге. */
main a:not([class]) { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
main a:not([class]):hover { background: var(--ink); color: var(--bg); text-decoration: none; }
::selection { background: var(--ink); color: var(--bg); }
/* На тёмных плашках обычное выделение совпадает с их фоном, и не видно,
выделился ли ключ или адрес, который надо скопировать. Там — обратное. */
.rail ::selection, .mobile-bar ::selection, .tabbar ::selection,
pre.snippet::selection, pre.snippet ::selection, .code-box::selection, .code-box ::selection,
.flash.ok::selection, .flash.ok ::selection, .badge.ok::selection, .badge.info::selection,
.nb-md code::selection { background: var(--inv-text); color: var(--inv-bg); }
:focus-visible { outline: var(--rule) solid var(--ink); outline-offset: 2px; }
.mono, .code-box { font-family: var(--mono); }
.num, .points, .value, .rank, .countdown, .bar-value { font-variant-numeric: tabular-nums; }
/* ---------- иконки ---------- */
.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: square; stroke-linejoin: miter; vertical-align: -.18em; }
.icon.lg { width: 1.5em; height: 1.5em; }
.icon.xl { width: 2em; height: 2em; stroke-width: 1.8; }
/* ---------- метки капсом (общий приём) ---------- */
.lbl, h2, th, label, .badge, .stat .label, .eyebrow, .feed-day, .ticker-label, .brand-text, .nav a, .tabbar a, .nav-more > summary, .legend, .progress-line, .hm-legend, .heatmap-months, .heatmap-weekdays {
font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
}
/* ============================================================
Рейка — чёрный блок плаката
============================================================ */
body.with-rail { padding-left: var(--rail); }
.rail {
position: fixed; inset: 0 auto 0 0; width: var(--rail);
background: var(--inv-bg); color: var(--inv-text);
display: flex; flex-direction: column; z-index: 30;
}
.rail .brand { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 3px 12px; color: var(--inv-text); border-bottom: var(--rule) solid var(--inv-text); }
.rail .brand .icon { width: 30px; height: 30px; }
.rail .brand:hover { text-decoration: none; }
.brand-text { font-size: 9px; text-align: center; line-height: 1.3; }
.brand-logo { max-width: 82px; height: auto; display: block; }
/* Знак как маска: форма из SVG, цвет — текущий цвет текста. */
.brand-mark {
display: block; width: 84px; height: 60px;
background: currentColor;
-webkit-mask: var(--mark) center / contain no-repeat;
mask: var(--mark) center / contain no-repeat;
}
.brand-mark.small { width: 56px; height: 40px; }
.brand-mark.auth-mark { width: 182px; height: 130px; color: var(--ink); }
/* Переключатель темы: показываем иконку текущего состояния. */
.only-light { display: var(--light-logo); }
.only-dark { display: var(--dark-logo); }
.rail .nav { display: flex; flex-direction: column; }
/* Пункты прокручиваются, знак и подвал стоят на месте. Пока рейка была
сплошной, всё, что не влезало по высоте, обрезалось — вместе с выходом. */
.rail .nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.nav a, .tabbar a, .nav-more > summary {
display: flex; flex-direction: column; align-items: center; gap: 6px;
padding: 13px 4px 11px; color: var(--inv-text); font-size: 9.5px; letter-spacing: .06em;
border-bottom: 1px solid var(--line-soft); opacity: .78;
}
.nav a .icon, .tabbar a .icon, .nav-more > summary .icon { width: 20px; height: 20px; }
/* Подпись переносится: в английском и французском слова длиннее русских
и «ANNOUNCEMENTS» иначе вылезает за рейку. */
.nav a span, .tabbar a span, .nav-more > summary span { text-align: center; line-height: 1.25; overflow-wrap: anywhere; }
.nav a:hover, .tabbar a:hover, .nav-more > summary:hover { opacity: 1; text-decoration: none; }
.nav a.active, .tabbar a.active, .nav-more.active > summary, .nav-more[open] > summary {
opacity: 1; background: var(--inv-text); color: var(--inv-bg); }
.nav-count { display: inline-block; min-width: 16px; padding: 0 4px; font-size: 9px; line-height: 15px;
background: var(--err); color: var(--err-text); font-weight: 800; }
.nav a.active .nav-count, .tabbar a.active .nav-count { background: var(--inv-bg); color: var(--inv-text); }
/* Плашка «новое» у свежего раздела. Сидит в углу пункта, а не строкой под
подписью: в нижней панели телефона на третью строку нет места. */
.nav a, .tabbar a, .nav-more > summary { position: relative; }
.nav-new { position: absolute; top: 4px; right: 3px; padding: 0 3px; font-size: 7.5px; line-height: 12px;
font-weight: 800; letter-spacing: .04em; background: var(--inv-text); color: var(--inv-bg); }
.nav a.active .nav-new, .tabbar a.active .nav-new,
.nav-more.active > summary .nav-new, .nav-more[open] > summary .nav-new { background: var(--inv-bg); color: var(--inv-text); }
/* В нижней панели телефона пункт шириной в иконку, и слово закрыло бы её —
там вместо слова квадратик у правого плеча иконки. */
.tabbar .nav-new { top: 6px; right: calc(50% - 17px); width: 8px; height: 8px; padding: 0;
font-size: 0; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0 16px; border-top: var(--rule) solid var(--inv-text); }
.rail .whoami .avatar { width: 36px; height: 36px; }
.rail-btn { background: transparent; border: none; box-shadow: none; color: var(--inv-text); padding: 6px; opacity: .8; }
.rail-btn:hover { opacity: 1; background: transparent; transform: none; }
/* Подвал рейки: профиль, вид, оформление, язык, выход. Все кнопки одного
размера и без рамок — иначе строй сбивается: часть в рамке, часть без,
и столбик выглядит косым. Рамка у «RU» нужна на странице входа, где
переключатель стоит сам по себе, а здесь её роль играет сама рейка. */
.rail-foot .rail-btn,
.rail-foot .lang > summary {
display: flex; align-items: center; justify-content: center;
width: 36px; height: 36px; padding: 0;
border: 0; border-radius: 2px;
color: var(--inv-text); opacity: .75;
}
.rail-foot .rail-btn:hover,
.rail-foot .lang > summary:hover,
.rail-foot .lang[open] > summary { opacity: 1; }
.rail-foot .lang > summary { font-size: 12px; }
.rail-foot form { display: flex; }
/* ---------- «Ещё» в рейке ---------- */
.nav-more > summary { list-style: none; cursor: pointer; user-select: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
/* Меню привязано к окну, а не к пункту: список пунктов прокручивается
и обрезал бы всё, что торчит за край рейки. */
.nav-more-menu {
position: fixed; left: calc(var(--rail) + 8px); bottom: 12px; z-index: 40;
display: flex; flex-direction: column; min-width: 230px; max-height: calc(100vh - 24px); overflow: auto;
background: var(--bg); color: var(--ink); border: var(--rule) solid var(--ink);
}
.nav-more-group {
margin: 0; padding: 10px 14px 4px; font-size: 10.5px; font-weight: 800;
letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.nav .nav-more-menu a, .tabbar .nav-more-menu a {
flex-direction: row; align-items: center; gap: 10px; padding: 9px 14px;
border-bottom: none; opacity: 1; color: var(--ink);
font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 500;
}
.nav .nav-more-menu a span, .tabbar .nav-more-menu a span { text-align: left; }
.nav .nav-more-menu a:hover, .tabbar .nav-more-menu a:hover { background: var(--ink); color: var(--bg); }
.nav .nav-more-menu a.active, .tabbar .nav-more-menu a.active { background: var(--ink); color: var(--bg); font-weight: 700; }
.nav-more-menu a .badge { margin-left: auto; font-size: 9px; padding: 1px 6px; }
/* ---------- меню аватарки ---------- */
.rail-menu { position: relative; }
.rail-menu > summary { list-style: none; cursor: pointer; display: flex; padding: 0; }
.rail-menu > summary::-webkit-details-marker { display: none; }
.rail-menu > summary .avatar { width: 36px; height: 36px; }
/* Круглая рамка с зазором — знак, что аватарка нажимается и за ней меню,
а не просто картинка. Тенью, а не border: рамка не съедает место у
инициалов и не сдвигает строй рейки. */
.rail-menu > summary .avatar {
box-shadow: 0 0 0 2px var(--inv-bg), 0 0 0 4px var(--inv-text);
transition: box-shadow .12s;
}
.rail-menu > summary:hover .avatar, .rail-menu[open] > summary .avatar {
box-shadow: 0 0 0 2px var(--inv-bg), 0 0 0 5px var(--inv-text);
}
.mobile-bar .avatar { background: var(--inv-text); color: var(--inv-bg); }
.mobile-bar .rail-menu > summary .avatar { width: 32px; height: 32px; }
/* На телефоне меню раскрывается вниз от правого края, а вложенные тема
и язык — прямо в нём: сбоку от узкого экрана места нет. */
.rail-menu.down .rail-menu-panel { left: auto; right: 0; top: calc(100% + 10px); bottom: auto; min-width: 240px; }
.rail-menu.down .lang-menu { position: static; min-width: 0; max-height: 50vh; border: 0; border-top: 1px solid var(--line-soft); }
.rail-menu-panel {
position: absolute; left: calc(100% + 14px); bottom: 0; z-index: 40;
display: flex; flex-direction: column; min-width: 220px;
background: var(--bg); color: var(--ink); border: var(--rule) solid var(--ink);
}
.rail-menu-name { margin: 0; padding: 12px 14px 8px; font-weight: 800; border-bottom: 1px solid var(--line-soft); }
.rail-menu-panel > a, .rail-menu-panel form button, .rail-menu-panel .lang.in-menu > summary {
display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 14px;
background: transparent; border: 0; border-radius: 0; box-shadow: none; opacity: 1;
color: var(--ink); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; text-align: left;
height: auto; justify-content: flex-start;
}
.rail-menu-panel > a:hover, .rail-menu-panel form button:hover,
.rail-menu-panel .lang.in-menu > summary:hover, .rail-menu-panel .lang.in-menu[open] > summary {
background: var(--ink); color: var(--bg); text-decoration: none; transform: none;
}
.rail-menu-panel form { display: block; }
.rail-menu-panel .lang-code { margin-left: auto; font-weight: 700; font-size: 12px; }
/* ---------- выбор языка ---------- */
/* <details> вместо меню на скриптах: открывается силами браузера. */
.lang { position: relative; }
.lang > summary {
list-style: none; cursor: pointer; user-select: none;
font-size: 11px; font-weight: 700; letter-spacing: .04em;
padding: 5px 7px; border: 1px solid currentColor; border-radius: 2px;
opacity: .8; text-align: center;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary:hover, .lang[open] > summary { opacity: 1; }
.lang-menu {
position: absolute; bottom: 0; left: calc(100% + 8px); z-index: 40;
display: flex; flex-direction: column; min-width: 140px;
background: var(--bg); color: var(--ink);
border: var(--rule) solid var(--ink);
}
.lang.up .lang-menu { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; }
.lang-menu button {
display: block; width: 100%; text-align: left;
background: transparent; border: none; box-shadow: none; border-radius: 0;
color: inherit; font-size: 13px; padding: 9px 12px; letter-spacing: 0;
text-transform: none;
}
.lang-menu button:hover { background: var(--ink); color: var(--bg); transform: none; }
.lang-menu button.current { font-weight: 800; }
.lang-menu button.current::after { content: " ✓"; }
/* Выбор оформления: то же меню, что у языка, плюс образец цвета.
Образец рисуется своими значениями, а не переменными темы: иначе все
шесть квадратиков были бы одного цвета — текущего. */
.theme > summary { display: flex; align-items: center; justify-content: center; }
.theme-menu { max-height: min(70vh, 460px); overflow: auto; }
.theme-menu button { display: flex; align-items: center; gap: 10px; }
.theme-group {
margin: 0; padding: 8px 12px 2px;
font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
font-weight: 800; color: var(--muted);
}
.theme-menu .swatch {
width: 18px; height: 18px; flex: none;
border: 2px solid currentColor;
background: linear-gradient(135deg, var(--sw-a) 0 50%, var(--sw-b) 50% 100%);
}
.sw-amber { --sw-a: #f4c430; --sw-b: #111111; }
.sw-parchment { --sw-a: #fffdf7; --sw-b: #14110c; }
.sw-coal { --sw-a: #0f0e0a; --sw-b: #f4c430; }
.sw-sweden { --sw-a: #062f5c; --sw-b: #fecc00; }
.sw-brazil { --sw-a: #063d20; --sw-b: #fedd00; }
.sw-japan { --sw-a: #fffdfc; --sw-b: #b3001f; }
.sw-oxford { --sw-a: #0a1a3f; --sw-b: #f3ead8; }
.sw-mandarin { --sw-a: #fb8b24; --sw-b: #111111; }
.sw-lime { --sw-a: #d7f205; --sw-b: #111111; }
.sw-finland { --sw-a: #ffffff; --sw-b: #002f6c; }
.sw-neon { --sw-a: #0b0e07; --sw-b: #c8ff2e; }
.sw-ice { --sw-a: #051923; --sw-b: #6fe3ff; }
.sw-magenta { --sw-a: #16041a; --sw-b: #ff59d6; }
/* На странице входа рейки нет — переключатель стоит сам по себе. */
.lang.auth { display: inline-block; margin: 0 0 24px; }
.lang.auth > summary { display: inline-block; }
.lang.auth .lang-menu { bottom: auto; top: calc(100% + 8px); left: 0; }
/* Аватарка — у правого края: меню раскрывается от него вниз и влево. */
.mobile-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tabbar { display: none; }
.mobile-bar { display: none; }
/* ---------- строка события — инвертированная полоса ---------- */
.ticker {
position: sticky; top: 0; z-index: 20;
display: flex; align-items: center; gap: 12px;
min-height: 48px; padding: 8px 20px 8px 28px;
background: var(--inv-bg); color: var(--inv-text);
}
/* Ссылкой остаётся сама полоса, крестик — её сосед. */
.ticker-main { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; color: inherit; }
.ticker-main:hover, .ticker:hover { text-decoration: none; }
.ticker-hide .rail-btn { color: currentColor; opacity: .55; padding: 4px; }
.ticker-hide .rail-btn:hover { opacity: 1; color: var(--err); }
.ticker-hide .icon { width: 16px; height: 16px; }
.ticker-label { font-size: 10px; opacity: .8; }
.ticker-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ticker .countdown { margin-left: auto; background: transparent; color: var(--inv-text); border: 2px solid var(--inv-text); }
.ticker .countdown[data-state="live"] { background: var(--err); color: var(--err-text); border-color: var(--err); }
.ticker-go { display: inline-flex; }
main { max-width: 1180px; margin: 0 auto; padding: 34px 32px 90px; }
/* ============================================================
Типографика
============================================================ */
h1 { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: .95; letter-spacing: -.02em; text-transform: uppercase; margin: 0 0 10px; }
/* «ДВУХСТУПЕНЧАТЫЕ» крупным шрифтом шире телефона: длинное слово переносим. */
h1, .eyebrow { overflow-wrap: break-word; hyphens: auto; }
h2 { font-size: 11px; color: var(--text); margin: 38px 0 12px; display: flex; align-items: center; gap: 12px; }
h2::before { content: ""; width: 28px; height: var(--rule); background: var(--ink); flex: none; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
h2 .icon { display: none; }
h3 { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -.01em; margin: 0 0 10px; line-height: 1.2; }
.eyebrow { font-size: 10px; color: var(--text); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: "//"; opacity: .5; }
p.sub { color: var(--text-2); margin: 0 0 24px; max-width: 64ch; font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
/* ============================================================
Карточки — линейки, без заливки
============================================================ */
.card { background: var(--panel); border: var(--rule) solid var(--ink); padding: 20px 22px; margin-bottom: 16px; }
.card.flat { border-width: 1px; border-color: var(--line-soft); }
a.card { display: block; color: inherit; transition: background .12s, color .12s; }
a.card:hover { background: var(--inv-bg); color: var(--inv-text); text-decoration: none; }
a.card:hover .muted, a.card:hover h3 .icon { color: inherit; opacity: .85; }
/* ============================================================
Инвертированные блоки: карточка под курсором, шаг онбординга,
закреплённое объявление.
Меняем сами переменные, а не каждый вложенный элемент: бейдж, полоса
прогресса и линейки красятся «чернилами», и на чёрном фоне они просто
исчезали. Правка по месту чинила бы то, что уже есть, и ломалась бы
на каждой новой детали внутри.
============================================================ */
a.card:hover, .step:hover, .announce.pinned, .podium-card.p1 {
--ink: var(--inv-text);
--text: var(--inv-text);
--text-2: var(--inv-text);
--muted: var(--inv-text);
--line: var(--inv-text);
--line-soft: color-mix(in srgb, var(--inv-text) 35%, transparent);
--panel: var(--inv-bg);
--panel-2: var(--inv-bg);
}
/* Заливка бейджа внутри такого блока стала бы фоном в фон — оставляем контур. */
a.card:hover .badge, .step:hover .badge,
.announce.pinned .badge, .podium-card.p1 .badge {
background: transparent; color: var(--inv-text); border-color: var(--inv-text);
}
/* Красный несёт смысл сам по себе — его не трогаем. */
a.card:hover .badge.bad, .step:hover .badge.bad,
.announce.pinned .badge.bad, .podium-card.p1 .badge.bad {
background: var(--err); color: var(--err-text); border-color: var(--err);
}
.card.stretch { display: flex; flex-direction: column; }
.card.stretch .push-bottom { margin-top: auto; padding-top: 12px; }
.callout { border-left-width: 14px; }
.callout.warn { border-left-color: var(--err); }
.grid { display: grid; gap: 16px; }
/* Ячейка сетки по умолчанию не уже своего самого широкого содержимого:
одна формула или строка теста распирала всю страницу на телефоне. С нулём
широкое прокручивается внутри своего блока, а страница остаётся в экране. */
.grid > * { min-width: 0; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); counter-reset: sec; }
.grid.three > a.card h3::before { counter-increment: sec; content: counter(sec, decimal-leading-zero); font-size: 12px; opacity: .55; margin-right: 6px; }
.grid.three > a.card h3 .icon { display: none; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border: var(--rule) solid var(--ink); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
/* ---------- плитки статистики — ячейки одной таблицы ---------- */
.stat { padding: 18px 20px 20px; border-right: var(--rule) solid var(--ink); }
.stat:last-child { border-right: none; }
.stat .icon { display: none; }
.stat .value { font-family: var(--display); font-weight: 800; font-size: 52px; line-height: .9; letter-spacing: -.03em; }
.stat .label { font-size: 10px; color: var(--text-2); margin-top: 10px; }
/* ---------- аватарки ---------- */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 11px; font-weight: 800; flex: none; position: relative; overflow: hidden; background: var(--inv-bg); color: var(--inv-text); }
/* Картинка Gravatar лежит поверх инициалов: не загрузилась — остаются они. */
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 24px; height: 24px; font-size: 9px; }
.avatar.lg { width: 60px; height: 60px; font-size: 20px; }
.rail .avatar { background: var(--inv-text); color: var(--inv-bg); }
/* ============================================================
Таблицы
============================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
th { font-size: 10px; color: var(--text); border-bottom: var(--rule) solid var(--ink); }
tbody tr:hover { background: var(--panel-2); }
tbody tr:last-child td { border-bottom: none; }
.card.table-wrap { padding: 0 6px; }
/* ============================================================
Формы
============================================================ */
input[type=text], input[type=email], input[type=number], input[type=file], input[type=datetime-local], select, textarea {
width: 100%; padding: 10px 12px;
border: var(--rule) solid var(--ink); background: var(--field-bg); color: var(--field-text);
font: inherit; border-radius: 0;
}
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--ink); }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
textarea { min-height: 130px; resize: vertical; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
label { display: block; font-size: 10px; color: var(--text); margin-bottom: 6px; }
label.check { display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; cursor: pointer; }
label.check input { width: auto; margin: 0; accent-color: var(--ink); }
/* Выбор нескольких групп. Рамка как у поля ввода, чтобы читалось как один
контрол, а не россыпь галочек; длинный список прокручивается внутри. */
.check-list { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; max-height: 168px; overflow-y: auto; border: var(--rule) solid var(--ink); background: var(--field-bg); }
.check-list label.check { color: var(--field-text); margin: 0; }
.field { margin-bottom: 14px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }
/* ============================================================
Кнопки — чёрный блок / контур
============================================================ */
button, .btn {
display: inline-flex; align-items: center; gap: 8px;
padding: 10px 18px; border: var(--rule) solid var(--ink);
background: var(--inv-bg); color: var(--inv-text);
font: inherit; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 12px;
cursor: pointer; white-space: nowrap; border-radius: 0;
transition: transform .08s, box-shadow .08s;
}
button:hover, .btn:hover { color: var(--inv-text); text-decoration: none; transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
button:active, .btn:active { transform: none; box-shadow: none; }
button.ghost, .btn.ghost { background: transparent; color: var(--text); }
button.ghost:hover, .btn.ghost:hover { color: var(--text); }
button.danger, .btn.danger { background: transparent; color: var(--text); border-color: var(--line-soft); }
button.danger:hover, .btn.danger:hover { background: var(--err); color: var(--err-text); border-color: var(--err); transform: none; box-shadow: none; }
button.small, .btn.small { padding: 6px 11px; font-size: 10.5px; }
/* Запрос ушёл: кнопка не прыгает под курсором, чтобы её не хотелось жать снова. */
button[aria-busy="true"], button[aria-busy="true"]:hover { cursor: progress; opacity: .6; transform: none; box-shadow: none; }
/* ============================================================
Бейджи — плотность заливки вместо цвета
============================================================ */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: 10px; border: 1.5px solid var(--ink); color: var(--text); white-space: nowrap; line-height: 1.5; }
.badge .icon { width: 1em; height: 1em; }
.badge.easy { border-width: 1.5px; }
.badge.medium { border-width: 3px; padding: 1.5px 7.5px; }
.badge.hard, .badge.ok, .badge.info { background: var(--inv-bg); color: var(--inv-text); border-color: var(--inv-bg); }
.badge.warn { border-width: 3px; padding: 1.5px 7.5px; }
.badge.bad { background: var(--err); color: var(--err-text); border-color: var(--err); }
.badge.hot { background: var(--inv-bg); color: var(--inv-text); }
a.badge:hover { text-decoration: none; opacity: .85; }
.tag { display: inline-block; padding: 3px 9px; font-size: 12px; margin: 0 6px 6px 0; border: 1.5px solid var(--ink); }
/* ============================================================
Флеши
============================================================ */
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; border: var(--rule) solid var(--ink); }
.flash.ok { background: var(--inv-bg); color: var(--inv-text); }
.flash.err { background: var(--err); color: var(--err-text); border-color: var(--err); }
/* ============================================================
Прогресс
============================================================ */
.bar { height: 14px; border: 2px solid var(--ink); background: transparent; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ink); transition: width .3s; }
.progress-line { display: flex; justify-content: space-between; font-size: 10px; margin-top: 8px; color: var(--text-2); }
.progress-line b { color: var(--text); }
/* ============================================================
Матрица — вердикты плотностью
============================================================ */
.matrix td, .matrix th { text-align: center; padding: 6px 4px; }
.matrix td:first-child, .matrix th:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); min-width: 190px; }
.matrix th a { color: var(--text); }
.cell { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 2px solid var(--ink); font-weight: 800; }
.cell .icon { width: 14px; height: 14px; stroke-width: 3.2; }
/* Заливка означает зачёт, а не факт решения: чёрная клетка — балл в кармане.
Решённое, но не зачтённое остаётся контуром, поэтому строка читается
с одного взгляда — сколько чёрного, столько и зачтено. */
.cell.solved_in_time { color: var(--text); }
.cell.solved_late { color: var(--muted); border-color: var(--line-soft); }
.cell.solved_before { border-style: dashed; color: var(--muted); }
.cell.not_solved { border-color: var(--line-soft); border-style: dotted; }
/* Ниже статусов: у них та же специфичность, и выиграет последнее правило —
иначе галка внутри чёрной клетки красится в цвет текста и пропадает. */
.cell.counted { background: var(--inv-bg); color: var(--inv-text); border-color: var(--ink); }
/* Точка вместо текстового «•»: у шрифта он прыгает по базовой линии. */
.cell .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
/* Код отклонён: зачёт снят, и это должно быть видно без наведения. */
.cell.rejected { background: transparent; border-color: var(--err); color: var(--err); }
/* Кода нет: уголок, который видно, не наводя мышь. Ставим только там,
где из-за него потерян зачёт, иначе матрица рябит. */
.cell.no-code { position: relative; }
.cell.no-code::after { content: ""; position: absolute; right: -2px; bottom: -2px;
border: 5px solid transparent; border-right-color: var(--err); border-bottom-color: var(--err); }
.cell a, .cell .cell-go { color: inherit; text-decoration: none; }
/* Поле для кода: моноширинный текст и высота в экран — решение вставляют
целиком, а не дописывают по строчке. */
/* ---------- страница задачи ---------- */
.test-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.test-pair:last-child { border-bottom: none; }
.test-pair pre { margin: 4px 0 0; overflow-x: auto; }
/* Строка теста не переносится — порядок строк ввода важен, — а прокручивается. */
.test-pair > * { min-width: 0; }
.run-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
/* Развёрнутый редактор: колонка решения целиком — поверх страницы, редактор
во всю высоту. Слой выше рейки и нижней панели, но ниже подсказок
CodeMirror — иначе автодополнение пряталось бы под редактором. */
.editor-toolbar { display: flex; justify-content: flex-end; margin: -6px 0 8px; }
.editor-expand .when-expanded { display: none; }
.editor-expand span { display: inline-flex; align-items: center; gap: 6px; }
body.editor-expanded { overflow: hidden; }
body.editor-expanded .solution-pane {
position: fixed; inset: 0; z-index: 50; overflow-y: auto;
background: var(--bg); padding: 16px 24px 32px;
}
body.editor-expanded .editor-expand .when-collapsed { display: none; }
body.editor-expanded .editor-expand .when-expanded { display: inline-flex; }
body.editor-expanded .CodeMirror.CodeMirror,
body.editor-expanded .CodeMirror-scroll.CodeMirror-scroll { min-height: calc(100vh - 260px); max-height: none; }
@media (max-width: 640px) { body.editor-expanded .solution-pane { padding: 10px 12px 24px; } }
/* Прогон и сдача — разные действия с разной ценой, поэтому у каждой кнопки
своя подпись прямо под ней, а не общая строка где-то сбоку. */
.solution-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.solution-action button { width: 100%; justify-content: center; }
.solution-action p { margin: 8px 0 0; }
@media (max-width: 640px) { .solution-actions { grid-template-columns: 1fr; } }
/* Итог прогона — первым и крупно: «принято» или «не принято» видно сразу,
подробности по тестам ниже. */
.verdict { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; margin-bottom: 12px;
font-weight: 600; border: var(--rule) solid var(--ink); }
.verdict.ok { background: var(--inv-bg); color: var(--inv-text); }
.verdict.bad { background: var(--err); color: var(--err-text); border-color: var(--err); }
.run-detail { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 4px 0 12px;
border-bottom: 1px solid var(--line-soft); }
.run-detail pre { margin: 4px 0 0; max-height: 220px; overflow: auto; }
.run-detail-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .run-detail { grid-template-columns: 1fr; } }
/* Редактор: рамка как у остальных полей, высота в экран. */
/* Редактор кода.
Селекторы удвоены не для красоты: стили CodeMirror подключаются на странице
задачи после общего файла, и при равной силе побеждали бы они — редактор
оставался бы белым на любой теме портала, а код в нём был бы набран
палитрой, рассчитанной на белый лист.
Высота по содержимому: короткое решение не оставляет пустого поля
в пол-экрана, длинное не заставляет писать в щель. */
.CodeMirror.CodeMirror {
border: var(--rule) solid var(--ink);
height: auto; min-height: 320px; max-height: 70vh;
font-family: var(--mono); font-size: 14px; line-height: 1.5;
background: var(--panel); color: var(--text);
}
.CodeMirror-scroll.CodeMirror-scroll { min-height: 320px; max-height: 70vh; }
.CodeMirror-gutters.CodeMirror-gutters {
background: var(--panel-2); border-right: 1px solid var(--line-soft);
}
.CodeMirror-linenumber.CodeMirror-linenumber { color: var(--muted); }
.CodeMirror-cursor.CodeMirror-cursor { border-left: 2px solid var(--ink); }
.CodeMirror-activeline-background.CodeMirror-activeline-background { background: var(--panel-2); }
.CodeMirror-selected.CodeMirror-selected { background: var(--line-soft); }
.CodeMirror-line::selection, .CodeMirror-line > span::selection { background: var(--line-soft); }
/* Подсветка берёт цвета темы, а не свои. Собственная палитра CodeMirror
рассчитана на белый лист: на «Угле» или «Неоне» фиолетовые ключевые слова
и тёмно-красные строки почти не видны.
В селекторе стоит `.cm-s-default` — это не украшение: свои цвета CodeMirror
задаёт так же, через имя темы, и при равной силе побеждал бы он. */
.CodeMirror.cm-s-default .cm-keyword,
.CodeMirror.cm-s-default .cm-builtin { color: var(--code-key); font-weight: 700; }
.CodeMirror.cm-s-default .cm-string,
.CodeMirror.cm-s-default .cm-string-2 { color: var(--code-str); }
.CodeMirror.cm-s-default .cm-comment { color: var(--code-com); font-style: italic; }
.CodeMirror.cm-s-default .cm-number,
.CodeMirror.cm-s-default .cm-atom { color: var(--code-num); }
.CodeMirror.cm-s-default .cm-def,
.CodeMirror.cm-s-default .cm-variable,
.CodeMirror.cm-s-default .cm-variable-2,
.CodeMirror.cm-s-default .cm-variable-3,
.CodeMirror.cm-s-default .cm-property,
.CodeMirror.cm-s-default .cm-operator,
.CodeMirror.cm-s-default .cm-punctuation,
.CodeMirror.cm-s-default .cm-bracket { color: var(--text); }
.CodeMirror.cm-s-default .cm-meta { color: var(--code-com); }
.CodeMirror.cm-s-default .cm-error { color: var(--err); }
.CodeMirror.cm-s-default .CodeMirror-matchingbracket {
color: var(--ink); font-weight: 800; text-decoration: underline;
}
/* Список автодополнения. Своя рамка и цвета: у аддона они белые с тенью,
на тёмной теме это светлый прямоугольник посреди кода. */
.CodeMirror-hints.CodeMirror-hints {
background: var(--panel); color: var(--text);
border: 2px solid var(--ink); border-radius: 0; box-shadow: 4px 4px 0 var(--line-soft);
font-family: var(--mono); font-size: 13px; z-index: 60;
}
.CodeMirror-hints li.CodeMirror-hint { color: var(--text); padding: 3px 8px; }
.CodeMirror-hints li.CodeMirror-hint-active { background: var(--inv-bg); color: var(--inv-text); }
/* Строка подсказок под редактором и отметка о черновике. */
.editor-hints { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; }
.editor-hints kbd {
font-family: var(--mono); font-size: 11px; padding: 1px 5px;
border: 1px solid var(--line-soft); border-radius: 3px;
}
.code-input {
font-family: var(--mono); font-size: 13px; line-height: 1.5;
min-height: 320px; white-space: pre; overflow-wrap: normal; overflow-x: auto;
tab-size: 4;
}
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 10px; margin-top: 12px; }
.legend span.item { display: inline-flex; align-items: center; gap: 8px; }
/* ============================================================
Лента
============================================================ */
.feed { display: flex; flex-direction: column; }
.feed-day { font-size: 10px; padding: 18px 0 8px; display: flex; align-items: center; gap: 12px; }
.feed-day::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.feed-day:first-child { padding-top: 0; }
.feed-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.feed-item:last-child { border-bottom: none; }
.feed-body { min-width: 0; flex: 1; }
.feed-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.feed-head .who { font-weight: 600; color: var(--text); }
.feed-head .when { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.feed-what { display: flex; align-items: baseline; gap: 10px; flex-wrap: nowrap; margin-top: 3px; }
.feed-what .tick { flex: none; font-family: var(--display); font-size: 10px; font-weight: 800; padding: 2px 6px; background: var(--inv-bg); color: var(--inv-text); line-height: 1.5; }
.feed-what .tick .icon { display: none; }
.feed-what .tick::before { content: "AC"; }
.feed-what .title-wrap { min-width: 0; }
.feed-what .title { font-weight: 600; color: var(--text); }
.feed-meta { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
/* ============================================================
Лидерборд
============================================================ */
.rank { font-family: var(--display); font-weight: 800; font-size: 18px; white-space: nowrap; width: 1%; text-align: center; }
.rank .icon { display: none; }
/* --- табло ------------------------------------------------------------- */
/* Подиум: первое место крупнее и выворочено, соседние — обычными карточками. */
.podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 10px; align-items: end; margin-bottom: 14px; }
.podium-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border: 2px solid var(--ink); text-decoration: none; color: inherit; }
.podium-card.p1 { order: 2; padding-top: 22px; background: var(--inv-bg); color: var(--inv-text); }
.podium-card.p2 { order: 1; } .podium-card.p3 { order: 3; }
.podium-card.me { outline: 3px solid var(--ink); outline-offset: 2px; }
.podium-card.p1.me { outline-color: var(--inv-bg); }
.podium-place { font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .12em; }
.podium-name { font-weight: 700; font-size: 13px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.podium-score { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; }
.podium-score .of { font-size: 14px; opacity: .6; }
.stat .value .of { font-size: 15px; opacity: .55; }
.podium-card.p1 .avatar { background: var(--inv-text); color: var(--inv-bg); }
/* Движение за неделю. Цветом не выделяем — плотность и стрелка и так читаются. */
.move { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 700; margin-left: 2px; vertical-align: 2px; }
.move.down { opacity: .5; }
/* Клетка счёта: полоса доли и дробь рядом. */
.score-cell { display: flex; align-items: center; gap: 10px; }
.score-cell .bar { flex: 1; min-width: 60px; max-width: 220px; }
.score-cell .score-num { white-space: nowrap; }
.score-cell b { font-family: var(--display); font-size: 16px; }
@media (max-width: 640px) {
.podium { grid-template-columns: 1fr; }
.podium-card.p1, .podium-card.p2, .podium-card.p3 { order: 0; flex-direction: row; justify-content: flex-start; }
.score-cell .bar { display: none; }
}
tr.me { outline: var(--rule) solid var(--ink); outline-offset: -3px; }
.points { font-family: var(--display); font-weight: 800; font-size: 18px; }
/* ============================================================
Карта активности
============================================================ */
.heatmap-scroll { overflow-x: auto; padding-bottom: 4px; }
.heatmap-body { display: flex; gap: 8px; }
.heatmap { display: flex; gap: 3px; }
.hm-col { display: grid; grid-template-rows: repeat(7, 12px); gap: 3px; }
.heatmap i, .hm-legend i { width: 12px; height: 12px; display: block; border: 1px solid var(--line-soft); background: transparent; }
.heatmap i.l1, .hm-legend i.l1 { background: color-mix(in srgb, var(--ink) 25%, transparent); border-color: transparent; }
.heatmap i.l2, .hm-legend i.l2 { background: color-mix(in srgb, var(--ink) 50%, transparent); border-color: transparent; }
.heatmap i.l3, .hm-legend i.l3 { background: color-mix(in srgb, var(--ink) 75%, transparent); border-color: transparent; }
.heatmap i.l4, .hm-legend i.l4 { background: var(--ink); border-color: transparent; }
.heatmap i.future { border-color: transparent; }
.heatmap-weekdays { display: grid; grid-template-rows: repeat(7, 12px); gap: 3px; font-size: 8px; line-height: 12px; text-align: right; padding-right: 2px; letter-spacing: 0; }
.heatmap-months { display: flex; gap: 3px; height: 16px; font-size: 9px; margin-left: 26px; letter-spacing: .04em; }
.hm-slot { width: 12px; flex: none; white-space: nowrap; }
.hm-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; }
.hm-legend i { width: 11px; height: 11px; }
/* ---------- полосы ---------- */
.bar-row { display: grid; grid-template-columns: minmax(72px, 30%) 1fr auto; align-items: center; gap: 12px; padding: 5px 0; font-size: 13px; }
.bar-label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 12px; border: 2px solid var(--ink); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--ink); min-width: 2px; }
.bar-fill.easy { opacity: .35; } .bar-fill.medium { opacity: .65; } .bar-fill.hard { opacity: 1; }
.bar-value { min-width: 2.2em; text-align: right; font-weight: 600; font-size: 12px; }
/* ---------- профиль ---------- */
.rename-toggle {
background: transparent; border: none; box-shadow: none; padding: 2px 6px;
color: var(--muted); vertical-align: middle;
}
.rename-toggle:hover { background: transparent; color: var(--text); transform: none; box-shadow: none; }
.profile-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 24px; }
.profile-sync { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.assignment-line { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.assignment-line:last-child { border-bottom: none; padding-bottom: 0; }
.assignment-line .bar { margin-top: 8px; }
/* ============================================================
Объявления и отсчёт
============================================================ */
.announce { position: relative; border: var(--rule) solid var(--ink); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--panel); }
.announce.pinned { background: var(--inv-bg); color: var(--inv-text); }
.announce.pinned .muted, .announce.pinned .announce-body { color: inherit; opacity: .85; }
.announce.pinned .badge { border-color: var(--inv-text); color: var(--inv-text); background: transparent; }
.announce.pinned .btn { background: var(--inv-text); color: var(--inv-bg); border-color: var(--inv-text); }
.announce.pinned .btn:hover { box-shadow: 4px 4px 0 var(--inv-text); color: var(--inv-bg); }
.announce.pinned .countdown { background: var(--inv-text); color: var(--inv-bg); border-color: var(--inv-text); }
/* Отступ справа — под крестик: он лежит вне потока, и без запаса на него
наезжал таймер, когда заголовок короткий и помещается в одну строку. */
.announce-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; flex-wrap: wrap; padding-right: 28px; }
.announce-head h3 { margin: 0; font-size: 20px; }
/* Крестик «убрать с главной» держится за угол карточки, а не едет за
заголовком: у длинного названия голова переносится, и кнопка оказывалась
посреди карточки. Заметен при наведении — закрывают анонс один раз,
а читают каждый день. */
.announce-hide { position: absolute; top: 10px; right: 12px; }
.announce-hide .rail-btn { color: currentColor; opacity: .45; padding: 2px; }
.announce:hover .announce-hide .rail-btn { opacity: 1; }
.announce-hide .rail-btn:hover { color: var(--err); }
.announce-hide .icon { width: 16px; height: 16px; }
.announce .pin { display: none; }
.announce-meta { gap: 8px; margin: 0; }
.announce-body { margin: 0; color: var(--text-2); white-space: pre-line; }
.countdown { font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .01em; padding: 6px 12px; white-space: nowrap; background: var(--inv-bg); color: var(--inv-text); border: 2px solid var(--inv-bg); }
.countdown[data-state="live"] { background: var(--err); color: var(--err-text); border-color: var(--err); display: inline-flex; align-items: center; gap: 8px; }
.countdown[data-state="live"]::before { content: ""; width: 8px; height: 8px; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
.countdown[data-state="past"] { opacity: .55; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .countdown[data-state="live"]::before { animation: none; } }
/* ---------- шаги первого запуска ---------- */
.steps { display: grid; gap: 0; counter-reset: step; border: var(--rule) solid var(--ink); }
.step { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-bottom: var(--rule) solid var(--ink); color: inherit; }
.step:last-child { border-bottom: none; }
.step:hover { background: var(--inv-bg); color: var(--inv-text); text-decoration: none; }
.step:hover .step-hint { color: inherit; opacity: .8; }
.step .num { counter-increment: step; width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--inv-bg); color: var(--inv-text); font-family: var(--display); font-weight: 800; font-size: 14px; }
.step:hover .num { background: var(--inv-text); color: var(--inv-bg); }
.step .num::before { content: counter(step, decimal-leading-zero); }
.step.done .num::before { content: "✓"; }
.step.done .step-title { text-decoration: line-through; opacity: .6; }
.step-title { font-family: var(--display); font-weight: 800; font-size: 15px; }
.step-hint { font-size: 13px; color: var(--muted); }
details.formula { margin-top: 6px; }
details.formula summary { cursor: pointer; color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; font-size: 13px; list-style: none; font-weight: 600; }
details.formula summary::-webkit-details-marker { display: none; }
details.formula summary::before { content: "▸ "; }
details.formula[open] summary::before { content: "▾ "; }
details.formula ul { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); font-size: 13px; }
/* ---------- прочее ---------- */
.code-box { font-size: 16px; font-weight: 700; letter-spacing: .06em; background: var(--inv-bg); color: var(--inv-text); padding: 14px; word-break: break-all; user-select: all; text-align: center; }
.empty { color: var(--text-2); padding: 34px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; border: var(--rule) dashed var(--line-soft); }
.empty .icon { opacity: .5; }
.card > .empty { margin: -8px; }
.auth-shell { max-width: 520px; margin: 8vh auto 0; }
.auth-logo { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; background: var(--inv-bg); color: var(--inv-text); margin-bottom: 22px; }
.auth-logo.bare { width: auto; height: auto; background: none; }
.auth-logo.bare img { max-height: 96px; max-width: 340px; width: auto; height: auto; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; border: none; }
/* ============================================================
Адаптив
============================================================ */
@media (max-width: 900px) { .col-extra { display: none; } }
/* Невысокое окно ноутбука: пункты рейки плотнее, подпись под знаком прячется.
Прокрутка остаётся страховкой, но на обычных экранах до неё не доходит. */
@media (min-width: 761px) and (max-height: 820px) {
.rail .brand { padding: 10px 3px; }
.rail .brand-text { display: none; }
.nav a, .nav-more > summary { padding: 9px 4px 8px; gap: 4px; }
.rail-foot { padding: 10px 0 12px; }
}
@media (max-width: 760px) {
body.with-rail { padding-left: 0; padding-bottom: 70px; }
.rail { display: none; }
.mobile-bar {
display: flex; align-items: center; gap: 12px;
padding: 4px 10px 4px 14px; background: var(--inv-bg); color: var(--inv-text);
}
.mobile-bar .rail-btn { margin-left: auto; color: var(--inv-text); }
.mobile-brand {
display: flex; align-items: center; gap: 12px; flex: 0 1 auto; min-width: 0;
padding: 4px 0; color: var(--inv-text);
font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: 11px;
}
.mobile-brand .icon { width: 28px; height: 28px; }
.mobile-brand:hover { text-decoration: none; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--inv-bg); padding: 0 0 env(safe-area-inset-bottom); border-top: var(--rule) solid var(--inv-text); }
.tabbar a { flex: 1; min-width: 0; padding: 9px 2px 7px; border-bottom: none; border-right: 1px solid var(--line-soft); font-size: 8px; letter-spacing: .04em; }
.tabbar a:last-child { border-right: none; }
.tabbar .nav-more { flex: 1; min-width: 0; display: flex; }
.tabbar .nav-more > summary { flex: 1; min-width: 0; padding: 9px 2px 7px; border-bottom: none; font-size: 8px; letter-spacing: .04em; }
.tabbar .nav-more > summary span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar .nav-more-menu { left: 8px; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); }
.tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ticker { padding: 8px 14px; gap: 10px; }
.ticker-label { display: none; }
.ticker .countdown { font-size: 11px; padding: 4px 8px; }
main { padding: 20px 16px 40px; }
h1 { font-size: 30px; }
h2 { margin-top: 28px; }
.grid.two, .grid.three { grid-template-columns: 1fr; }
.grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { border-right: none; border-bottom: var(--rule) solid var(--ink); }
.stat:nth-child(odd) { border-right: var(--rule) solid var(--ink); }
.stat .value { font-size: 40px; }
.profile-sync { align-items: flex-start; width: 100%; }
}
/* Карточка материала: кнопка скачивания прижата вниз, карточки в ряду равны. */
.material { display: flex; flex-direction: column; }
.material .row:last-child { margin-top: auto; }
input[type=file] { padding: 7px 9px; font-family: var(--mono); font-size: 12px; }
input[type=file]::file-selector-button { font: inherit; margin-right: 10px; padding: 4px 10px; border: 2px solid var(--ink); background: var(--inv-bg); color: var(--inv-text); cursor: pointer; }
/* --- показ ноутбука ----------------------------------------------------- */
.notebook { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.nb-md { border-left: 3px solid var(--ink); padding: 2px 0 2px 14px; }
.nb-md > :first-child { margin-top: 0; }
.nb-md > :last-child { margin-bottom: 0; }
.nb-md h1, .nb-md h2, .nb-md h3 { font-family: var(--display); margin: 16px 0 8px; }
.nb-md h1 { font-size: 22px; } .nb-md h2 { font-size: 18px; } .nb-md h3 { font-size: 15px; }
.nb-md code { font-family: var(--mono); font-size: 12px; background: var(--inv-bg); color: var(--inv-text); padding: 1px 4px; }
.nb-md pre code { background: none; color: inherit; padding: 0; }
.nb-md table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13px; display: block; overflow-x: auto; }
.nb-md th, .nb-md td { border: 1px solid var(--line-soft); padding: 5px 9px; text-align: left; vertical-align: top; }
.nb-md th { font-family: var(--display); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; border-bottom: 2px solid var(--line); }
.nb-md blockquote { margin: 10px 0; padding-left: 12px; border-left: 2px solid var(--line); color: var(--text-2); }
.nb-code { border: 2px solid var(--ink); position: relative; }
.nb-lang { position: absolute; top: 0; right: 0; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; background: var(--inv-bg); color: var(--inv-text); padding: 2px 7px; }
.nb-code pre { margin: 0; padding: 12px 14px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; }
.nb-out { border-top: 2px dashed var(--line); color: var(--text-2); white-space: pre-wrap; }
.nb-img { display: block; max-width: 100%; border-top: 2px dashed var(--line); padding: 12px 14px; }
.nb-raw { white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; overflow-x: auto; margin: 0; }
/* Подсветка кода (классы Pygments). Цветов немного: смысл несёт начертание. */
.nb-code .k, .nb-code .kn, .nb-code .kc, .nb-code .kd, .nb-code .kr, .nb-code .ow { color: var(--code-key); font-weight: 700; }
.nb-code .nf, .nb-code .nc, .nb-code .nd { color: var(--code-key); font-weight: 600; }
.nb-code .s, .nb-code .s1, .nb-code .s2, .nb-code .sb, .nb-code .sd, .nb-code .se, .nb-code .sh, .nb-code .si, .nb-code .sx, .nb-code .sr, .nb-code .ss { color: var(--code-str); }
.nb-code .c, .nb-code .c1, .nb-code .cm, .nb-code .cs, .nb-code .cp { color: var(--code-com); font-style: italic; }
.nb-code .m, .nb-code .mi, .nb-code .mf, .nb-code .mh, .nb-code .mo, .nb-code .il { color: var(--code-num); }
.nb-code .nb, .nb-code .bp { color: var(--code-key); }
.nb-code .err { color: var(--err); }
/* Формулы. MathML браузер рисует сам — нам остаются шрифт, размер и прокрутка. */
math { font-family: "STIX Two Math", math; }
/* Выравнивание столбцов из LaTeX (cases, aligned) приходит атрибутом
columnalign, а Chrome его не читает и центрирует всё подряд. */
mtd[columnalign="left"] { text-align: left; }
mtd[columnalign="right"] { text-align: right; }
.nb-md math, .nb-out math { font-size: 1.05em; }
.math-block { display: block; overflow-x: auto; margin: 12px 0; text-align: center; }
.math-block math { font-size: 1.15em; }
.math-raw { font-family: var(--mono); font-size: 12px; color: var(--err); }
/* Отметка посещаемости: крупные цели для пальца — её ставят на паре с телефона. */
.attend-row {
display: flex; align-items: center; justify-content: space-between;
gap: 12px; flex-wrap: wrap;
padding: 10px 0; border-bottom: 1px solid var(--line);
}
.attend-row:last-of-type { border-bottom: 0; }
.attend-name { font-weight: 600; }
.attend-states { display: flex; gap: 6px; flex-wrap: wrap; }
.attend-states .chip { cursor: pointer; }
.attend-states .chip input { position: absolute; opacity: 0; pointer-events: none; }
.attend-states .chip span {
display: inline-block; padding: 8px 14px; border: 2px solid var(--ink);
border-radius: 999px; font-size: .85rem; background: var(--panel);
}
.attend-states .chip input:checked + span { background: var(--ink); color: var(--panel); }
.attend-states .chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
input.narrow { max-width: 90px; }
/* Шапка ведомости в два этажа: сверху занятие, под ним его оценки. */
.matrix th.block-head { border-bottom: 2px solid var(--ink); }
/* Ведомость: ширины колонок заданы, а не выведены из текста. Иначе занятие
с длинным названием раздвигает свои клетки, и таблица идёт волнами. */
.matrix.sheet { table-layout: fixed; }
.matrix.sheet .col-name { width: 190px; }
.matrix.sheet .col-total { width: 78px; }
.matrix.sheet .col-mark { width: 58px; }
.matrix.sheet th.block-head {
font-size: 11px; text-transform: none; letter-spacing: .02em; line-height: 1.25;
}
/* Узкий блок — это одна клетка в 46 пикселей, и «Неделя 3 · лекция» в ней
разворачивается на четыре строки. Оставляем две, остальное — в подсказке. */
.matrix.sheet th.block-head a {
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
overflow: hidden; overflow-wrap: anywhere;
}
.matrix.sheet td:first-child { white-space: normal; overflow-wrap: anywhere; }
/* Подпись колонки не должна растягивать саму колонку: клетка — это значок,
а не слово. Полное название остаётся подсказкой. */
.matrix th.col-head {
max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
/* Капс с разрядкой удлиняет слово на треть — в подписи над клеткой
шириной в значок это лишнее. */
text-transform: none; letter-spacing: 0; font-size: 11px;
}
/* Итоги стоят слева и не уезжают при прокрутке вправо — к ним возвращаются
чаще, чем к любой отдельной клетке. */
.matrix th.totals, .matrix td.totals {
position: sticky; background: var(--panel); white-space: nowrap;
border-right: 2px solid var(--line-soft);
}
.matrix th.totals:nth-child(2), .matrix td.totals:nth-child(2) { left: 190px; border-right: 0; }
.matrix th.totals:nth-child(3), .matrix td.totals:nth-child(3) { left: 268px; border-right: 0; }
.matrix th.totals:nth-child(4), .matrix td.totals:nth-child(4) { left: 346px; }
/* --- Оценки студента ---------------------------------------------------
Три числа вместо одного: баллы, зачёты и посещаемость складываются
по-разному в каждом курсе, поэтому портал показывает их рядом, а не
сводит в одну цифру. */
.stats .stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label {
font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
font-weight: 800; color: var(--muted);
}
.stat-value { font-size: 2.4rem; line-height: 1.05; font-weight: 800; }
.stat-unit { font-size: 1rem; font-weight: 700; color: var(--muted); margin-left: 4px; }
.stat .bar {
display: block; height: 10px; margin-top: 6px;
border: 2px solid var(--ink); background: var(--panel);
}
.stat .bar-fill { display: block; height: 100%; background: var(--ink); }
/* Точка на занятие: видно не только сколько пропусков, но и где. */
.dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.dot { width: 14px; height: 14px; border: 2px solid var(--ink); background: var(--panel); }
.dot.present { background: var(--ink); }
.dot.absent { background: var(--err); border-color: var(--err); }
.dot.excused { background: repeating-linear-gradient(
45deg, var(--ink), var(--ink) 2px, var(--panel) 2px, var(--panel) 5px); }
.dot.none { border-color: var(--line-soft); }
/* Раздел «ИИ»: адрес, ключ и настройки клиентов — выделяются целиком одним
щелчком, чтобы скопировать без скрипта. */
pre.snippet { margin: 8px 0 0; padding: 10px 12px; overflow-x: auto; font-family: var(--mono); font-size: 12px;
background: var(--inv-bg); color: var(--inv-text); user-select: all; -webkit-user-select: all; }
.token-list, .tool-list { list-style: none; margin: 0; padding: 0; }
.token-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0;
border-bottom: 1px solid var(--line-soft); }
.tool-list li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 6px 0;
border-bottom: 1px solid var(--line-soft); }
/* Подпись — своей строкой под названием: в одну строку с именем она
переносилась бы посередине и читалась как продолжение бейджа. */
.tool-list .tool-hint { flex-basis: 100%; }
/* Вкладки внутри раздела: «Задачи» собирают списки, свои задачи и каталог. */
.subnav { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 18px; border-bottom: var(--rule) solid var(--ink); }
.subnav a {
padding: 8px 14px; color: var(--text); font-family: var(--sans); font-weight: 600; font-size: 11px;
text-transform: uppercase; letter-spacing: .08em;
}
.subnav a:hover { text-decoration: none; background: var(--ink); color: var(--bg); }
.subnav a.active { background: var(--ink); color: var(--bg); }
/* Выбор языка над редактором: подпись и список в одну строку. */
.language-pick { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.language-pick label { margin: 0; }
.language-pick select { width: auto; min-width: 200px; }
/* Языков у judge0 десятки — список выше обычного, с прокруткой. */
.check-list.language-list { max-height: 280px; margin-bottom: 8px; }
/* Кнопка «Скопировать» в углу плашки. Плашка тёмная — кнопка светлая. */
.copyable { position: relative; }
.copy-btn {
position: absolute; top: 8px; right: 8px; z-index: 1;
padding: 3px 8px; font-size: 10px; letter-spacing: .06em;
background: var(--inv-text); color: var(--inv-bg); border: 0; box-shadow: none;
}
.copy-btn:hover { transform: none; box-shadow: none; color: var(--inv-bg); opacity: .9; }
.copy-btn.copied { background: var(--accent); color: var(--inv-text); }
/* Место под кнопку, чтобы она не легла поверх текста. */
.copyable pre.snippet { padding-right: 110px; }
.copyable .code-box { padding-right: 110px; padding-left: 110px; }
@media (max-width: 760px) {
.copyable .code-box { padding-left: 14px; padding-right: 104px; text-align: left; }
.copyable pre.snippet { padding-right: 96px; }
}
/* «Когда решали» на странице задания. Цвета — от темы: первые решения —
цвет текста, остальные посылки — он же, разбавленный фоном карточки. */
.timeline-card { --solves: var(--ink); --others: color-mix(in srgb, var(--ink) 35%, var(--panel)); }
.timeline { display: block; width: 100%; height: auto; margin: 6px 0 0; }
.timeline .grid { stroke: var(--line-soft); stroke-width: 1; }
.timeline .tick { font-size: 11px; fill: var(--muted); font-family: var(--sans); font-variant-numeric: tabular-nums; }
.timeline .solves { fill: var(--solves); }
.timeline .others { fill: var(--others); }
.timeline .hit { fill: transparent; }
.timeline .bar:hover .hit { fill: color-mix(in srgb, var(--ink) 8%, transparent); }
.timeline .deadline { stroke: var(--text); stroke-width: 2; }
.timeline .deadline-label { font-size: 11px; font-weight: 700; fill: var(--text); font-family: var(--sans); }
.timeline .after-deadline { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.timeline-lead { margin: 0 0 4px; }
.timeline-lead strong { font-size: 22px; }
.legend .swatch { display: inline-block; width: 12px; height: 12px; }
.legend .swatch.solves { background: var(--solves); }
.legend .swatch.others { background: var(--others); }
.legend .swatch.after { background: color-mix(in srgb, var(--ink) 6%, transparent); border: 1px solid var(--line-soft); }