/* Lost At Night — challenge row + section headings (shared by /, /challenges/). */

/* ───────── Challenge row ───────── */
.ds-ch-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    padding: 14px 18px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    transition: transform 120ms, background 120ms, border-color 120ms;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.ds-ch-row:hover {
    background: var(--bg-2);
    border-color: oklch(0.95 0.13 113 / 0.35);
    transform: translateY(-2px);
}
.ds-ch-row.is-enrolled {
    border-color: oklch(0.95 0.13 113 / 0.45);
    box-shadow: 0 0 0 1px oklch(0.95 0.13 113 / 0.15) inset;
}

.ds-ch-row__thumb {
    width: 80px; height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-2);
    border: 1px solid var(--line);
    flex-shrink: 0;
    position: relative;
}
.ds-ch-row__thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.ds-ch-row__thumb-fallback {
    position: absolute; inset: 0; display: block;
    background: radial-gradient(circle at 50% 60%,
        oklch(0.85 0.18 80) 0%, oklch(0.55 0.18 50) 40%, oklch(0.25 0.05 280) 80%);
}
.ds-ch-row__thumb-fallback::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(2px 2px at 30% 35%, var(--accent), transparent 60%),
        radial-gradient(1.5px 1.5px at 60% 50%, var(--accent), transparent 60%),
        radial-gradient(1.5px 1.5px at 45% 65%, var(--accent), transparent 60%);
    opacity: 0.85;
}

.ds-ch-row__content { min-width: 0; }
.ds-ch-row__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-0);
    line-height: 1.25;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.ds-ch-row__title a { color: inherit; text-decoration: none; }
.ds-ch-row__title a:hover { color: var(--accent); }

.ds-ch-row__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-2);
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.ds-ch-row__progress {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 420px;
}

.ds-ch-row__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 110px;
}
.ds-ch-row__side .ds-btn {
    font-size: 12px;
    height: 28px;
    padding: 0 12px;
    min-width: 96px;
    justify-content: center;
}

@media (max-width: 768px) {
    .ds-ch-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .ds-ch-row__side {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-width: 0;
    }
}

/* ───────── Section heading (Active / Upcoming / Paused / Finished) ───────── */
.ds-section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 28px 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-soft);
}
.ds-section-heading:first-of-type { margin-top: 0; }
.ds-section-heading .ds-icon { color: var(--ink-2); }
.ds-section-heading.active   .ds-icon { color: var(--good); }
.ds-section-heading.upcoming .ds-icon { color: var(--info); }
.ds-section-heading.paused   .ds-icon { color: var(--warn); }
.ds-section-heading.finished .ds-icon { color: var(--ink-3); }
.ds-section-heading__label { flex: 1; }
.ds-section-heading__count {
    background: var(--bg-3);
    color: var(--ink-1);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0;
}

.ds-section-empty {
    color: var(--ink-3);
    font-style: italic;
    padding: 14px;
    background: var(--bg-1);
    border: 1px dashed var(--line);
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
}

/* ───────── Page wrapper (/challenges/) ───────── */
.ds-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px;
}
.ds-page__head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    margin-bottom: 24px; flex-wrap: wrap;
}
.ds-page__title {
    font-size: 28px; font-weight: 700; color: var(--ink-0);
    letter-spacing: -0.5px; margin: 0 0 4px;
    display: flex; align-items: center; gap: 12px;
}
.ds-page__title .ds-icon { color: var(--accent); }
.ds-page__sub {
    font-size: 14px; color: var(--ink-2); margin: 0;
}
