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

:root {
    --bg:          #0a0e14;
    --bg-elev:     #0f141b;
    --surface:     #131a23;
    --surface-2:   #1a222d;
    --border:      #232d3b;
    --border-soft: #1b2430;

    --text:        #d6dee8;
    --text-dim:    #8b98a8;
    --text-faint:  #5c6775;
    --heading:     #f0f6fc;

    --accent:      #4d9eff;
    --accent-dim:  rgba(77, 158, 255, 0.12);
    --accent-line: rgba(77, 158, 255, 0.35);
    --accent-soft: rgba(77, 158, 255, 0.06);
    --accent-deep: #2b6cb0;

    --success:     #3fb950;
    --success-dim: rgba(63, 185, 80, 0.12);
    --success-line: rgba(63, 185, 80, 0.3);
    --warning:     #d29922;
    --warning-dim: rgba(210, 153, 34, 0.12);
    --warning-line: rgba(210, 153, 34, 0.3);
    --danger:      #f85149;
    --danger-dim:  rgba(248, 81, 73, 0.12);
    --danger-line: rgba(248, 81, 73, 0.3);

    /* Дополнительные акценты — расширение палитры без «колхоза» */
    --violet:      #a371f7;
    --violet-dim:  rgba(163, 113, 247, 0.12);
    --violet-line: rgba(163, 113, 247, 0.32);
    --teal:        #2dd4bf;
    --teal-dim:    rgba(45, 212, 191, 0.12);
    --teal-line:   rgba(45, 212, 191, 0.3);
    --pink:        #ec6cb9;
    --pink-dim:    rgba(236, 108, 185, 0.12);

    /* Металлы призов — единые для всего интерфейса */
    --gold:        #ffc83c;
    --gold-dim:    rgba(255, 200, 60, 0.10);
    --silver:      #c0c8d2;
    --silver-dim:  rgba(192, 200, 210, 0.09);
    --bronze:      #cd7f32;
    --bronze-dim:  rgba(205, 127, 50, 0.09);

    /* --- Градиенты: единый набор для всех страниц --- */
    /* Мягкая заливка панели: почти невидимый слоистый фон */
    --grad-panel:
        linear-gradient(160deg, rgba(77, 158, 255, 0.045), rgba(10, 14, 20, 0) 45%);
    /* Панель с более заметным верхним свечением */
    --grad-panel-strong:
        linear-gradient(160deg, rgba(77, 158, 255, 0.09), rgba(10, 14, 20, 0) 55%);
    /* Акцентная панель */
    --grad-accent:
        linear-gradient(145deg, rgba(77, 158, 255, 0.14), rgba(163, 113, 247, 0.06) 60%, transparent);
    /* Успех, предупреждение, опасность */
    --grad-success:
        linear-gradient(145deg, rgba(63, 185, 80, 0.13), transparent 65%);
    --grad-warning:
        linear-gradient(145deg, rgba(210, 153, 34, 0.13), transparent 65%);
    --grad-danger:
        linear-gradient(145deg, rgba(248, 81, 73, 0.13), transparent 65%);
    --grad-violet:
        linear-gradient(145deg, rgba(163, 113, 247, 0.13), transparent 65%);
    /* Металлы */
    --grad-gold:
        linear-gradient(145deg, rgba(255, 200, 60, 0.13), transparent 68%);
    --grad-silver:
        linear-gradient(145deg, rgba(192, 200, 210, 0.10), transparent 68%);
    --grad-bronze:
        linear-gradient(145deg, rgba(205, 127, 50, 0.11), transparent 68%);
    /* Линия-подсветка сверху панели */
    --grad-topline: linear-gradient(90deg, transparent, var(--accent-line), transparent);

    /* Фоновое свечение страницы */
    --grad-page:
        radial-gradient(circle at 12% -8%, rgba(77, 158, 255, 0.09), transparent 42%),
        radial-gradient(circle at 88% 4%, rgba(163, 113, 247, 0.06), transparent 38%);

    --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;

    --radius: 8px;
    --radius-sm: 6px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);

    --header-h: 60px;
    --max-w: 1180px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
::selection { background: var(--accent-line); color: #fff; }

/* Скроллбар */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #2f3d4f; }

.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--accent), #2b6cb0);
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    letter-spacing: -0.5px;
    box-shadow: 0 0 0 1px rgba(77, 158, 255, 0.4), 0 4px 12px rgba(77, 158, 255, 0.25);
}

.brand-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--heading);
    letter-spacing: -0.3px;
}

.brand-name span { color: var(--text-dim); font-weight: 500; }

.nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.nav-link {
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dim);
    transition: color .15s, background .15s;
    position: relative;
}

.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--heading); background: var(--surface); }
.nav-link.active::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.points-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    border: 1px solid var(--accent-line);
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent);
}

.points-badge::before {
    content: "◆";
    font-size: 9px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

.user-avatar:hover { border-color: var(--accent); color: var(--accent); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all .15s;
    white-space: nowrap;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: #061018;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: #6bb0ff;
    border-color: #6bb0ff;
    box-shadow: 0 0 0 3px rgba(77, 158, 255, 0.2);
}

.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn-ghost:hover { background: var(--surface-2); border-color: #2f3d4f; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dim);
    font-size: 18px;
    place-items: center;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(77, 158, 255, 0.08), transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 20%, rgba(63, 185, 80, 0.05), transparent 60%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(77, 158, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77, 158, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 70% 80% at 30% 0%, #000 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 0%, #000 20%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    padding: 56px 0 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-line);
    margin-bottom: 20px;
}

.hero-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -1.2px;
    color: var(--heading);
    font-weight: 700;
    margin-bottom: 16px;
    max-width: 640px;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero-sub {
    font-size: 16px;
    color: var(--text-dim);
    max-width: 560px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    min-width: 280px;
}

.hero-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.hero-stat-val {
    font-family: var(--mono);
    font-size: 26px;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -1px;
    line-height: 1;
}

.hero-stat-val.accent { color: var(--accent); }
.hero-stat-val.success { color: var(--success); }

.hero-stat-label {
    font-size: 11.5px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
    font-weight: 500;
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 48px 0; }
.section + .section { border-top: 1px solid var(--border-soft); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: "";
    width: 3px;
    height: 22px;
    background: var(--accent);
    border-radius: 2px;
}

.section-desc {
    font-size: 13.5px;
    color: var(--text-faint);
    margin-top: 6px;
    margin-left: 15px;
}

.link-arrow {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap .15s, color .15s;
    white-space: nowrap;
}

.link-arrow:hover { color: var(--accent); gap: 8px; }

/* =========================================================
   NEWS
   ========================================================= */
.news-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 16px;
}

.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    transition: border-color .15s, background .15s, transform .15s;
    cursor: pointer;
}

.news-card:hover {
    border-color: var(--accent-line);
    background: var(--surface-2);
    transform: translateY(-2px);
}

.news-card.featured {
    grid-row: span 2;
    padding: 26px;
    background:
        linear-gradient(160deg, var(--accent-dim), transparent 55%),
        var(--surface);
    position: relative;
    overflow: hidden;
}

.news-card.featured::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -30%;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(77, 158, 255, 0.15), transparent 70%);
    pointer-events: none;
}

.news-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 14px;
}

.news-tag.tag-announce  { background: var(--accent-dim);  color: var(--accent);  border: 1px solid var(--accent-line); }
.news-tag.tag-update    { background: var(--success-dim); color: var(--success); border: 1px solid rgba(63, 185, 80, 0.3); }
.news-tag.tag-event     { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(210, 153, 34, 0.3); }
.news-tag.tag-fix       { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(248, 81, 73, 0.3); }

.news-date {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
    margin-bottom: 8px;
}

.news-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--heading);
    line-height: 1.35;
    letter-spacing: -0.2px;
    margin-bottom: 10px;
}

.news-card.featured .news-title { font-size: 22px; letter-spacing: -0.5px; }

.news-excerpt {
    font-size: 13.5px;
    color: var(--text-dim);
    line-height: 1.55;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card.featured .news-excerpt { -webkit-line-clamp: 5; font-size: 14px; }

.news-more {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--mono);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap .15s;
}

.news-card:hover .news-more { gap: 8px; }

.news-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
    font-size: 13.5px;
    color: var(--text-dim);
    line-height: 1.6;
}

.news-card.expanded .news-body {
    max-height: 600px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

/* =========================================================
   CATEGORIES
   ========================================================= */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color .15s, background .15s, transform .15s;
    cursor: pointer;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.cat-card:hover {
    border-color: var(--accent-line);
    background: var(--surface-2);
    transform: translateY(-2px);
}

.cat-card.active {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.cat-card.active::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
}

.cat-idx {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-faint);
    letter-spacing: 1px;
}

.cat-card.active .cat-idx { color: var(--accent); }

.cat-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.2px;
}

.cat-count {
    font-size: 12px;
    color: var(--text-faint);
    font-family: var(--mono);
}

.cat-bar {
    height: 3px;
    background: var(--border-soft);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
}

.cat-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width .4s ease;
}

/* =========================================================
   TWO COLUMN LAYOUT
   ========================================================= */
.grid-2 {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 32px;
}

/* =========================================================
   TASKS
   ========================================================= */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-wrap::before {
    content: "⌕";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-faint);
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px 9px 34px;
    color: var(--text);
    font-size: 13.5px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.search-input::placeholder { color: var(--text-faint); }

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 158, 255, 0.15);
}

.filter-select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 30px 9px 12px;
    color: var(--text);
    font-size: 13.5px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%),
                      linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    transition: border-color .15s;
}

.filter-select:focus { border-color: var(--accent); }

.task-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task {
    display: grid;
    grid-template-columns: 28px 1fr auto auto;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    transition: border-color .15s, background .15s;
    cursor: pointer;
}

.task:hover {
    border-color: var(--accent-line);
    background: var(--surface-2);
}

.task.solved { border-left: 2px solid var(--success); }

.task-status {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 11px;
    color: var(--text-faint);
    flex-shrink: 0;
    transition: all .15s;
}

.task.solved .task-status {
    background: var(--success-dim);
    border-color: var(--success);
    color: var(--success);
}

.task-body { min-width: 0; }

.task-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--heading);
    letter-spacing: -0.1px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task.solved .task-name { color: var(--text-dim); }

.task-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.chip.easy   { background: var(--success-dim); color: var(--success); border-color: rgba(63, 185, 80, 0.3); }
.chip.medium { background: var(--warning-dim); color: var(--warning); border-color: rgba(210, 153, 34, 0.3); }
.chip.hard   { background: var(--danger-dim);  color: var(--danger);  border-color: rgba(248, 81, 73, 0.3); }

.task-pts {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    min-width: 44px;
    text-align: right;
}

.task.solved .task-pts { color: var(--text-faint); }

.task-arrow {
    color: var(--text-faint);
    font-size: 14px;
    transition: transform .15s, color .15s;
}

.task:hover .task-arrow { color: var(--accent); transform: translateX(3px); }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-faint);
    font-size: 13.5px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    font-family: var(--mono);
}

/* =========================================================
   LEADERBOARD
   ========================================================= */
.lb-controls {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.lb-tab {
    flex: 1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dim);
    transition: all .15s;
    text-align: center;
}

.lb-tab:hover { color: var(--text); }

.lb-tab.active {
    background: var(--surface-2);
    color: var(--heading);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lb-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: border-color .15s, background .15s;
}

.lb-row:hover { border-color: var(--accent-line); background: var(--surface-2); }

.lb-rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-faint);
    background: var(--surface-2);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.lb-rank.r1 { background: rgba(255, 200, 60, 0.12); color: #ffc83c; border-color: rgba(255, 200, 60, 0.4); }
.lb-rank.r2 { background: rgba(192, 200, 210, 0.12); color: #c0c8d2; border-color: rgba(192, 200, 210, 0.4); }
.lb-rank.r3 { background: rgba(205, 127, 50, 0.12); color: #cd7f32; border-color: rgba(205, 127, 50, 0.4); }

.lb-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    flex-shrink: 0;
}

.lb-name {
    flex: 1;
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-score {
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--accent);
}

.lb-delta {
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    min-width: 34px;
    text-align: right;
}

.lb-delta.up { color: var(--success); }
.lb-delta.down { color: var(--danger); }
.lb-delta.same { color: var(--text-faint); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-elev);
    padding: 32px 0;
    margin-top: 48px;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 12.5px;
    color: var(--text-faint);
    font-family: var(--mono);
}

.footer-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    font-size: 12.5px;
    color: var(--text-dim);
    transition: color .15s;
}

.footer-nav a:hover { color: var(--accent); }

.footer-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--text-faint);
}

.footer-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .news-grid { grid-template-columns: 1fr 1fr; }
    .news-card.featured { grid-column: 1 / -1; grid-row: auto; }
    .grid-2 { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .header-inner { gap: 12px; padding: 0 16px; }
    .nav { display: none; }
    .nav.open {
        display: flex;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-elev);
        border-bottom: 1px solid var(--border);
        padding: 12px;
        gap: 2px;
    }
    .nav.open .nav-link { padding: 10px 14px; }
    .nav.open .nav-link.active::before { display: none; }
    .menu-toggle { display: grid; }
    .points-badge { display: none; }
    .hero-inner { grid-template-columns: 1fr; padding: 40px 0 36px; gap: 32px; }
    .hero-stats { min-width: 0; }
    .section { padding: 36px 0; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .news-grid { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .task { grid-template-columns: 24px 1fr auto; gap: 10px; padding: 12px 12px; }
    .task-arrow { display: none; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 26px; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .btn { padding: 8px 14px; font-size: 13px; }
    .task-pts { min-width: 36px; font-size: 12px; }
}
