/* Ways to Earn XP — explainer page. Reuses design tokens; no fixed-header
   padding (the page lives inside dashboard-shell, which already offsets the
   topbar — the leaderboard-app double-pad bug is deliberately not repeated). */

.wxp-app {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-md) 0 var(--space-xl);
}

.wxp-intro {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 var(--space-lg);
}

.wxp-section {
    margin-bottom: var(--space-xl);
}

.wxp-section__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm);
}

.wxp-section__note,
.wxp-section__soon {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 var(--space-md);
}

.wxp-section__soon {
    margin: var(--space-sm) 0 0;
    font-style: italic;
    /* No opacity-dimming on text (documented WCAG contrast trap) —
       --text-secondary + italic already de-emphasizes, AA-safe. */
}

.wxp-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wxp-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px 14px;
    /* Real codebase tokens (mirrors leaderboard.css row styling). The old
       --surface-2/--surface do NOT exist → rows rendered transparent (the
       "really bad" — no cards). --bg-card + --border-subtle is the
       established card pattern. */
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.wxp-xp {
    flex: 0 0 56px;
    text-align: right;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    font-size: 1rem;
}

.wxp-xp--var {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    /* No opacity-dimming (WCAG trap) — the smaller uppercase treatment in
       accent colour already differentiates it from numeric +XP values. */
}

.wxp-label {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.wxp-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-md);
    padding: 10px 18px;
    background: var(--accent);
    /* --text-on-accent (#fff), NOT --accent-text (#60a5fa = accent-as-text
       on dark) — the latter is blue-on-blue on the accent fill. */
    color: var(--text-on-accent);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
}

.wxp-cta:hover { filter: brightness(1.08); }
.wxp-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 600px) {
    .wxp-app { padding: var(--space-sm) 0 var(--space-lg); }
    .wxp-xp { flex-basis: 48px; }
}

/* ── Unit 8: per-user breakdown ──────────────────────────────────────
   Each row in the rendered HTML now optionally carries:
     • .wxp-earned  — "You: +Nxp" pill, populated by ways-to-get-xp.js
       after fetching /api/user/xp/breakdown (signed-in only).
     • .wxp-earn    — "earn →" deep-link to the surface where this XP
       is actually earned (the deep-link map lives in the JS).
   Empty states (signed-out user, or signed-in with 0 earned for that
   action) keep the slots collapsed via the `[hidden]` attribute. */
.wxp-earned {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 4px 10px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--accent-success);   /* theme-aware (#10b981 / #0F7B3F) */
    background: var(--accent-success-light, transparent);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}
.wxp-earn {
    flex: 0 0 auto;
    padding: 4px 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: color .15s, border-color .15s;
}
.wxp-earn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}
.wxp-earn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
