/* contribute-scores.css — Community scoring page
   Ink + Steel design system. */

/* ── Hero ──────────────────────────────────────────────── */
.cs-hero {
    background: var(--surface-1, #0f0f0f);
    border-bottom: 1px solid var(--border, #2a2a2a);
    padding: 4rem 1.5rem 3rem;
}
.cs-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}
.cs-hero-tag {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent, #e8e8e8);
    opacity: 0.5;
    margin-bottom: 1rem;
}
.cs-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1rem;
    color: var(--text, #e8e8e8);
}
.cs-hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted, #aaa);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.cs-stats-row {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}
.cs-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.cs-stat-n {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text, #e8e8e8);
    line-height: 1;
}
.cs-stat-label {
    font-size: 0.78rem;
    color: var(--text-faint, #666);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── How it works ──────────────────────────────────────── */
.cs-how {
    padding: 3rem 1.5rem;
    border-bottom: 1px solid var(--border, #2a2a2a);
}
.cs-how-inner {
    max-width: 800px;
    margin: 0 auto;
}
.cs-how h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-muted, #aaa);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.cs-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.cs-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.cs-step-n {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid var(--border, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted, #aaa);
    margin-top: 0.1rem;
}
.cs-step-body strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text, #e8e8e8);
    margin-bottom: 0.3rem;
}
.cs-step-body p {
    font-size: 0.85rem;
    color: var(--text-muted, #aaa);
    line-height: 1.5;
    margin: 0;
}

/* ── Main layout ───────────────────────────────────────── */
.cs-main {
    padding: 2.5rem 1.5rem 4rem;
}
.cs-main-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 800px) {
    .cs-main-inner {
        grid-template-columns: 1fr;
    }
}

/* ── Sections ──────────────────────────────────────────── */
.cs-section {
    background: var(--surface-2, #161616);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.cs-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text, #e8e8e8);
    margin: 0 0 1rem;
}

/* ── Login gate ────────────────────────────────────────── */
.cs-login-gate {
    background: var(--surface-2, #161616);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.cs-login-gate p {
    color: var(--text-muted, #aaa);
    margin-bottom: 1rem;
    font-size: 1rem;
}
.cs-login-note {
    font-size: 0.78rem !important;
    color: var(--text-faint, #666) !important;
    margin-top: 0.75rem !important;
}

/* ── Tabs ──────────────────────────────────────────────── */
.cs-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border, #2a2a2a);
    margin-bottom: 1rem;
}
.cs-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted, #aaa);
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.cs-tab:hover { color: var(--text, #e8e8e8); }
.cs-tab.active {
    color: var(--text, #e8e8e8);
    border-bottom-color: var(--text, #e8e8e8);
}
.cs-tab-desc {
    font-size: 0.82rem;
    color: var(--text-faint, #666);
    margin-bottom: 0.75rem;
}

/* ── Queue list ────────────────────────────────────────── */
.cs-queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}
.cs-queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--surface-1, #0f0f0f);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s;
    font-size: 0.875rem;
}
.cs-queue-item:hover {
    border-color: var(--text-muted, #aaa);
}
.cs-queue-item.selected {
    border-color: var(--text, #e8e8e8);
}
.cs-queue-name {
    color: var(--text, #e8e8e8);
    font-weight: 500;
}
.cs-queue-meta {
    font-size: 0.75rem;
    color: var(--text-faint, #666);
}
.cs-queue-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    background: var(--surface-2, #161616);
    color: var(--text-faint, #666);
    border: 1px solid var(--border, #2a2a2a);
    white-space: nowrap;
}
.cs-loading {
    font-size: 0.82rem;
    color: var(--text-faint, #666);
    padding: 0.5rem 0;
}

/* ── Platform header ───────────────────────────────────── */
.cs-platform-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border, #2a2a2a);
}
.cs-platform-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text, #e8e8e8);
}
.cs-platform-url {
    font-size: 0.78rem;
    color: var(--text-faint, #666);
    margin-top: 0.2rem;
}

/* ── Existing ratings ──────────────────────────────────── */
.cs-existing-ratings {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted, #aaa);
    margin-bottom: 1.25rem;
    padding: 0.6rem 0.75rem;
    background: var(--surface-1, #0f0f0f);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 4px;
}
.cs-icc-bar-wrap {
    flex: 1;
    height: 4px;
    background: var(--border, #2a2a2a);
    border-radius: 2px;
    overflow: hidden;
}
.cs-icc-bar {
    height: 100%;
    border-radius: 2px;
    background: #4a9f6e;
    width: 0;
    transition: width 0.4s ease;
}

/* ── Scoring dimensions ────────────────────────────────── */
.cs-dim {
    margin-bottom: 1.5rem;
}
.cs-dim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.cs-dim-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text, #e8e8e8);
}
.cs-dim-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    border: 1px solid var(--border, #2a2a2a);
    font-size: 0.8rem;
    font-weight: 700;
    font-style: italic;
    color: var(--text-muted, #aaa);
}
.cs-dim-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text, #e8e8e8);
    min-width: 1.5rem;
    text-align: right;
}
.cs-rubric-toggle {
    background: none;
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 50%;
    width: 1.2rem;
    height: 1.2rem;
    font-size: 0.7rem;
    color: var(--text-faint, #666);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: border-color 0.15s;
}
.cs-rubric-toggle:hover {
    border-color: var(--text-muted, #aaa);
    color: var(--text-muted, #aaa);
}
.cs-rubric {
    background: var(--surface-1, #0f0f0f);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}
.cs-rubric-row {
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border, #2a2a2a);
    color: var(--text-muted, #aaa);
    line-height: 1.4;
}
.cs-rubric-row:last-child { border-bottom: none; }
.cs-rubric-row strong { color: var(--text, #e8e8e8); }

/* ── Slider ────────────────────────────────────────────── */
.cs-slider-wrap {
    position: relative;
}
.cs-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--border, #2a2a2a);
    outline: none;
    cursor: pointer;
}
.cs-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text, #e8e8e8);
    cursor: pointer;
    border: 2px solid var(--surface-2, #161616);
    transition: background 0.15s;
}
.cs-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text, #e8e8e8);
    cursor: pointer;
    border: 2px solid var(--surface-2, #161616);
}
.cs-slider:disabled::-webkit-slider-thumb { background: var(--text-faint, #666); }
.cs-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-faint, #666);
    margin-top: 0.3rem;
    padding: 0 2px;
}

/* ── Meta fields ───────────────────────────────────────── */
.cs-meta-row {
    margin-bottom: 1rem;
}
.cs-meta-row label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted, #aaa);
    margin-bottom: 0.4rem;
}
.cs-optional {
    color: var(--text-faint, #666);
    font-weight: 400;
}
.cs-input, .cs-select, .cs-textarea {
    width: 100%;
    background: var(--surface-1, #0f0f0f);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 4px;
    color: var(--text, #e8e8e8);
    font-size: 0.875rem;
    padding: 0.6rem 0.75rem;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
    font-family: inherit;
}
.cs-input:focus, .cs-select:focus, .cs-textarea:focus {
    border-color: var(--text-muted, #aaa);
}
.cs-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── Buttons ───────────────────────────────────────────── */
.cs-btn-primary {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: var(--text, #e8e8e8);
    color: var(--bg, #0a0a0a);
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
}
.cs-btn-primary:hover { opacity: 0.88; }
.cs-btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }
.cs-btn-secondary {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    background: none;
    color: var(--text, #e8e8e8);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s;
    font-family: inherit;
}
.cs-btn-secondary:hover { border-color: var(--text-muted, #aaa); }
.cs-btn-ghost {
    background: none;
    border: none;
    color: var(--text-faint, #666);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    font-family: inherit;
    transition: color 0.15s;
}
.cs-btn-ghost:hover { color: var(--text-muted, #aaa); }
.cs-submit-btn { width: 100%; margin-top: 0.5rem; }
.cs-submit-note {
    font-size: 0.75rem;
    color: var(--text-faint, #666);
    text-align: center;
    margin-top: 0.5rem;
}

/* ── Messages ──────────────────────────────────────────── */
.cs-msg {
    font-size: 0.82rem;
    padding: 0.6rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}
.cs-msg-warn {
    background: rgba(200, 150, 50, 0.08);
    border: 1px solid rgba(200, 150, 50, 0.25);
    color: #c8a44a;
}
.cs-msg-error {
    background: rgba(200, 60, 60, 0.08);
    border: 1px solid rgba(200, 60, 60, 0.25);
    color: #c85050;
}
.cs-msg-success {
    background: rgba(74, 159, 110, 0.08);
    border: 1px solid rgba(74, 159, 110, 0.25);
    color: #4a9f6e;
}

/* ── Success panel ─────────────────────────────────────── */
.cs-success {
    text-align: center;
    padding: 2rem 1rem;
}
.cs-success-icon {
    font-size: 2rem;
    color: #4a9f6e;
    margin-bottom: 0.75rem;
}
.cs-success-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text, #e8e8e8);
    margin-bottom: 0.5rem;
}
.cs-success-body {
    font-size: 0.875rem;
    color: var(--text-muted, #aaa);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* ── Side column ───────────────────────────────────────── */
.cs-side-col { display: flex; flex-direction: column; gap: 1.25rem; }
.cs-card {
    background: var(--surface-2, #161616);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 6px;
    padding: 1.25rem;
}
.cs-card h4 {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #aaa);
    margin: 0 0 0.75rem;
}
.cs-explainer p {
    font-size: 0.82rem;
    color: var(--text-muted, #aaa);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}
.cs-link {
    font-size: 0.8rem;
    color: var(--text-muted, #aaa);
    text-decoration: none;
}
.cs-link:hover { color: var(--text, #e8e8e8); }

/* ── Contribution list ─────────────────────────────────── */
.cs-contrib-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 220px;
    overflow-y: auto;
}
.cs-contrib-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border, #2a2a2a);
    color: var(--text-muted, #aaa);
}
.cs-contrib-item:last-child { border-bottom: none; }
.cs-contrib-name { color: var(--text, #e8e8e8); }
.cs-contrib-score {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.cs-contrib-rank {
    color: var(--text-faint, #666);
    min-width: 1.5rem;
}
.cs-credits-earned {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border, #2a2a2a);
    font-size: 0.82rem;
    color: var(--text-muted, #aaa);
}
#cs-credits-total {
    font-weight: 700;
    color: var(--text, #e8e8e8);
    margin-right: 0.25rem;
}

/* ── Input row for nominate ────────────────────────────── */
#cs-nominate-name, #cs-nominate-url { margin-bottom: 0.5rem; }
