/* T32 — Profile and Skills (UX §5.8). Reuses .sd-tabs/.sd-chip (companies.css/app-shell.css),
   .sd-modal-backdrop/.sd-modal-content/.sd-commit-sheet* (missions.css), and .sd-laundering__error
   (laundering.css) for the socket-format destructive-confirmation flow — same cross-page BEM reuse
   convention established by laundering.css/property.css. */

.sd-profile {
    display: flex;
    flex-direction: column;
    gap: var(--sd-space-5);
}

.sd-profile__header h2 {
    margin: 0;
}

.sd-profile__skills {
    gap: var(--sd-space-5);
}

.sd-profile__skill-row {
    display: flex;
    flex-direction: column;
    gap: var(--sd-space-1);
    padding-bottom: var(--sd-space-3);
    border-bottom: 1px solid var(--sd-border-subtle);
}

.sd-profile__skill-row:last-of-type {
    border-bottom: none;
}

.sd-profile__skill-row-header {
    display: flex;
    justify-content: space-between;
    font-family: var(--sd-font-ui);
    font-size: var(--sd-text-sm);
    color: var(--sd-text-primary);
}

.sd-profile__skill-effective {
    font-family: var(--sd-font-data);
    font-variant-numeric: var(--sd-numeric);
    color: var(--sd-text-secondary);
}

/* Two visually distinct segments of one bar (UX §5.8): usage-earned level, then allocated points
   stacked immediately after it — never overlapping, so the split reads as one continuous total. */
.sd-skill-bar {
    position: relative;
    display: block;
    width: 100%;
    height: 8px;
    border-radius: var(--sd-radius-full);
    background: var(--sd-surface-3);
    overflow: hidden;
}

.sd-skill-bar__usage,
.sd-skill-bar__allocated {
    position: absolute;
    top: 0;
    height: 100%;
}

.sd-skill-bar__usage {
    left: 0;
    background: var(--sd-energy);
}

.sd-skill-bar__allocated {
    background: var(--sd-accent);
}

.sd-profile__skill-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sd-space-3);
    font-family: var(--sd-font-ui);
    font-size: var(--sd-text-xs);
    color: var(--sd-text-secondary);
}

.sd-profile__skill-legend-item--usage::before,
.sd-profile__skill-legend-item--allocated::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--sd-radius-full);
    margin-right: var(--sd-space-1);
}

.sd-profile__skill-legend-item--usage::before { background: var(--sd-energy); }
.sd-profile__skill-legend-item--allocated::before { background: var(--sd-accent); }

.sd-profile__skill-penalty {
    color: var(--sd-danger);
    font-weight: 600;
}

.sd-profile__socket-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sd-space-3);
    margin-bottom: var(--sd-space-4);
}

.sd-profile__socket {
    background: var(--sd-surface-inset);
    border: 1px solid var(--sd-border-default);
    border-radius: var(--sd-radius-md);
    padding: var(--sd-space-4);
    text-align: center;
}

.sd-profile__socket--locked {
    opacity: 0.6;
}

.sd-profile__socket select {
    display: block;
    width: 100%;
    margin: var(--sd-space-2) 0;
    padding: var(--sd-space-1) var(--sd-space-2);
    background: var(--sd-surface-2);
    border: 1px solid var(--sd-border-default);
    border-radius: var(--sd-radius-sm);
    color: var(--sd-text-primary);
    font-family: var(--sd-font-ui);
}

@media (max-width: 640px) {
    .sd-profile__socket-grid {
        grid-template-columns: 1fr;
    }
}
