/* CodeArena · Кибер — на токенах дизайна NOCTA «Фаза»: ночь в три слоя, серебро — основной акцент,
   мята — только «решено / жив», фиолетовый — туманность. Spectral для заголовков, Golos Text для текста. */
@import url("https://fonts.googleapis.com/css2?family=Spectral: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");

:root {
  --night: #090E22; --night-2: #0D1330; --surface: #121A3D; --raised: #1A2452;
  --line: rgba(190, 200, 255, .12); --line-2: rgba(190, 200, 255, .22);
  --ink: #EDEFFB; --ink-2: #A9B0D2; --ink-3: #737A9E;
  --silver: #DDE2FF; --silver-ink: #0A0F24;
  --mint: #43E39B; --violet: #8B6BFF; --earth: #151D45; --rose: #FF7A93; --amber: #FFC66B;

  --serif: "Spectral", Georgia, serif;
  --sans: "Golos Text", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --t-xs: 12px; --t-s: 13px; --t-m: 15px; --t-l: 18px; --t-xl: 23px;
  --t-2xl: 29px; --t-3xl: 36px; --t-4xl: 45px; --t-5xl: 56px; --t-6xl: 70px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --r: 14px; --r-in: 10px;
  --fast: 120ms; --dur: 260ms; --slow: 520ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* цвета уровней сложности */
  --d-easy: var(--mint); --d-medium: var(--silver); --d-hard: var(--violet); --d-insane: var(--rose);
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--night); }
body { min-height: 100vh; font: var(--t-m)/1.55 var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, var(--night-2), var(--night) 600px); position: relative; overflow-x: hidden;
  display: flex; flex-direction: column; }
body > * { width: 100%; }
body > main { flex: 1 0 auto; }  /* подвал прижат к низу даже на коротких страницах */
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--silver); outline-offset: 3px; border-radius: var(--r-in); }
.num { font-variant-numeric: lining-nums tabular-nums; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: .9em; background: rgba(190, 200, 255, .08); padding: 1px 6px; border-radius: 6px; }

/* ---------- Небо ---------- */
.sky { position: fixed; inset: 0; height: 100vh; pointer-events: none; overflow: hidden; z-index: 0; }
.sky::before { content: ""; position: absolute; left: 50%; top: -40%; width: 140%; aspect-ratio: 1.6; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(139, 107, 255, .20), rgba(139, 107, 255, .06) 55%, transparent); }
.sky i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: var(--o, .35); }
.sky i.tw { animation: twinkle var(--d, 4s) ease-in-out var(--dl, 0s) infinite; }
@keyframes twinkle { 0%, 100% { opacity: .12; } 50% { opacity: .85; } }

.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 var(--s5); }

/* ---------- Навигация ---------- */
.nav { display: flex; align-items: center; gap: var(--s6); height: 84px; }
.brand { display: flex; align-items: center; gap: 10px; font: 500 var(--t-xl)/1 var(--serif); letter-spacing: .04em; }
.brand svg { width: 30px; height: 30px; }
.brand small { font: 500 var(--t-xs)/1 var(--sans); color: var(--mint); letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid rgba(67, 227, 155, .35); padding: 4px 7px; border-radius: 999px; }
.nav-links { display: flex; gap: var(--s5); color: var(--ink-2); font-weight: 500; }
.nav-links a { position: relative; transition: color var(--fast) var(--ease-out); }
.nav-links a:hover, .nav-links a.on { color: var(--ink); }
.nav-links a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; border-radius: 2px;
  background: var(--silver); box-shadow: 0 0 10px rgba(221, 226, 255, .6); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: var(--s3); }
.me { display: flex; align-items: center; gap: var(--s2); color: var(--ink-2); }
.me b { font: 500 var(--t-l)/1 var(--serif); color: var(--ink); }

/* ---------- Кнопки ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 var(--s5);
  border-radius: var(--r); font: 600 var(--t-m) var(--sans); background: var(--silver); color: var(--silver-ink); white-space: nowrap;
  transition: transform var(--fast) var(--ease-out), background-color var(--fast) var(--ease-out); }
.btn:hover { background: #fff; }
.btn:active { transform: scale(.98); }
.btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); pointer-events: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost::after { display: none; }
.btn.ghost:hover { background: rgba(190, 200, 255, .06); }
.btn.sm { height: 38px; padding: 0 var(--s4); font-size: var(--t-s); border-radius: var(--r-in); }
.btn.lg { height: 58px; padding: 0 var(--s6); }

/* ---------- Типографика ---------- */
h1 { font: 500 var(--t-6xl)/.98 var(--serif); letter-spacing: -.03em; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--ink-2); }
h2 { font: 500 var(--t-4xl)/1.05 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
h3 { font: 500 var(--t-xl)/1.2 var(--serif); }
.lead { font-size: var(--t-l); color: var(--ink-2); max-width: 34em; }
.muted { color: var(--ink-2); } .dim { color: var(--ink-3); }
.eyebrow { font: 500 var(--t-s)/1 var(--sans); color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.page-head { padding: var(--s7) 0 var(--s6); display: flex; gap: var(--s5); align-items: end; flex-wrap: wrap; }
.page-head h1 { font-size: var(--t-5xl); }
.page-head .lead { margin-left: auto; max-width: 28em; font-size: var(--t-m); }
section { padding: var(--s8) 0; }
.sec-head { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--s7); align-items: end; margin-bottom: var(--s6); }
.sec-head p { color: var(--ink-2); max-width: 32em; }

/* ---------- Герой ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s7); align-items: center; padding: var(--s7) 0 var(--s8); }
.hero h1 .ln { display: block; animation: rise var(--slow) var(--ease-out) backwards; }
.hero h1 .ln:nth-child(2) { animation-delay: 90ms; font-style: italic; font-weight: 400; color: var(--ink-2); }
.hero .lead { margin-top: var(--s5); }
.hero .cta { display: flex; gap: var(--s3); margin-top: var(--s6); flex-wrap: wrap; }
.hero-stats { display: flex; gap: var(--s6); margin-top: var(--s6); }
.hero-stats b { display: block; font: 500 var(--t-3xl)/1 var(--serif); }
.hero-stats span { color: var(--ink-3); font-size: var(--t-s); }

.phase { position: relative; width: min(420px, 100%); aspect-ratio: 1; margin: 0 auto; }
.phase > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.phase .bloom { position: absolute; inset: 22%; border-radius: 50%;
  background: radial-gradient(circle, rgba(67, 227, 155, .28), rgba(139, 107, 255, .12) 45%, transparent 70%);
  animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.96); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
.tick { stroke: rgba(190, 200, 255, .20); stroke-width: 1.4; stroke-linecap: round; }
.tick.on { stroke: var(--silver); stroke-width: 2.4; }
.tick.now { stroke: var(--mint); }
.phase .term { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); font: 500 var(--t-s) var(--mono); color: var(--mint);
  background: rgba(9, 14, 34, .8); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.term .cur { display: inline-block; width: 7px; height: 13px; background: var(--mint); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.rise { animation: rise var(--slow) var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Уровни сложности (сетка как «тарифы» на сайте) ---------- */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.level { position: relative; padding: var(--s5); border-left: 1px solid var(--line); transition: background-color var(--dur) var(--ease-out); }
.level:first-child { border-left: 0; }
.level:hover { background: rgba(190, 200, 255, .03); }
.level::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--c); opacity: .9; }
.level .pts { display: block; font: 500 var(--t-4xl)/1 var(--serif); letter-spacing: -.02em; color: var(--c); margin-top: var(--s3); }
.level .pts small { font: 400 var(--t-m) var(--sans); color: var(--ink-3); margin-left: 4px; }
.level h3 { margin-top: var(--s2); }
.level p { color: var(--ink-2); font-size: var(--t-s); margin-top: var(--s2); min-height: 3em; }
.level .cnt { margin-top: var(--s4); color: var(--ink-3); font-size: var(--t-s); }
.level a.more { display: inline-block; margin-top: var(--s4); color: var(--ink); font-weight: 500; font-size: var(--t-s); }
.level a.more:hover { color: var(--c); }
.lv-easy { --c: var(--d-easy); } .lv-medium { --c: var(--d-medium); } .lv-hard { --c: var(--d-hard); } .lv-insane { --c: var(--d-insane); }

.feats { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.feats li { display: grid; grid-template-columns: 28px 1fr; gap: var(--s3); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.feats .ic { color: var(--mint); font-size: var(--t-l); line-height: 1.3; }
.feats b { display: block; font-weight: 600; }
.feats span { color: var(--ink-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); }

.rules { counter-reset: r; list-style: none; padding: 0; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 40px 1fr; padding: var(--s3) 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.rules li::before { content: counter(r, decimal-leading-zero); font: 500 var(--t-s) var(--mono); color: var(--ink-3); padding-top: 3px; }
.rules b { color: var(--ink); font-weight: 600; }

/* ---------- Чипы и бейджи ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: var(--t-xs); font-weight: 500;
  color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; }
.chip.diff { color: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); }
.chip.diff::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.chip.ok { color: var(--mint); box-shadow: inset 0 0 0 1px rgba(67, 227, 155, .4); }
.chip.bad { color: var(--rose); box-shadow: inset 0 0 0 1px rgba(255, 122, 147, .4); }
.chip.wait { color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255, 198, 107, .4); }
.chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(67, 227, 155, .15); }

/* ---------- Фильтры ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s5); padding: var(--s4) 0 var(--s5); border-top: 1px solid var(--line); }
.fgroup { display: flex; flex-direction: column; gap: var(--s2); }
.fgroup .eyebrow { font-size: var(--t-xs); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); }
.seg a { padding: 6px 12px; border-radius: var(--r-in); color: var(--ink-3); font-weight: 500; font-size: var(--t-s); transition: color var(--fast), background-color var(--fast); }
.seg a:hover { color: var(--ink); }
.seg a.on { color: var(--ink); background: var(--raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }

/* ---------- Список задач ---------- */
.tasks { border-top: 1px solid var(--line); }
.trow { display: grid; grid-template-columns: 44px 1fr 150px 130px 100px 80px; gap: var(--s4); align-items: center; padding: var(--s4) var(--s2);
  border-bottom: 1px solid var(--line); transition: background-color var(--dur) var(--ease-out); }
.trow:hover { background: rgba(190, 200, 255, .035); }
.trow .t { font: 500 var(--t-l)/1.2 var(--serif); }
.trow .t small { display: block; font: 400 var(--t-s) var(--sans); color: var(--ink-3); margin-top: 3px; }
.trow .pts { font: 500 var(--t-xl) var(--serif); text-align: right; }
.trow .who { color: var(--ink-3); font-size: var(--t-s); text-align: right; }
.done-dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; }
.done-dot.on { background: var(--mint); box-shadow: 0 0 0 4px rgba(67, 227, 155, .15); }
.done-dot.on::after { content: ""; width: 8px; height: 4px; border: 2px solid var(--silver-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.lvl { font: 500 var(--t-s) var(--mono); color: var(--ink-3); width: 40px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line); }
.trow.is-done .lvl { color: var(--silver-ink); background: var(--mint); box-shadow: 0 0 0 4px rgba(67, 227, 155, .15); }
.trow.is-done .t { color: var(--ink-2); }
.tgroup { margin-top: var(--s6); }
.tgroup-h { font: 500 var(--t-2xl)/1.1 var(--serif); color: var(--c); display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; padding-bottom: var(--s3); }
.tgroup-h small { font: 400 var(--t-s) var(--sans); color: var(--ink-3); }
.progress-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin-bottom: var(--s5); }
.pcard { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); border-radius: var(--r); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--fast), transform var(--dur) var(--ease-out); }
.pcard:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2); }
.pcard.on { box-shadow: inset 0 0 0 1px var(--c); }
.pnum { font: 500 var(--t-3xl)/1 var(--serif); color: var(--c); }
.pnum small { font-size: var(--t-l); color: var(--ink-3); }
.pbar { height: 6px; border-radius: 99px; background: rgba(190, 200, 255, .08); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--c); border-radius: inherit; transition: width var(--slow) var(--ease-out); }
.search { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s4); flex-wrap: wrap; }
.search input { flex: 1; min-width: 200px; height: 42px; padding: 0 var(--s4); border-radius: var(--r-in); border: 0; font: inherit; color: var(--ink);
  background: var(--night-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.search input:focus { outline: 2px solid var(--silver); outline-offset: 1px; }
.toggle { height: 42px; display: inline-flex; align-items: center; padding: 0 var(--s4); border-radius: var(--r-in); color: var(--ink-3); font-size: var(--t-s); font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line); }
.toggle:hover { color: var(--ink); }
.toggle.on { color: var(--silver-ink); background: var(--mint); box-shadow: none; }
.empty { padding: var(--s7) 0; text-align: center; color: var(--ink-3); }

/* ---------- Страница задачи ---------- */
.task-grid { display: grid; grid-template-columns: 1fr 380px; gap: var(--s6); padding-bottom: var(--s8); }
.task-meta { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s4); }
.task-title { font-size: var(--t-5xl); }
.prose { color: var(--ink-2); margin-top: var(--s5); max-width: 46em; }
.prose p + p, .prose ul { margin-top: var(--s3); }
.prose ul { padding-left: 1.2em; }
.prose b { color: var(--ink); }
.panel { background: rgba(18, 26, 61, .55); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); }
.panel + .panel { margin-top: var(--s4); }
.panel h3 { font-size: var(--t-l); margin-bottom: var(--s3); }
.attach { margin-top: var(--s5); }
.attach .bar { display: flex; align-items: center; justify-content: space-between; padding: var(--s2) var(--s4); border: 1px solid var(--line);
  border-bottom: 0; border-radius: var(--r) var(--r) 0 0; background: var(--earth); color: var(--ink-3); font-size: var(--t-s); }
pre.data { margin: 0; padding: var(--s4); background: #070B1C; border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r);
  font-size: 13px; line-height: 1.6; color: var(--silver); overflow: auto; max-height: 380px; white-space: pre-wrap; word-break: break-all; }
details.hint { border-top: 1px solid var(--line); padding: var(--s3) 0; }
details.hint summary { cursor: pointer; color: var(--ink-2); font-weight: 500; list-style: none; display: flex; justify-content: space-between; }
details.hint summary::after { content: "+"; color: var(--ink-3); }
details.hint[open] summary::after { content: "–"; }
details.hint p { color: var(--ink-2); margin-top: var(--s2); font-size: var(--t-s); }
.kv { display: flex; justify-content: space-between; padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: var(--t-s); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-3); }

/* формы */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s4); }
.field label { font-size: var(--t-s); color: var(--ink-3); }
input[type=text], input[type=password], input[type=email], select { height: 48px; padding: 0 var(--s4); border-radius: var(--r-in); border: 1px solid var(--line-2);
  background: rgba(7, 11, 28, .7); color: var(--ink); font: var(--t-m) var(--sans); transition: border-color var(--fast); width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--silver); }
.flag-form { display: flex; gap: var(--s2); }
.flag-form input { font-family: var(--mono); }

/* редактор */
.editor { margin-top: var(--s6); }
.ed-bar { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); background: var(--earth);
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; }
.ed-bar .dots { display: flex; gap: 6px; } .ed-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.ed-bar select { height: 34px; width: auto; margin-left: auto; font-size: var(--t-s); }
.ed-body { display: grid; grid-template-columns: 48px 1fr; background: #070B1C; border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); overflow: hidden; }
.ed-gutter { padding: var(--s4) 0; text-align: right; color: var(--ink-3); font: 13px/1.6 var(--mono); user-select: none; background: rgba(21, 29, 69, .4); }
.ed-gutter div { padding-right: 10px; }
textarea.code { min-height: 340px; padding: var(--s4); border: 0; resize: vertical; background: transparent; color: var(--silver);
  font: 13px/1.6 var(--mono); tab-size: 4; white-space: pre; overflow: auto; }
.ed-foot { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s3); }
.ed-foot .dim { font-size: var(--t-s); }
.ed-foot .btn { margin-left: auto; }
.example { margin-top: var(--s3); font-size: var(--t-s); }
.example pre { margin-top: 4px; padding: var(--s3); background: #070B1C; border: 1px solid var(--line); border-radius: var(--r-in);
  color: var(--silver); font-size: 12px; white-space: pre-wrap; word-break: break-all; max-height: 160px; overflow: auto; }

/* таблицы */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font: 500 var(--t-xs) var(--sans); color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase;
  padding: var(--s3) var(--s2); border-bottom: 1px solid var(--line-2); }
.tbl td { padding: var(--s3) var(--s2); border-bottom: 1px solid var(--line); }
.tbl tr:hover td { background: rgba(190, 200, 255, .03); }
.tbl .r { text-align: right; }
.tbl .rank { font: 500 var(--t-l) var(--serif); color: var(--ink-3); width: 56px; }
.tbl tr.top1 .rank { color: var(--silver); } .tbl tr.top2 .rank, .tbl tr.top3 .rank { color: var(--ink-2); }
.tbl .score { font: 500 var(--t-xl) var(--serif); }
.tbl a:hover { color: var(--silver); }

.contests { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.ccard { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); border-radius: var(--r); border: 1px solid var(--line);
  background: rgba(18, 26, 61, .45); transition: border-color var(--dur), transform var(--dur) var(--ease-out); }
.ccard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.ccard p { color: var(--ink-2); font-size: var(--t-s); flex: 1; }
.ccard .when { color: var(--ink-3); font-size: var(--t-xs); }

/* награды */
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.ach { display: grid; grid-template-columns: 44px 1fr; gap: var(--s3); align-items: center; padding: var(--s4); border-radius: var(--r);
  border: 1px solid var(--line); opacity: .45; filter: grayscale(1); }
.ach.on { opacity: 1; filter: none; background: linear-gradient(180deg, rgba(221, 226, 255, .06), transparent); border-color: var(--line-2); }
.ach .ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 500 var(--t-l) var(--serif);
  background: var(--earth); color: var(--silver); box-shadow: inset 0 0 0 1px var(--line-2); }
.ach.on .ico { color: var(--mint); box-shadow: inset 0 0 0 1px rgba(67, 227, 155, .5), 0 0 18px rgba(67, 227, 155, .15); }
.ach b { display: block; font-weight: 600; font-size: var(--t-s); }
.ach span { color: var(--ink-3); font-size: var(--t-xs); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: var(--s7); }
.stats > div { padding: var(--s5); border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; padding-left: 0; }
.stats b { display: block; font: 500 var(--t-4xl)/1 var(--serif); }
.stats span { color: var(--ink-3); font-size: var(--t-s); }
.bars { display: grid; gap: var(--s3); }
.bar-row { display: grid; grid-template-columns: 90px 1fr 60px; gap: var(--s3); align-items: center; font-size: var(--t-s); color: var(--ink-2); }
.bar-row .track { height: 6px; border-radius: 6px; background: var(--earth); overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--c); border-radius: 6px; }

/* флеш-сообщения */
.flashes { position: fixed; right: var(--s5); top: var(--s5); z-index: 50; display: flex; flex-direction: column; gap: var(--s2); max-width: 360px; }
.flash { padding: var(--s3) var(--s4); border-radius: var(--r-in); background: var(--raised); border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5); animation: rise var(--slow) var(--ease-out); font-size: var(--t-s); }
.flash.ok { border-color: rgba(67, 227, 155, .5); color: var(--mint); }
.flash.bad { border-color: rgba(255, 122, 147, .5); color: var(--rose); }
.flash.ach { border-color: rgba(139, 107, 255, .6); }
.flash.ach::before { content: "★ "; color: var(--violet); }

.auth { max-width: 420px; margin: var(--s8) auto; }
.auth h1 { font-size: var(--t-5xl); margin-bottom: var(--s5); }
.auth .btn { width: 100%; margin-top: var(--s2); }
.auth p { margin-top: var(--s4); color: var(--ink-3); font-size: var(--t-s); text-align: center; }
.auth p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.verdict { display: flex; align-items: center; gap: var(--s4); padding: var(--s5); }
.verdict b { font: 500 var(--t-3xl)/1 var(--serif); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--amber); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
pre.out { margin-top: var(--s3); padding: var(--s4); background: #070B1C; border: 1px solid var(--line); border-radius: var(--r-in);
  color: var(--ink-2); font-size: 13px; white-space: pre-wrap; }

footer { border-top: 1px solid var(--line); padding: var(--s6) 0 var(--s7); color: var(--ink-3); font-size: var(--t-s); margin-top: var(--s7); }
footer { width: 100%; background: rgba(9, 14, 34, .55); backdrop-filter: blur(6px); }
.foot-top { display: flex; gap: var(--s5); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.foot-links { display: flex; gap: var(--s5); flex-wrap: wrap; }
.foot-links a { color: var(--ink-2); }
.foot-bottom { display: flex; gap: var(--s4); justify-content: space-between; flex-wrap: wrap;
  margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--t-xs); }
footer .brand { font-size: var(--t-l); color: var(--ink); }
footer .brand svg { width: 22px; height: 22px; }
footer a:hover { color: var(--ink); }

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
  .hero, .two, .sec-head, .task-grid { grid-template-columns: 1fr; }
  .levels, .stats { grid-template-columns: 1fr 1fr; }
  .level:nth-child(3) { border-left: 0; }
  .contests { grid-template-columns: 1fr; }
  .trow { grid-template-columns: 44px 1fr 110px 70px; }
  .progress-grid { grid-template-columns: 1fr 1fr; }
  .trow .cat, .trow .who { display: none; }
  h1 { font-size: var(--t-5xl); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 var(--s4); }
  .nav { height: auto; padding: var(--s4) 0; flex-wrap: wrap; gap: var(--s3); }
  .nav-links { order: 3; width: 100%; overflow-x: auto; gap: var(--s4); padding-bottom: var(--s2); }
  .brand small { display: none; }
  h1, .page-head h1, .task-title { font-size: var(--t-4xl); }
  h2 { font-size: var(--t-3xl); }
  .levels, .stats { grid-template-columns: 1fr; }
  .level { border-left: 0; border-top: 1px solid var(--line); }
  .stats > div { border-left: 0; padding-left: 0; }
  .trow { grid-template-columns: 40px 1fr 64px; }
  .trow .diffc { display: none; }
  .flag-form { flex-direction: column; }
  .hero-stats { gap: var(--s5); }
  .tbl .hide-m { display: none; }
  .flashes { left: var(--s4); right: var(--s4); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Обучение ---------- */
.guide-link { display: inline-block; margin-top: var(--s4); color: var(--mint); font-weight: 500; font-size: var(--t-s); }
.guide-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.guide { margin-top: var(--s7); padding: var(--s6); border-radius: var(--r); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(139, 107, 255, .07), rgba(18, 26, 61, .35) 40%); scroll-margin-top: 24px; }
.guide-head h2 { font-size: var(--t-3xl); margin-top: var(--s2); }
.guide-head .lead { margin-top: var(--s2); font-size: var(--t-m); }
.sub-h { font: 500 var(--t-l)/1.2 var(--serif); margin: var(--s6) 0 var(--s3); }
.tool-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.tool-list li { padding: 6px 12px; border-radius: var(--r-in); background: rgba(7, 11, 28, .6); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: var(--t-s); }
.steps { list-style: none; padding: 0; display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: var(--s3); align-items: start; padding: var(--s3) var(--s4);
  border-radius: var(--r-in); background: rgba(7, 11, 28, .55); border: 1px solid var(--line); color: var(--ink-2); animation: rise var(--slow) var(--ease-out); }
.steps li[hidden] { display: none; }
.steps .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 500 var(--t-s) var(--sans);
  color: var(--silver-ink); background: var(--silver); }
.defense { margin-top: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--r-in); border-left: 2px solid var(--mint);
  background: rgba(67, 227, 155, .06); }
.defense b { color: var(--mint); font-size: var(--t-s); }
.defense p { color: var(--ink-2); margin-top: 4px; }
.toc { display: flex; flex-wrap: wrap; gap: var(--s2); padding-bottom: var(--s5); border-bottom: 1px solid var(--line); }
.toc a { padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font-size: var(--t-s); font-weight: 500;
  transition: color var(--fast), background-color var(--fast); }
.toc a:hover { color: var(--ink); background: rgba(190, 200, 255, .06); }
.lesson { scroll-margin-top: 16px; border-bottom: 1px solid var(--line); padding: var(--s7) 0; }
.lesson-head { margin-bottom: var(--s5); max-width: 760px; }
.lesson-head h2 { margin-top: var(--s2); }
.lesson-head .lead { margin-top: var(--s3); font-size: var(--t-m); }
.concepts dt { font-weight: 600; margin-top: var(--s3); }
.concepts dd { margin: 2px 0 0; color: var(--ink-2); font-size: var(--t-s); }
.concepts dd p { margin: 0; }
@media (max-width: 640px) { .guide { padding: var(--s4); } }

/* ---------- Комнаты и пути ---------- */
.room-progress { display: flex; align-items: center; gap: var(--s3); margin: var(--s4) 0 var(--s5); }
.room-progress .pbar { flex: 1; max-width: 360px; }
.rtask { border: 1px solid var(--line); border-radius: var(--r); background: rgba(18, 26, 61, .45); margin-top: var(--s3); }
.rtask summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); }
.rtask summary::-webkit-details-marker { display: none; }
.rtask .rn { font: 500 var(--t-xs) var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); min-width: 76px; }
.rtask .rt { font: 500 var(--t-l)/1.2 var(--serif); flex: 1; }
.rcheck { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; }
.rtask.is-done { border-color: rgba(67, 227, 155, .35); }
.rtask.is-done .rcheck { background: var(--mint); box-shadow: 0 0 0 4px rgba(67, 227, 155, .15); }
.rtask.is-done .rcheck::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--silver-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.rtask[open] summary { border-bottom: 1px solid var(--line); }
.rbody { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); align-items: flex-start; }
.rbody > * { max-width: 100%; }
.rbody .attach, .rbody .editor, .rbody .question { width: 100%; }
.question { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); border-radius: var(--r-in); background: var(--night-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.question label { font-weight: 500; }
.path-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); padding-bottom: var(--s8); }
.path-card { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5); border-radius: var(--r); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); transition: transform var(--dur) var(--ease-out), box-shadow var(--fast); }
.path-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2); }
.path-card h2 { font-size: var(--t-2xl); }
.path-card .pbar i, .room-progress .pbar i { background: var(--mint); }
.path-head { display: flex; flex-direction: column; gap: var(--s3); align-items: flex-start; padding-bottom: var(--s6); }
.path-head .room-progress { width: 100%; margin: 0; }
.timeline { list-style: none; padding: 0 0 var(--s8); position: relative; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 0; bottom: var(--s8); width: 2px; background: var(--line); }
.timeline a { display: grid; grid-template-columns: 40px 1fr 130px 70px; gap: var(--s4); align-items: center; padding: var(--s3) 0; }
.timeline .t { font: 500 var(--t-l)/1.2 var(--serif); }
.timeline .t small { display: block; font: 400 var(--t-s) var(--sans); color: var(--ink-3); margin-top: 3px; }
.timeline .pts { text-align: right; font: 500 var(--t-l) var(--serif); }
.tl-n { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--night);
  box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink-3); font-size: var(--t-s); }
.timeline .is-done .tl-n { background: var(--mint); color: var(--silver-ink); box-shadow: none; }
.timeline .is-next .tl-n { box-shadow: inset 0 0 0 2px var(--silver); color: var(--ink); }
.timeline a:hover .t { color: var(--silver); }
@media (max-width: 640px) {
  .timeline a { grid-template-columns: 40px 1fr 56px; }
  .timeline a > span:nth-child(3) { display: none; }
  .rtask summary { padding: var(--s3) var(--s4); gap: var(--s3); }
  .rtask .rn { min-width: 0; }
  .rbody { padding: var(--s4); }
}

/* ---------- Подсказки, разборы, пагинация, бейджи путей ---------- */
.hints { margin-top: var(--s5); }
.hint-row { margin-top: var(--s3); }
.hint-text { padding: var(--s3) var(--s4); border-radius: var(--r-in); background: rgba(255, 198, 107, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 198, 107, .25); }
.writeups { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.wu-form { display: flex; flex-direction: column; gap: var(--s3); align-items: flex-start; margin-bottom: var(--s5); }
.wu-form textarea { width: 100%; min-height: 100px; padding: var(--s4); border-radius: var(--r-in); border: 0; resize: vertical;
  font: var(--t-m)/1.5 var(--sans); color: var(--ink); background: var(--night-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.wu { padding: var(--s4) 0; border-top: 1px solid var(--line); }
.wu-head { display: flex; gap: var(--s3); align-items: baseline; margin-bottom: var(--s2); }
.wu-head a { font-weight: 600; color: var(--silver); }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s5); padding: var(--s6) 0 var(--s8); }
.pager a { color: var(--silver); font-weight: 500; }
.pager a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pager .off { color: var(--ink-3); }
.path-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s3); }
.pbadge { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-in);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pbadge:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.pbadge .pb-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--night); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink-3); font-size: var(--t-s); font-weight: 600; }
.pbadge.done .pb-ic { background: var(--mint); color: var(--silver-ink); box-shadow: none; }
.pbadge .pb-t { font: 500 var(--t-s) var(--sans); line-height: 1.2; }
.pbadge .pb-t small { display: block; color: var(--ink-3); margin-top: 2px; }

/* ---------- Условия и cookie ---------- */
.legal { max-width: 760px; margin: var(--s7) auto var(--s8); }
.legal h1 { font-size: var(--t-5xl); margin-bottom: var(--s3); }
.legal h2 { font-size: var(--t-xl); margin-top: var(--s7); scroll-margin-top: var(--s6); }
.legal .prose { margin-top: var(--s3); }
.legal .prose a, .check a, .cookie-note a, .foot-bottom a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: var(--s2) 0 var(--s4); font-size: var(--t-s); color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--silver); }
.cookie-note { position: fixed; z-index: 50; left: 50%; bottom: var(--s4); transform: translateX(-50%);
  width: min(640px, calc(100% - 2 * var(--s4))); display: flex; gap: var(--s4); align-items: center;
  padding: var(--s3) var(--s3) var(--s3) var(--s5); background: rgba(18, 26, 61, .92); backdrop-filter: blur(10px);
  border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  font-size: var(--t-s); color: var(--ink-2); }
.cookie-note[hidden] { display: none; }
.cookie-note p { flex: 1; }
.cookie-actions { display: flex; gap: var(--s2); flex: none; }
.cookie-actions .btn { flex: 1; }
@media (max-width: 560px) { .cookie-note { flex-direction: column; align-items: stretch; padding: var(--s4); } }

/* ---------- Код из письма ---------- */
.auth .auth-lead { color: var(--ink-2); margin: calc(-1 * var(--s2)) 0 var(--s5); text-align: left; font-size: var(--t-m); }
.auth .auth-lead b { color: var(--ink); }
.code-input { font-size: var(--t-2xl) !important; letter-spacing: .45em; text-align: center; font-family: var(--mono); }
.resend { text-align: center; margin-top: var(--s4); }
.link-btn { color: var(--ink-2); font-size: var(--t-s); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:disabled { color: var(--ink-3); text-decoration: none; cursor: default; }
/* автозаполнение Chrome красит поля в белый — возвращаем тёмную тему */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #0B1029 inset; transition: background-color 9999s; }
input::placeholder { color: var(--ink-3); opacity: 1; }
.code-input { height: 64px !important; }

/* =====================================================================
   Редизайн 2026-10: линейные иконки, плашки категорий, новая главная и каталог
   ===================================================================== */
.i { flex: none; display: inline-block; vertical-align: middle; }
.c-crypto { --c: #8B6BFF; } .c-web { --c: #7CC4FF; } .c-forensics { --c: #FFC66B; } .c-network { --c: #5EE0D0; }
.c-reverse { --c: #FF7A93; } .c-stego { --c: #C79BFF; } .c-defense { --c: #43E39B; }
.dim { color: var(--ink-2); }
.ic-mint { color: var(--mint); display: inline-flex; }

/* плашка под иконку: цвет категории (--c от родителя или своего класса c-*), иначе серебро */
.itile { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  color: var(--c, var(--silver)); background: color-mix(in srgb, var(--c, var(--silver)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, var(--silver)) 25%, transparent); }
.itile.lg { width: 56px; height: 56px; border-radius: 16px; }

/* меню с иконками */
.nav-links a { display: inline-flex; align-items: center; gap: 8px; }
.nav-links a .i { opacity: .75; }
.nav-links a.on .i, .nav-links a:hover .i { opacity: 1; }

/* герой */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid rgba(190, 200, 255, .16); color: var(--ink-2); font-size: var(--t-s); font-weight: 500; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(67, 227, 155, .15); }
.float-badge { position: absolute; right: -2%; top: 12%; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 12px; background: rgba(13, 19, 48, .92); border: 1px solid rgba(67, 227, 155, .3); font-size: var(--t-s);
  color: var(--ink); backdrop-filter: blur(6px); }
.float-badge .i { color: var(--mint); }

/* цифры */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s3); padding: 0; }
.stat { display: flex; align-items: center; gap: var(--s4); padding: 20px; border-radius: 16px; background: var(--night-2);
  border: 1px solid var(--line); }
.stat .itile { width: 48px; height: 48px; }
.stat b { display: block; font: 500 34px/1 var(--serif); }
.stat span:not(.itile) { display: block; margin-top: 4px; font-size: var(--t-s); color: var(--ink-2); }

/* секции главной */
.sec-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s4); }
.sec-sub { margin-top: var(--s4); max-width: 40em; color: var(--ink-2); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--silver); font-weight: 500; font-size: var(--t-s); }
.link-arrow .i { transition: transform var(--fast) var(--ease-out); }
.link-arrow:hover { color: #fff; }
.link-arrow:hover .i { transform: translateX(3px); }

.cat-grid { margin-top: var(--s6); display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.cat-card { display: flex; flex-direction: column; gap: 18px; padding: var(--s5); border-radius: 18px; background: var(--night-2);
  border: 1px solid var(--line); transition: border-color var(--fast), transform var(--dur) var(--ease-out); }
.cat-card:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); transform: translateY(-2px); }
.cat-top { display: flex; justify-content: space-between; align-items: start; font-size: var(--t-s); }
.cat-card b { display: block; font-size: var(--t-l); font-weight: 600; }
.cat-card b + span { display: block; margin-top: 6px; font-size: 14px; color: var(--ink-2); }

.level-grid { margin-top: var(--s6); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4); }
.level-card { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5); border-radius: 18px; background: var(--night-2);
  border: 1px solid var(--line); transition: border-color var(--fast), transform var(--dur) var(--ease-out); }
.level-card:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); transform: translateY(-2px); }
.level-top { display: flex; justify-content: space-between; align-items: center; font-size: var(--t-s); }
.level-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--c); }
.level-pts { font: 500 44px/1 var(--serif); }
.level-pts small { font: 400 14px var(--sans); color: var(--ink-2); }
.level-card p { color: var(--ink-2); font-size: 14px; }

.two-col { display: flex; flex-wrap: wrap; gap: var(--s7); }
.two-col > * { flex: 1 1 460px; min-width: 0; }
.feat-list { list-style: none; padding: 0; margin-top: var(--s6); }
.feat-list li { display: flex; gap: var(--s4); padding: var(--s4) 0; border-top: 1px solid rgba(190, 200, 255, .08); }
.feat-list b { display: block; font-weight: 600; }
.feat-list span:not(.itile) { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.panel { padding: var(--s6); border-radius: 20px; background: var(--night-2); border: 1px solid var(--line); }
.panel h3 { font: 400 30px/1.2 var(--serif); }
.panel > p { margin-top: var(--s2); font-size: 14px; }

/* награды-медали: цвет у полученных, приглушённо у остальных */
.badge-grid { margin-top: var(--s5); display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s4); }
.badge { --c: var(--silver); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.medal { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: #8A91B4;
  background: rgba(190, 200, 255, .04); border: 1px solid rgba(190, 200, 255, .12); }
.badge-t { font-size: var(--t-s); line-height: 1.3; color: #8A91B4; }
.badge.on .medal { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.badge.on .badge-t { color: var(--ink); }
.ach-num { font: 500 24px/1 var(--serif); }
.a-first_flag, .a-all_easy, .a-defender { --c: var(--mint); } .a-first_blood { --c: var(--rose); } .a-crypto_master { --c: var(--violet); }
.a-insane { --c: var(--amber); } .a-contest { --c: #7CC4FF; } .a-persistent { --c: #C79BFF; }

.cta-band { margin: var(--s8) 0 0; padding: 56px 48px; border-radius: 24px; background: var(--surface); border: 1px solid rgba(190, 200, 255, .14);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); }
.cta-band h2 { font-size: 40px; }
.cta-band p { margin-top: 10px; }

/* метка сложности: шкала вместо точки */
.chip.diff::before { display: none; }
.chip.diff { gap: 6px; }
.tgroup-h { align-items: center; gap: 10px; }

/* каталог */
.cat-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s5); padding: var(--s7) 0 var(--s5); }
.cat-head h1 { font: 400 56px/1 var(--serif); }
.cat-head .lead { margin-top: var(--s3); font-size: var(--t-m); }
.search-box { display: flex; align-items: center; gap: 10px; width: 360px; max-width: 100%; height: 48px; padding: 0 16px; border-radius: 12px;
  background: rgba(7, 11, 28, .7); border: 1px solid var(--line-2); color: var(--ink-2); }
.search-box:focus-within { border-color: var(--silver); }
.search-box input[type=search] { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; outline: none; }
.pcard-top { display: flex; justify-content: space-between; font-size: var(--t-s); }
.pcard-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--c); }
.cat-chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0 var(--s4); }
.cchip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(190, 200, 255, .16); color: var(--ink-2); font-size: 14px; font-weight: 500; transition: border-color var(--fast), color var(--fast); }
.cchip .i { color: var(--c, var(--silver)); }
.cchip .num { font-size: var(--t-xs); color: var(--ink-3); }
.cchip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--c, var(--silver)) 45%, transparent); }
.cchip.on { color: var(--ink); background: color-mix(in srgb, var(--c, var(--silver)) 12%, transparent); border-color: color-mix(in srgb, var(--c, var(--silver)) 50%, transparent); }
.filters { align-items: end; }
.toggle { gap: 8px; }

.room-list { border-radius: 18px; background: var(--night-2); border: 1px solid var(--line); overflow: hidden; margin-top: var(--s4); }
.room { display: grid; grid-template-columns: 36px 44px minmax(0, 1fr) 130px 80px 64px 28px; gap: var(--s4); align-items: center;
  padding: 14px 20px; border-top: 1px solid rgba(190, 200, 255, .07); transition: background var(--fast); }
.room:first-child { border-top: 0; }
.room:hover { background: rgba(190, 200, 255, .035); }
.room-n { font: 400 var(--t-xs) var(--mono); color: #8A91B4; }
.room-t b { display: block; font-weight: 600; }
.room-t small { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: var(--t-s); color: var(--ink-2); }
.room-who { font-size: var(--t-s); color: var(--ink-2); text-align: right; }
.room-pts { font: 500 24px/1 var(--serif); text-align: right; }
.room-ok { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(190, 200, 255, .16); color: var(--mint); }
.room.is-done .room-ok { background: rgba(67, 227, 155, .14); border-color: rgba(67, 227, 155, .45); }
.room.is-done .room-t b { color: var(--ink-2); }
.pg { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(190, 200, 255, .16); color: var(--silver); }
.pg:hover { border-color: var(--silver); }
.pg.off { opacity: .35; }

/* награды в профиле — те же иконки */
.ach .ico .ach-num { font-size: 18px; }

@media (max-width: 760px) {
  .room { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 8px; }
  .room-n, .room-who { display: none; }
  .room-d { grid-column: 2; }
  .room-pts { grid-row: 1; grid-column: 3; }
  .room-ok { grid-column: 3; justify-self: end; }
  .cat-head h1 { font-size: 44px; }
  .float-badge { display: none; }
  .cta-band { padding: 32px 24px; }
  .cta-band h2 { font-size: 30px; }
}
@media (max-width: 420px) { .stat { padding: 14px; gap: 12px; } .stat .itile { width: 40px; height: 40px; } .stat b { font-size: 28px; } }
