/**
 * Segmented control — a pill track of mutually exclusive options, one selected.
 * Used to sift a listing (all / screenplays / comics on a public profile).
 *
 * Selection is `.is-selected` on the button plus `aria-pressed`, so the state
 * is available to assistive tech, not just visually.
 */
.segmented {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: var(--border-radius-pill);
    background: color-mix(in oklch, var(--color-paper) 70%, transparent);
}

.segmented-option {
    border: 0;
    background: none;
    padding: 0.3rem 0.8rem;
    border-radius: var(--border-radius-pill);
    font-family: var(--font-ui);
    font-size: var(--font-size-xs);
    line-height: 1.4;
    color: var(--color-text-light);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.segmented-option:hover:not(.is-selected) {
    color: var(--color-text);
}

.segmented-option.is-selected {
    background: var(--color-background);
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.segmented-option:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}
